:root {
    --primary-color: #ff0055;
    --secondary-color: #00ff88;
    --background-color: #121212;
    --text-color: #ffffff;
    --card-color: #1e1e1e;
    --hover-glow: rgba(255, 0, 85, 0.3);
    --secondary-glow: rgba(0, 255, 136, 0.3);
}

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

body {
    font-family: 'Arial', sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(45deg, #0a0a0a, #1a1a1a, #0a0a0a);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.floating-particles {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--secondary-color);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 1; }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.header h1 {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { filter: drop-shadow(0 0 10px var(--primary-color)); }
    to { filter: drop-shadow(0 0 20px var(--secondary-color)); }
}

.header p {
    font-size: 1.3rem;
    opacity: 0.8;
    animation: fadeInUp 1s ease-out 0.5s both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 0.8; transform: translateY(0); }
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.module-card {
    background: var(--card-color);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    animation: cardEntry 0.6s ease-out both;
}

@keyframes cardEntry {
    from { 
        opacity: 0; 
        transform: translateY(50px) scale(0.9);
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
    }
}





.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px;
}

.module-card:hover::before {
    opacity: 0.1;
}

.module-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(255, 0, 85, 0.3);
}

.card-content {
    position: relative;
    z-index: 2;
}

.module-number {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.module-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color);
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

.module-title:hover {
    color: var(--primary-color);
}

.subtopics {
    list-style: none;
    margin-top: 20px;
}

.subtopics li {
    margin-bottom: 12px;
    opacity: 0;
    animation: slideInLeft 0.5s ease-out both;
}

@keyframes slideInLeft {
    from { 
        opacity: 0; 
        transform: translateX(-20px);
    }
    to { 
        opacity: 1; 
        transform: translateX(0);
    }
}



.subtopic-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    padding: 8px 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.subtopic-link::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.subtopic-link:hover::before {
    width: 100%;
}

.subtopic-link:hover {
    color: var(--secondary-color);
    transform: translateX(10px);
}

.subtopic-link::after {
    content: '→';
    margin-left: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.subtopic-link:hover::after {
    opacity: 1;
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    z-index: 1000;
    animation: progressGlow 2s ease-in-out infinite alternate;
}

@keyframes progressGlow {
    from { box-shadow: 0 0 5px var(--primary-color); }
    to { box-shadow: 0 0 15px var(--secondary-color); }
}

.floating-nav {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.nav-dot:hover {
    background: var(--primary-color);
    transform: scale(1.5);
}

.nav-dot.active {
    background: var(--secondary-color);
    transform: scale(1.3);
}

.interactive-demo {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    animation: bounce 2s infinite;
    transition: all 0.3s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.interactive-demo:hover {
    transform: scale(1.1);
    animation: none;
}

.demo-icon {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.search-bar {
    position: relative;
    max-width: 600px;
    margin: 0 auto 50px;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid transparent;
    border-radius: 30px;
    background: var(--card-color);
    color: var(--text-color);
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--hover-glow);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.stats-counter {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 50px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-color);
    animation: countUp 2s ease-out;
}

@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .modules-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .floating-nav {
        display: none;
    }
    
    .stats-counter {
        flex-direction: column;
        gap: 20px;
    }
}

.glow-effect {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 10px var(--primary-color); }
    to { box-shadow: 0 0 30px var(--secondary-color); }
}

/* Article Page Specific Styles */
.article-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(45deg, var(--card-color), rgba(30, 30, 30, 0.8));
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.article-header h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(255, 0, 85, 0.5);
}

.back-button {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s ease-in-out;
}

.back-button:hover {
    transform: translateX(-5px);
    color: var(--primary-color);
}

.article-content {
    background: var(--card-color);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.article-content p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.article-content h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
}

.article-content ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 15px;
}

.article-content ol {
    list-style: decimal;
    margin-left: 20px;
    margin-bottom: 15px;
}

.article-content li {
    margin-bottom: 8px;
}