:root {
    --bg-color: #050505;
    --card-bg: rgba(255, 255, 255, 0.05);
    --accent-primary: #8a2be2;
    /* BlueViolet */
    --accent-secondary: #00d2ff;
    /* Sky Blue */
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(138, 43, 226, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(0, 210, 255, 0.1) 0%, transparent 40%);
}

header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 2.5rem;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
    font-weight: 300;
}

nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.nav-btn:hover,
.nav-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
}

main {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.section {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CARDS */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    padding: 2rem;
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.author-card h3 {
    color: var(--accent-secondary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.author-card ul {
    list-style: none;
    color: var(--text-secondary);
}

.author-card li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.2rem;
}

.author-card li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

/* ACCORDION */
.accordion {
    margin-top: 1rem;
}

.accordion-item {
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 0.5rem;
}

.accordion-header {
    width: 100%;
    padding: 1rem;
    background: none;
    border: none;
    color: var(--text-primary);
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1rem;
    color: var(--text-secondary);
}

/* BUTTONS */
.primary-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
    text-decoration: none;
    text-align: center;
}

/* LIGHTBOX (ZOOM) */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.lightbox.active {
    display: flex;
}

/* PHOTO GALLERY */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    cursor: zoom-in;
    transition: all 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* CONSIGNES WIDGET */
.consignes-list {
    list-style: none;
    counter-reset: q-counter;
}

.consigne-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    border-left: 4px solid var(--accent-primary);
    position: relative;
    padding-left: 3.5rem;
}

.consigne-item::before {
    counter-increment: q-counter;
    content: "Q" counter(q-counter);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-primary);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 0.8rem;
}

/* RESOURCE LINKS */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.resource-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    text-align: center;
}

.resource-link:hover {
    background: rgba(138, 43, 226, 0.2);
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}

.resource-link span {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.resource-link h4 {
    font-size: 1rem;
}

/* THESIS TUTORIAL STEP */
.step-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.step-number {
    background: var(--accent-secondary);
    color: var(--bg-color);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-details h4 {
    margin-bottom: 0.3rem;
    color: var(--accent-secondary);
}

/* FLASHCARDS */
.flashcard-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    perspective: 1000px;
}

.flashcard {
    height: 200px;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    text-align: center;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: var(--card-bg);
    backdrop-filter: blur(10px);
}

.flashcard-back {
    background: rgba(138, 43, 226, 0.1);
    transform: rotateY(180deg);
    color: var(--accent-secondary);
}

/* QUIZ */
.quiz-container {
    margin-top: 1rem;
}

.option-btn {
    width: 100%;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.option-btn.correct {
    background: rgba(0, 255, 127, 0.2);
    border-color: #00ff7f;
}

.option-btn.wrong {
    background: rgba(255, 69, 0, 0.2);
    border-color: #ff4500;
}

/* TIMER */
.timer-display {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin: 1rem 0;
    font-family: monospace;
    color: var(--accent-secondary);
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* GLOSSARY */
.glossary-item {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.glossary-item b {
    color: var(--accent-primary);
}

/* THESIS MIRROR */
.mirror-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
    overflow: hidden;
}

.mirror-table th,
.mirror-table td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.mirror-table th {
    background: rgba(138, 43, 226, 0.2);
    color: var(--accent-secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.mirror-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* DAY-J CHECKLIST */
.checklist-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(0, 255, 127, 0.05);
    border: 1px solid rgba(0, 255, 127, 0.2);
    border-radius: 12px;
}

.check-item input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
    accent-color: #00ff7f;
}

/* SUBJECT SELECTOR */
.subject-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.sub-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sub-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

footer {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
    }

    .nav-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .gallery {
        grid-template-columns: 1fr 1fr;
    }
}