body {
    font-family: 'Inter', sans-serif;
    background: url('../images/bg.png') no-repeat center center/cover;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #1a3c1a;
}

.container {
    width: clamp(360px, 85vw, 480px);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 80, 0, 0.2);
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.container:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 80, 0, 0.25);
}

.header {
    background: linear-gradient(to right, #2e7d32, #4caf50);
    padding: 1.5em;
    text-align: center;
}

.header img {
    max-width: 120px;
    height: auto;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
}

.login-box, .signup-box, .forgot-box, .reset-box {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-box h1, .signup-box h1, .forgot-box h1, .reset-box h1 {
    font-weight: 600;
    font-size: 1.5rem;
    color: #2e7d32;
    text-align: center;
    margin: 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.input-group label {
    font-size: 0.95rem;
    font-weight: 400;
    color: #1a3c1a;
}

.input-group input, .input-group select {
    padding: 0.75rem;
    font-size: 0.95rem;
    border: 1px solid #b0bec5;
    border-radius: 10px;
    background: rgba(245, 247, 245, 0.9);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-group input:focus, .input-group select:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.25);
    outline: none;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
}

.show-password {
    position: absolute;
    right: 10px;
    cursor: pointer;
    color: #2e7d32;
    font-size: 0.9rem;
    user-select: none;
}

.show-password:hover {
    color: #388e3c;
}

.btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to right, #4caf50, #66bb6a);
    color: #fff;
    text-align: center;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    position: relative;
}

.btn:hover {
    background: linear-gradient(to right, #388e3c, #4caf50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.btn:disabled {
    background: #b0bec5;
    cursor: not-allowed;
}

.spinner {
    display: none;
    border: 4px solid #ffffff;
    border-top: 4px solid #2e7d32;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    animation: spin 0.8s linear infinite;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

.toggle-link {
    text-align: center;
    font-size: 0.9rem;
    color: #2e7d32;
    cursor: pointer;
    margin-top: 1rem;
}

.toggle-link:hover {
    color: #388e3c;
    text-decoration: underline;
}

.policy {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #1a3c1a;
}

.policy a {
    color: #2e7d32;
    text-decoration: none;
}

.policy a:hover {
    color: #388e3c;
    text-decoration: underline;
}

.message {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    text-align: center;
    font-size: 0.9rem;
    display: block !important;
}

.message.error {
    background: #ffebee;
    color: #c62828;
}

.message.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.message.info {
    background: #e3f2fd;
    color: #1565c0;
}

.message.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.forgot-password {
    text-align: center;
    font-size: 0.9rem;
    color: #546e7a;
    margin-top: 1rem;
}

.forgot-password a {
    color: #2e7d32;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #388e3c;
    text-decoration: underline;
}

.footer {
    background: linear-gradient(to right, #2e7d32, #4caf50);
    color: #fff;
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    font-weight: 300;
}

.footer a {
    color: #a5d6a7;
    text-decoration: none;
}

.footer a:hover {
    color: #ffffff;
}

@media (max-width: 768px) {
    .container {
        width: 90%;
        margin: 2vw;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
        margin: 1vw;
    }
    .login-box, .signup-box, .forgot-box, .reset-box {
        padding: 1.5rem;
    }
    .btn {
        padding: 0.9rem;
        font-size: 1rem;
    }
    .input-group input, .input-group select {
        padding: 0.65rem;
        font-size: 0.9rem;
    }
}