*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
    margin: 0;
}
/* Footer always at bottom if content is short */
.header {
    width:100%;
    background-color:#FFF;
    flex-shrink: 0;
    padding-top: 10px;
    padding-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.header h1{
    color: #333;
    font-size: 1.5rem;
    float: left;
    text-align:left;
    padding-left:20px;
    padding-right:20px;
    margin-top: 0;
    padding-top: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}
.header h2{ /* same as login button */
    color: #333;
    font-size: 1rem;
    float:left;
    text-align:left;
    margin-top: 0;
    padding-top: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}
/* Main content grows to fill remaining space */
.container {
    flex: 1; /* grows to fill space */
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 20px;
}

/* About section */
.about {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

#img-frame{
  width: 100%;
  aspect-ratio: 1 / 1;   /* makes it a perfect square */
  border-radius: 12px;
  border: 1px solid #ddd;
  background: #f5f7fa;
}
/* Login box */
.login-box, .register-box, .forgot-password, .faq-box, .story-box{
    background: white;
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.login-box h2, .register-box h2, .forgot-password h2, .faq-box h2, .story-box h2{
    margin-bottom: 20px;
    text-align: center;
}

/* Inputs */
.login-box input, .register-box input, .forgot-password input, .faq-box input, .faq-box textarea, .story-box input{
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-size: 1rem;
    resize: none;          /* prevents manual resize */
    overflow: hidden;
}

.login-box input:focus, .register-box input:focus, .forgot-password input:focus, .faq-box input:focus, .faq-box textarea:focus, .story-box input:focus{
    outline: none;
    border-color: #002255;
}

.faq-box textarea {
    height: auto;
    min-height: 0;
    box-sizing: border-box;
}

.password-rules {
  font-size: 0.85rem;
  margin-bottom: 15px;
  line-height: 0.8;
}

.password-rules span {
  display: block;
}
/* Login button */
.login-btn {
    width: 100%;
    padding: 12px;
    background: #002255;
    border: none;
    color: white;
    font-size: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.login-btn:hover {
    background: #AAA;
}

/* Bottom links */
.bottom-links {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.bottom-links a {
    text-decoration: none;
    color: #002255;
}

.bottom-links a:hover {
    text-decoration: underline;
}

/* Responsive Design */

/* Tablet */
@media (min-width: 768px) {
    .container {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 60px;
    }

    .about {
        text-align: left;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .about h1 {
        font-size: 2.5rem;
    }

    .login-box, .register-box, .forgot-password, .faq-box, .story-box{
        max-width: 450px;
        padding: 40px;
    }
}

/* Footer always at bottom if content is short */
.footer {
    background: #002255; /* same as login button */
    color: white;
    padding: 15px 10px;
    text-align: center;
    border-radius: 12px;
    margin: 0 10px 10px 10px; /* bottom margin for spacing */
    flex-shrink: 0; /* prevents shrinking */
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #AAA; /* same hover effect as login button */
}
