* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Text', Roboto, sans-serif;
    background: #0F0F23;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: white;
    overflow-x: hidden;
}

.header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    gap: 15px;
}

.logo {
    width: 80px;
    height: 40px;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.app-title {
    font-size: 32px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.login-card, .form-card {
    background: rgba(30, 30, 60, 0.8);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
}

.login-card h2, .form-card h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
}

.login-card p, .form-card p {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 30px;
}

.login-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-btn {
    width: 100%;
    border: none;
    padding: 20px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    text-align: left;
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.btn-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.btn-subtitle {
    font-size: 12px;
    opacity: 0.8;
    font-weight: 400;
    margin-top: 2px;
}

.btn-arrow {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    flex-shrink: 0;
}

.kid-login {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
}

.kid-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
}

.guardian-login {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.guardian-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.login-form {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-form.hidden {
    display: none;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.back-btn svg {
    width: 16px;
    height: 16px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(33, 150, 243, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.submit-btn {
    width: 100%;
    border: none;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.submit-btn svg {
    width: 18px;
    height: 18px;
}

.kid-submit {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
}

.kid-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.guardian-submit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.guardian-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 35, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.loading-overlay.hidden {
    display: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    font-size: 16px;
    color: white;
    opacity: 0.8;
}

.error-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #dc2626;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.5);
    font-size: 14px;
    font-weight: 600;
    z-index: 1001;
    animation: slideDown 0.3s ease-out;
}

.error-notification.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .header {
        padding: 20px;
    }
    
    .app-title {
        font-size: 24px;
    }
    
    .logo {
        width: 60px;
        height: 30px;
    }
    
    .login-card, .form-card {
        padding: 30px 25px;
        margin: 0 15px;
    }
    
    .login-card h2, .form-card h2 {
        font-size: 24px;
    }
    
    .login-btn {
        padding: 18px;
    }
    
    .btn-title {
        font-size: 15px;
    }
    
    .btn-subtitle {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .login-card, .form-card {
        padding: 25px 20px;
    }
    
    .login-card h2, .form-card h2 {
        font-size: 22px;
    }
    
    .login-btn {
        padding: 16px;
    }
    
    .btn-content {
        gap: 12px;
    }
    
    .btn-icon {
        width: 20px;
        height: 20px;
    }
    
    .form-group input {
        padding: 10px 14px;
        font-size: 15px;
    }
    
    .submit-btn {
        padding: 14px 18px;
        font-size: 15px;
    }
}