/* CSS Variables for Theme Switching */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #213547;
    --text-secondary: #666;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --accent-color: #646cff;
    --accent-hover: #747bff;
    --section-bg: #f8f9fa;
    --section-border: #e9ecef;
    --unavailable-bg: #fff3cd;
    --unavailable-text: #856404;
    --unavailable-border: #ffeaa7;
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --text-primary: rgba(255, 255, 255, 0.87);
    --text-secondary: #aaa;
    --card-bg: #2a2a2a;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --accent-color: #535bf2;
    --accent-hover: #646cff;
    --section-bg: #242424;
    --section-border: #333;
    --unavailable-bg: #332701;
    --unavailable-text: #ffd54f;
    --unavailable-border: #665c00;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--accent-color), #af47ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: center;
}

.theme-toggle {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: var(--card-shadow);
}

.theme-toggle:hover {
    background: var(--accent-color);
    color: white;
}

/* Section Styles */
section {
    margin-bottom: 4rem;
    padding: 2.5rem;
    background: var(--section-bg);
    border-radius: 16px;
    border: 1px solid var(--section-border);
}

.section-description {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Activity Registry Section */
.activity-registry {
    text-align: center;
}

.activity-button {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(238, 90, 82, 0.3);
    border: none;
    cursor: pointer;
}

.activity-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(238, 90, 82, 0.4);
    background: linear-gradient(135deg, #ff5252, #e53935);
}

/* Unavailable Message Style */
.activity-unavailable {
    display: inline-block;
    background: var(--unavailable-bg);
    color: var(--unavailable-text);
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    border: 2px solid var(--unavailable-border);
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

/* Free Course Materials Section */
.free-course-materials {
    background: transparent;
    border: none;
    padding: 0;
}

/* Flexbox Grid Layout */
.folders-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.folder-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    flex: 1 1 300px;
    max-width: 350px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(100, 108, 255, 0.1);
}

.folder-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.folder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.folder-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.folder-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.folder-link {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
}

.folder-link:hover {
    background: var(--accent-hover);
}

.download-link {
    background: #10b981;
}

.download-link:hover {
    background: #059669;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .folder-card {
        flex: 1 1 100%;
    }

    .activity-button,
    .activity-unavailable {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    section {
        padding: 1.25rem;
    }

    .activity-unavailable {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
}
