/* Global Styles for Year 9 Greek Course - Classicalia */

/* ==========================================
   RESET AND BASE STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #0066ff 0%, #4d94ff 25%, #e6f0ff 60%, #ffffff 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================================
   GREEK-SPECIFIC TYPOGRAPHY
   ========================================== */
@font-face {
    font-family: 'GFS Neohellenic';
    src: url('https://fonts.googleapis.com/css2?family=GFS+Neohellenic&display=swap');
}

.greek-text {
    font-family: 'GFS Neohellenic', 'Times New Roman', serif;
    font-size: 1.15em;
    letter-spacing: 0.02em;
}

.greek-display {
    font-family: 'GFS Neohellenic', 'Times New Roman', serif;
    font-size: 1.3em;
    color: #0066ff;
    font-weight: 500;
}

/* ==========================================
   BACKGROUND ANIMATIONS
   ========================================== */
.bg-shapes {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 102, 255, 0.05);
    animation: float 20s infinite ease-in-out;
}

.shape1 {
    width: 400px;
    height: 400px;
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.shape2 {
    width: 300px;
    height: 300px;
    bottom: -150px;
    left: -150px;
    animation-delay: 5s;
    background: rgba(0, 102, 255, 0.03);
}

.shape3 {
    width: 250px;
    height: 250px;
    top: 50%;
    right: 10%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ==========================================
   HEADER
   ========================================== */
header {
    position: relative;
    z-index: 10;
    padding: 3rem 2rem 2rem;
    text-align: center;
}

.logo {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #e6f0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -3px;
    margin-bottom: 0.5rem;
    text-shadow: 0 10px 40px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
    display: inline-block;
}

.logo:hover {
    transform: scale(1.02);
}

.logo a {
    text-decoration: none;
    color: inherit;
    background: inherit;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 300;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.author {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

/* ==========================================
   INFO BUTTON
   ========================================== */
.info-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100;
}

.info-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.2);
}

/* ==========================================
   DASHBOARD LAYOUT
   ========================================== */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 5;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 180px 1fr 300px;
    gap: 2rem;
    align-items: start;
}

/* ==========================================
   LEFT SIDEBAR NAVIGATION
   ========================================== */
.left-sidebar {
    padding-top: 1rem;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.nav-link {
    display: block;
    padding: 0.6rem 0;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    margin-left: -0.75rem;
}

.nav-link:hover {
    color: white;
    border-left-color: white;
}

/* ==========================================
   MAIN CONTENT AREA
   ========================================== */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.app-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.app-header {
    background: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-greeting {
    font-size: 1.5rem;
    color: #1a1a1a;
    font-weight: 600;
}

.lesson-nav {
    display: flex;
    gap: 0.5rem;
}

.lesson-nav button {
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.lesson-nav button:hover {
    background: #e0e0e0;
}

.lesson-content {
    padding: 2rem;
}

/* ==========================================
   GREEK ALPHABET SPECIFIC STYLES
   ========================================== */
.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.letter-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.letter-card:hover {
    transform: translateY(-2px);
    border-color: #0066ff;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.15);
}

.letter-card .greek-letter {
    font-size: 2.5rem;
    color: #0066ff;
    font-family: 'GFS Neohellenic', 'Times New Roman', serif;
    margin-bottom: 0.5rem;
    display: block;
}

.letter-card .letter-name {
    font-size: 1rem;
    color: #333;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.letter-card .letter-sound {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

/* ==========================================
   GREEK GRAMMAR TABLES
   ========================================== */
.grammar-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.grammar-table th {
    background: linear-gradient(135deg, #0066ff 0%, #4d94ff 100%);
    color: white;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.grammar-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.grammar-table .greek-text {
    color: #0066ff;
    font-weight: 500;
}

.grammar-table tr:hover {
    background: #f8f9fa;
}

/* ==========================================
   EXERCISE SECTIONS
   ========================================== */
.exercise-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.exercise-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.exercise-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.exercise-item:hover {
    border-color: #0066ff;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.1);
}

.exercise-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    background: #0066ff;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: 600;
    margin-right: 1rem;
}

.exercise-greek {
    font-family: 'GFS Neohellenic', 'Times New Roman', serif;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.exercise-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.exercise-input:focus {
    outline: none;
    border-color: #0066ff;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.check-answer-btn {
    padding: 0.5rem 1rem;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.check-answer-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.feedback {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.feedback.correct {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ==========================================
   RIGHT SIDEBAR
   ========================================== */
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ==========================================
   COMMON WIDGETS
   ========================================== */
.widget {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.widget h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.widget p {
    color: #666;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* ==========================================
   PROGRESS/CHECKLIST WIDGET
   ========================================== */
.progress-widget {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.checklist-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s ease;
    flex: 1;
}

.checklist-item:hover {
    background: #f0f7ff;
}

.checklist-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0066ff;
}

/* ==========================================
   VOCABULARY SIDEBAR
   ========================================== */
.vocab-sidebar {
    position: fixed;
    right: -420px;
    top: 0;
    width: 420px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 500;
    overflow-y: auto;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.vocab-sidebar.open {
    right: 0;
}

.vocab-header {
    padding: 2rem 1.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(0, 102, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vocab-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #0066ff, #4d94ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.vocab-list {
    padding: 1rem;
}

.vocab-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 102, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    cursor: default;
}

.vocab-item:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.08);
    border-color: rgba(0, 102, 255, 0.2);
}

.vocab-greek {
    font-family: 'GFS Neohellenic', 'Times New Roman', serif;
    font-weight: 600;
    color: #0066ff;
    font-size: 1.2rem;
    letter-spacing: 0.02em;
}

.vocab-info {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

.vocab-english {
    color: #333;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* ==========================================
   MODAL STYLES
   ========================================== */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 3% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.modal-header {
    padding: 1.5rem 2rem 1rem 2rem;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
}

.modal-body {
    display: flex;
    gap: 2rem;
    padding: 1rem 2rem;
    align-items: flex-start;
}

.modal-text {
    flex: 2;
}

.modal-text p {
    margin: 0 0 1rem 0;
    line-height: 1.5;
    color: #555;
    font-size: 0.9rem;
}

.modal-image {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.modal-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e0e0e0;
}

.close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: #333;
    background-color: #f0f0f0;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .left-sidebar {
        display: flex;
        gap: 3rem;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 12px;
    }

    .alphabet-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

@media (max-width: 768px) {
    .logo {
        font-size: 3rem;
    }

    .dashboard-grid {
        gap: 1rem;
    }

    .left-sidebar {
        flex-direction: column;
        gap: 1rem;
    }

    .alphabet-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }

    .letter-card .greek-letter {
        font-size: 2rem;
    }

    .modal-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .info-btn {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

/* ==========================================
   VOCABULARY TOGGLE BUTTON
   ========================================== */
.vocab-toggle {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    padding: 0.85rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #0066ff;
    border: 1px solid rgba(0, 102, 255, 0.2);
    border-radius: 28px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 400;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vocab-toggle:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 102, 255, 0.25);
    border-color: rgba(0, 102, 255, 0.3);
}

.vocab-toggle.hidden {
    right: -200px;
}

.close-sidebar {
    background: rgba(0, 102, 255, 0.05);
    border: 1px solid rgba(0, 102, 255, 0.1);
    color: #0066ff;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-sidebar:hover {
    background: rgba(0, 102, 255, 0.1);
    transform: scale(1.05);
}

.vocab-controls {
    padding: 1.5rem;
    background: rgba(248, 249, 250, 0.5);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.vocab-controls input {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    background: white;
    border: 1px solid rgba(0, 102, 255, 0.15);
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.vocab-controls input:focus {
    outline: none;
    border-color: #0066ff;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.vocab-controls select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid rgba(0, 102, 255, 0.15);
    border-radius: 12px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vocab-controls select:focus {
    outline: none;
    border-color: #0066ff;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.vocab-top-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.75rem;
}

.vocab-chapter {
    font-size: 0.7rem;
    color: #0066ff;
    background: rgba(0, 102, 255, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}
