/* Login and Register Pages Styles */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2rem 1rem;
    box-sizing: border-box;
    /* Height fallback chain - order matters! */
    min-height: 100vh;
}

/* iOS Safari specific fix */
@supports (-webkit-touch-callout: none) {
    .login-container {
        min-height: -webkit-fill-available;
    }
}

/* Modern browsers with dvh support */
@supports (min-height: 100dvh) {
    .login-container {
        min-height: 100dvh;
    }
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(220, 38, 38, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.login-kanji {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Noto Serif JP', serif;
    font-size: 30rem;
    font-weight: 200;
    color: rgba(0, 0, 0, 0.015);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 1.5rem;
    padding: 3rem;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 10;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-family: 'Noto Serif JP', serif;
    font-weight: 600;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--budo-gray);
    font-size: 0.95rem;
    font-weight: 300;
}

.budo-input {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    padding: 0.875rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.budo-input:focus {
    border-color: var(--budo-black);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
    outline: none;
}

.form-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--budo-gray);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.alert-budo {
    background: var(--budo-accent-light);
    border: 1px solid var(--budo-accent);
    color: var(--budo-accent);
    border-radius: 0.5rem;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
}

.login-divider {
    width: 40px;
    height: 40px;
    border: 2px solid var(--budo-black);
    border-radius: 50%;
    opacity: 0.1;
    margin: 2rem auto;
}

.register-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.helptext {
    font-size: 0.75rem;
    color: var(--budo-gray);
    margin-top: 0.25rem;
    display: block;
}

@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 2rem;
    }
    
    .login-card {
        padding: 1.5rem;
        margin: 0;
        max-width: 100%;
        border-radius: 1rem;
    }
    
    .login-kanji {
        font-size: 12rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .login-divider {
        width: 30px;
        height: 30px;
        margin: 1.5rem auto;
    }
    
    .login-subtitle {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 0.75rem;
        padding-top: 1rem;
    }
    
    .login-card {
        padding: 1.25rem;
    }
    
    .login-kanji {
        font-size: 10rem;
    }
    
    .login-title {
        font-size: 1.35rem;
    }
    
    .budo-input {
        padding: 0.75rem;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}

/* GDPR Consent Section */
.gdpr-consent-section {
    background: var(--budo-light-gray);
    border-radius: 0.75rem;
    padding: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.consent-header {
    display: flex;
    align-items: center;
    color: var(--budo-gray);
    font-weight: 500;
}

.consent-header i {
    color: #16a34a;
}

.gdpr-consent-section .form-check {
    padding-left: 1.75rem;
}

.gdpr-consent-section .form-check-input {
    width: 1.1em;
    height: 1.1em;
    margin-top: 0.15em;
    border-color: var(--budo-gray);
}

.gdpr-consent-section .form-check-input:checked {
    background-color: var(--budo-black);
    border-color: var(--budo-black);
}

.gdpr-consent-section .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.15);
    border-color: var(--budo-black);
}

.gdpr-consent-section .form-check-label {
    color: var(--budo-black);
    line-height: 1.5;
}

.consent-link {
    color: var(--budo-accent);
    text-decoration: none;
    font-weight: 500;
}

.consent-link:hover {
    text-decoration: underline;
}
