/* Global Styles for Year 9 Latin 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;
}

/* ==========================================
   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;
}

/* ==========================================
   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;
}

.do-now-btn {
    padding: 0.4rem 0.8rem;
    background: #f0f0f0;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.do-now-btn:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

.do-now-btn.active {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

.do-now-btn.active:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* ==========================================
   COMMON SECTION STYLES
   ========================================== */
.section-title {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* ==========================================
   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-text p:last-child {
    margin-bottom: 0;
}

.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;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #f0f0f0;
    background-color: #fafafa;
    border-radius: 0 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-items {
    display: flex;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    flex: 1;
}

.contact-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.contact-icon {
    font-size: 1.2rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
    flex-shrink: 0;
}

.contact-info {
    flex: 1;
}

.contact-label {
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
}

.contact-value {
    color: #666;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
}

.modal-signature {
    text-align: center;
    margin-top: 1rem;
}

.modal-signature p {
    margin: 0.25rem 0;
    color: #777;
    font-size: 0.9rem;
}

.modal-signature p:last-child {
    color: #333;
}

.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;
}

/* ==========================================
   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;
}

.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-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-top-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.75rem;
}

.vocab-latin {
    font-weight: 600;
    color: #0066ff;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.vocab-info {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
    flex: 1;
    text-align: center;
}

.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;
}

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

.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;
}

/* Scrollbar styling for vocab sidebar */
.vocab-sidebar::-webkit-scrollbar {
    width: 8px;
}

.vocab-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.vocab-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 102, 255, 0.2);
    border-radius: 4px;
}

.vocab-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 102, 255, 0.3);
}

/* ==========================================
   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;
    }

    .nav-section {
        margin-bottom: 0;
    }
}

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

    .dashboard-grid {
        gap: 1rem;
    }

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

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

    .contact-items {
        flex-direction: column;
    }

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

    .lesson-nav {
        flex-direction: column;
    }

    .lesson-nav button {
        width: 100%;
    }
}
