.auth-container {
    background: var(--bg-secondary);
    backdrop-filter: blur(3px);
    border-radius: 20px;
    padding: 40px 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0px 0px 10px 0px var(--box-shadow-color);
    animation: slideUp 0.6s ease-out;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px;
}

.auth-header-span {
    color: var(--accent);
    font-size: 2.0em;
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.toggle-password {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    opacity: 0.7;
    background: rgba(0,0,0,0.05);
}

.toggle-password:focus {
    outline: none;
    box-shadow: 0 0 0 2px #007bff;
}

#termsModal {
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.5);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:1000;
}

#terms-modal-content {
    background: #1a1825;
    color: white;
    padding:25px;
    border-radius:8px;
    max-width:450px;
}

.visible-icon {
    display: flex;
}

.visible-icon svg {
    width: 35px;
    height: 35px;
}

.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.auth-link:hover {
    color: var(--accent);
    text-shadow: 0 0 10px rgb(130 128 128 / 25%);
}

.flash-messages {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.flash-message {
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(220, 38, 38, 0.9) 100%);
    border-radius: 10px;
    color: white;
    text-align: center;
    font-weight: 500;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.flash-message.js-error {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.input-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25) !important;
}

.input-error:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3) !important;
}

.field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    padding: 4px 8px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 4px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-element {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    background: rgb(213 219 255 / 10%);
    border: 1px solid rgb(197 200 255 / 40%);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-family: system-ui;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-input:focus {
    outline: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.15) 100%);
    box-shadow: inset 0 0 10px 3px var(--box-shadow-color);
    transform: translateY(-2px);
}

.form-input:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .auth-container {
        padding: 30px 20px;
        margin: 10px;
    }

    .auth-header h2 {
        font-size: 1.7rem;
    }

    .form-input {
        padding: 12px 15px;
    }
}