/* Kanjify CSS - Complete Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    min-height: 100vh;
    color: #2c3e50;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-container {
    max-width: 400px;
    width: 100%;
    background: white;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
     padding:10px;
   
}

.screen {
    display: none;
    flex-grow: 1;
    animation: slideIn 0.3s ease;
    text-align: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.screen.active {
    display: flex;
    flex-direction: column;
    position: relative;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Welcome Screen */
.welcome-screen {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;

}

.logo-v1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.logo-kanji {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text {
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
}

.app-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 50px;
    line-height: 1.5;
}

.btn {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: #00cd00;
    color: white;
}
button.btn.btn-secondary {
    color: #536e89;
    border: 1px solid #536e89;
}
.btn-primary:hover {
    background: #2c3e50;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #2c3e50;
}

/* Cookie Consent */
.cookie-consent {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.cookie-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.cookie-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #495057;
    margin-bottom: 15px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-buttons .btn {
    margin-bottom: 0;
    flex: 1;
    padding: 12px;
    font-size: 0.9rem;
}

/* Progress Notification Lightbox */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.notification-box {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 350px;
    margin: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease;
}

.notification-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.notification-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.notification-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #495057;
    margin-bottom: 20px;
}

.notification-countdown {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Dashboard */
.dashboard-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 0px;
    border-radius: 0px;
    margin: 0px;
    text-align: center;
}

.user-welcome {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.user-level {
    font-size: 1rem;
    font-weight: 600;
}

.progress-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.progress-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #34495e, #2c3e50);
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 13px;
    color: #666;
    text-align: center;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.level-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
   
}

.level-completed {
    background: #2c3e50;
    color: white;
}

.level-current {
    background: #34495e;
    color: white;
    box-shadow: 0 0 0 3px rgba(52, 73, 94, 0.3);
}

.level-locked {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

/* Game Screen */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.progressblock {
    display: flex
;
    flex-direction: row;
}
.level-info {
    font-weight: 600;
    font-size: 1.1rem;
}

.card-counter {
    background: #34495e;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.kanji-card {
       background: #f8f9fa;
    border-radius: 20px;
    padding: 20px 0px;
    margin-bottom: 30px;
    border: 3px solid #e9ecef;
}

.kanji-display {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1;
}

.answer-section {
    margin-bottom: 30px;
}

.answer-section h3 {
    margin-bottom: 15px;
    font-weight: 600;
}

.choice-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 20px;
}

.choice-btn {
    width: 50%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.choice-btn:hover {
    border-color: #34495e;
    background: #f8f9fa;
}

.choice-btn.selected {
    border-color: #34495e;
    background: #34495e;
    color: white;
}

.choice-btn.correct {
    border-color: #27ae60;
    background: #27ae60;
    color: white;
}

.choice-btn.incorrect {
    border-color: #e74c3c;
    background: #e74c3c;
    color: white;
}

.choice-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Results Screen */
.results-screen {
    padding-top: 40px;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 3rem;
    font-weight: 700;
    color: white;
}

.score-perfect {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.score-good {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.score-poor {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.result-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.result-subtitle {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
}

.mistakes-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.mistake-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.mistake-kanji {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-right: 15px;
    min-width: 50px;
}

.mistake-details {
    flex: 1;
}

.mistake-correct {
    color: #27ae60;
    font-weight: 500;
}

.mistake-wrong {
    color: #e74c3c;
    text-decoration: line-through;
}

/* AdSense Space */
.adsense-space {
    min-height: 100px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: auto;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #34495e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    
    
    body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    min-height: 100vh;
    color: #2c3e50;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .app-container {
        margin: 0px;
        border-radius: 0px;
        width:100%;
        max-width: 100%;
        padding: 0px;
    }
    
    .kanji-display {
        font-size: 6rem;
    }
    
    .logo-kanji {
        font-size: 3rem;
    }

    .logo-text {
        font-size: 2rem;
    }

    .screen {
        padding: 20px;
    }

    .dashboard-header {
        padding: 20px;
        margin: -20px -20px 20px -20px;
    }
    
}

/* Print Styles */
@media print {
    .btn, .adsense-space {
        display: none;
    }
    
    .app-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}