.auth-page {
    font-family: 'Fredoka', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #cfe9ff 0%, #e6d9ff 55%, #f7f5ff 100%);
    color: #2c2c2c;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.auth-page::before {
    content: '';
    position: fixed;
    inset: -10% -10% -10% -10%;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35), transparent 40%),
                radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.25), transparent 45%),
                radial-gradient(circle at 30% 80%, rgba(255, 255, 255, 0.2), transparent 50%),
                linear-gradient(120deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
    animation: authSkyDrift 36s linear infinite;
    pointer-events: none;
    z-index: 0;
}

.cartoon-theme.theme-night.auth-page {
    background: linear-gradient(180deg, #1a2440 0%, #2a385d 55%, #3e4f78 100%);
    color: #f7f2e8;
}

.cartoon-theme.theme-night.auth-page::before {
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 40%),
                radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.06), transparent 45%),
                radial-gradient(circle at 30% 80%, rgba(255, 255, 255, 0.05), transparent 50%),
                linear-gradient(120deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
}
/* ===================================
   AUTH.CSS - Login/Inscription Styles
   =================================== */

.auth-container {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 520px) minmax(260px, 420px);
    align-items: center;
    justify-content: center;
    gap: 40px;
    background: transparent;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

/* Animated Background */
.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120"><circle cx="60" cy="60" r="46" fill="rgba(255,255,255,0.08)"/></svg>') repeat;
    animation: backgroundMove 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes backgroundMove {
    from { transform: translate(0, 0); }
    to { transform: translate(50px, 50px); }
}

@keyframes authSkyDrift {
    0% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(6%, -4%, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

.auth-card,
.auth-panel {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    max-width: 520px;
    width: 100%;
    position: relative;
    z-index: 1;
    animation: slideIn 0.5s ease-out;
    border: 3px solid rgba(255,255,255,0.7);
}

.auth-panel::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 18px;
    border: 2px dashed rgba(102, 126, 234, 0.2);
    pointer-events: none;
}

/* Ensure all direct children are above the animated background */
.auth-container > * {
    position: relative;
    z-index: 1;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo h1 {
    font-size: 2.4rem;
    color: #667eea;
    margin: 10px 0;
}

.auth-logo p {
    color: #666;
    font-size: 0.9rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
    background: white;
    cursor: text;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    pointer-events: auto !important;
}

.form-group input.error {
    border-color: #f5576c;
}

.error-message {
    color: #f5576c;
    font-size: 0.85rem;
    margin-top: -5px;
}

.gender-selection {
    display: flex;
    gap: 15px;
}

.gender-option {
    flex: 1;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gender-option:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.gender-option.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.gender-option input[type="radio"] {
    display: none;
}

.gender-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.btn-auth {
    padding: 15px;
    background: linear-gradient(135deg, #ffd86b 0%, #ff9f1c 100%);
    color: #3b2b00;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
    box-shadow: 0 10px 24px rgba(255, 159, 28, 0.35);
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(255, 159, 28, 0.45);
}

.btn-auth:active {
    transform: translateY(0);
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    padding: 15px 30px;
    background: linear-gradient(135deg, #ffd86b 0%, #ff9f1c 100%);
    color: #3b2b00;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
    width: 100%;
    box-shadow: 0 10px 24px rgba(255, 159, 28, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(255, 159, 28, 0.45);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-illustration {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.mascot {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: #fff6d6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 90px;
    box-shadow: 0 16px 32px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.mascot:hover {
    transform: rotate(-3deg) scale(1.05);
}

.mascot-bubble {
    background: white;
    padding: 12px 16px;
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(0,0,0,0.15);
    font-weight: bold;
    color: #4a3d7a;
    position: relative;
}

.mascot-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 24px;
    border-width: 10px 10px 0 10px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

.auth-bubbles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.bubble {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    animation: bubbleFloat 6s ease-in-out infinite;
}

.bubble.b2 { width: 22px; height: 22px; animation-duration: 8s; }
.bubble.b3 { width: 12px; height: 12px; animation-duration: 5s; }

.auth-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.auth-stars span {
    position: absolute;
    color: rgba(255, 255, 255, 0.9);
    animation: twinkle 3s ease-in-out infinite;
}

.auth-bird {
    position: absolute;
    top: 190px;
    left: 24%;
    font-size: 22px;
    animation: birdFly 8s ease-in-out infinite;
    z-index: 0;
}

.auth-bird.bird-2 {
    top: 225px;
    left: 36%;
    font-size: 18px;
    animation-duration: 10s;
}


.auth-sun {
    position: absolute;
    top: 40px;
    right: 80px;
    width: 90px;
    height: 90px;
    background: radial-gradient(circle, #ffe07a 0%, #ffb703 60%, #ff9f1c 100%);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(255, 183, 3, 0.6);
    animation: sunSpin 18s linear infinite;
}

.auth-cloud {
    position: absolute;
    top: 80px;
    left: -120px;
    width: 160px;
    height: 60px;
    background: #ffffff;
    border-radius: 40px;
    box-shadow: 30px 10px 0 0 #ffffff, 60px 0 0 0 #ffffff;
    animation: cloudFloat 20s linear infinite;
    opacity: 0.95;
}

.auth-cloud.cloud-2 {
    top: 160px;
    width: 200px;
    height: 70px;
    animation-duration: 26s;
    opacity: 0.9;
}

.auth-rainbow {
    position: absolute;
    top: 90px;
    left: 12%;
    width: 220px;
    height: 120px;
    border-radius: 120px 120px 0 0;
    background: conic-gradient(
        #ff6b6b 0deg,
        #ffd166 60deg,
        #6ddf7b 120deg,
        #7cc7ff 180deg,
        #9b7cff 240deg,
        #ff6bb1 300deg,
        #ff6b6b 360deg
    );
    mask: radial-gradient(circle at 50% 100%, transparent 58%, #000 60%);
    opacity: 0.8;
    animation: rainbowGlow 6s ease-in-out infinite;
    z-index: 0;
}

.auth-balloon {
    position: absolute;
    top: 140px;
    right: 18%;
    width: 34px;
    height: 44px;
    background: #ff8fab;
    border-radius: 50% 50% 45% 45%;
    box-shadow: inset -6px -8px 0 rgba(0,0,0,0.08);
    animation: balloonFloat 7s ease-in-out infinite;
    z-index: 0;
}

.auth-balloon::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    width: 2px;
    height: 24px;
    background: rgba(0,0,0,0.2);
}

.auth-balloon.balloon-2 {
    top: 190px;
    right: 26%;
    width: 26px;
    height: 34px;
    background: #ffd166;
    animation-duration: 9s;
    opacity: 0.9;
}

.auth-plane {
    position: absolute;
    top: 220px;
    left: -60px;
    font-size: 22px;
    animation: planeFly 12s linear infinite;
    z-index: 0;
}

.auth-hills {
    position: absolute;
    inset: auto 0 0 0;
    height: 240px;
    pointer-events: none;
    z-index: 0;
}

.auth-hill {
    position: absolute;
    bottom: -40px;
    width: 55%;
    height: 220px;
    background: radial-gradient(circle at 30% 30%, #b7f5c7 0%, #8fe3a2 60%, #78d08b 100%);
    border-radius: 50% 50% 0 0;
    filter: blur(0.2px);
    animation: hillFloat 18s ease-in-out infinite;
}

.auth-hill.hill-2 {
    right: -8%;
    width: 60%;
    height: 240px;
    background: radial-gradient(circle at 30% 30%, #c6f0ff 0%, #9ed4ff 60%, #7ebef5 100%);
    animation-duration: 22s;
    opacity: 0.95;
}

.cartoon-theme.theme-night .auth-hill {
    background: radial-gradient(circle at 30% 30%, #5aa17a 0%, #3b7c5b 60%, #2f684b 100%);
}

.cartoon-theme.theme-night .auth-hill.hill-2 {
    background: radial-gradient(circle at 30% 30%, #5b6fa5 0%, #42558b 60%, #354574 100%);
}

.auth-trees {
    position: absolute;
    bottom: 110px;
    left: 18px;
    display: flex;
    gap: 10px;
    pointer-events: none;
    z-index: 1;
}

.auth-tree {
    width: 24px;
    height: 36px;
    background: #3ccf7a;
    border-radius: 50% 50% 40% 40%;
    position: relative;
    box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.08);
    animation: treeSway 4s ease-in-out infinite;
}

.auth-tree::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 9px;
    width: 6px;
    height: 12px;
    background: #8d6e63;
    border-radius: 4px;
}

.auth-tree.tree-2 { height: 42px; animation-delay: 0.4s; }
.auth-tree.tree-3 { height: 34px; animation-delay: 0.8s; }

.auth-kite {
    position: absolute;
    top: 120px;
    right: 20%;
    width: 26px;
    height: 26px;
    background: #ff8fab;
    transform: rotate(45deg);
    border-radius: 6px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    animation: kiteFloat 9s ease-in-out infinite;
    z-index: 0;
}

.auth-kite::after {
    content: '';
    position: absolute;
    top: 26px;
    left: 12px;
    width: 2px;
    height: 60px;
    background: rgba(0,0,0,0.15);
    transform: rotate(-45deg);
}

.auth-kite.kite-2 {
    top: 160px;
    right: 32%;
    width: 20px;
    height: 20px;
    background: #ffd166;
    animation-duration: 11s;
    opacity: 0.9;
}

.auth-train-track {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 100%;
    height: 18px;
    background: repeating-linear-gradient(90deg, #b0bec5 0 26px, #90a4ae 26px 40px);
    border-top: 3px solid #6b7b8a;
    z-index: 0;
}

.auth-train {
    position: absolute;
    bottom: 76px;
    left: -180px;
    width: 180px;
    height: 46px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    animation: trainRun 12s linear infinite;
    z-index: 0;
}

.auth-train .wheel {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2c3e50;
}


.auth-links a {
    color: #5a4fcf;
    font-weight: bold;
}

.auth-parent-link {
    margin-top: 10px;
}

.auth-parent-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 14px;
    background: #ffffff;
    color: #2d2f38;
    border: 1px solid rgba(45, 47, 56, 0.2);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-parent-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

@keyframes bubbleFloat {
    0%, 100% { transform: translateY(0); opacity: 0.8; }
    50% { transform: translateY(-20px); opacity: 1; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

@keyframes birdFly {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.05); }
}


@keyframes sunSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes cloudFloat {
    0% { transform: translateX(-40px); }
    100% { transform: translateX(120%); }
}

@keyframes rainbowGlow {
    0%, 100% { opacity: 0.75; transform: scale(1); }
    50% { opacity: 0.95; transform: scale(1.03); }
}

@keyframes balloonFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

@keyframes planeFly {
    0% { transform: translateX(0) translateY(0) rotate(6deg); }
    100% { transform: translateX(120vw) translateY(-40px) rotate(-2deg); }
}

@keyframes hillFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

@keyframes treeSway {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(2deg); }
}

@keyframes kiteFloat {
    0%, 100% { transform: translateY(0) translateX(0) rotate(45deg); }
    50% { transform: translateY(-10px) translateX(6px) rotate(50deg); }
}

@keyframes trainRun {
    0% { transform: translateX(0); }
    100% { transform: translateX(120%); }
}

/* Input Groups */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
    background: white;
    cursor: text;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.password-toggle {
    position: absolute;
    right: 15px;
    top: 38px;
    cursor: pointer;
    font-size: 1.2rem;
    color: #666;
    z-index: 20;
    pointer-events: auto !important;
    padding: 5px;
    user-select: none;
}

.password-toggle:hover {
    color: #667eea;
}

.password-toggle-btn {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #666;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 500px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .auth-logo h1 {
        font-size: 2rem;
    }
}

@media (max-width: 900px) {
    .auth-container {
        grid-template-columns: 1fr;
        padding-top: 80px;
    }

    .auth-illustration {
        order: -1;
    }
}
