/* =====================================================
   CompSec Academy - Global Styles
   White Theme with Soft Colors
   ===================================================== */

/* CSS Variables */
:root {
    --primary-color: #2563EB;
    --primary-light: #3B82F6;
    --primary-dark: #1D4ED8;
    --secondary-color: #10B981;
    --secondary-light: #34D399;
    --accent-color: #F59E0B;
    --accent-light: #FBBF24;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --success-color: #10B981;
    
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFC;
    --bg-soft: #F1F5F9;
    --bg-dark: #1E293B;
    
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-light: #94A3B8;
    --text-white: #FFFFFF;
    
    --border-color: #E2E8F0;
    --border-light: #F1F5F9;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

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

/* =====================================================
   Navigation
   ===================================================== */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.75rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--bg-soft);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropbtn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.dropbtn:hover {
    color: var(--primary-color);
    background: var(--bg-soft);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    min-width: 250px;
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-lg);
    padding: 0.5rem 0;
    z-index: 1001;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.dropdown-content a:hover {
    background: var(--bg-soft);
    color: var(--primary-color);
}

.dropdown-content a i {
    width: 20px;
    text-align: center;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

/* =====================================================
   Hero Section
   ===================================================== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
    color: var(--text-white);
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
}

.btn-primary {
    background: var(--bg-white);
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--primary-dark);
}

.btn-secondary {
    background: transparent;
    color: var(--text-white);
    border: 2px solid var(--text-white);
}

.btn-secondary:hover {
    background: var(--text-white);
    color: var(--primary-color);
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Hero Visual */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.security-shield {
    position: relative;
    width: 300px;
    height: 300px;
}

.shield-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary-color);
    box-shadow: var(--shadow-xl);
    z-index: 10;
    animation: pulse 2s ease-in-out infinite;
}

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

.orbital {
    position: absolute;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

.orbital:nth-child(2) { width: 180px; height: 180px; top: 60px; left: 60px; }
.orbital:nth-child(3) { width: 240px; height: 240px; top: 30px; left: 30px; animation-direction: reverse; animation-duration: 25s; }
.orbital:nth-child(4) { width: 300px; height: 300px; top: 0; left: 0; animation-duration: 30s; }

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.node {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--text-white);
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

.node:nth-child(5) { top: 20%; left: 80%; animation-delay: 0s; }
.node:nth-child(6) { top: 80%; left: 20%; animation-delay: 0.5s; }
.node:nth-child(7) { top: 10%; left: 20%; animation-delay: 1s; }
.node:nth-child(8) { top: 80%; left: 80%; animation-delay: 1.5s; }
.node:nth-child(9) { top: 50%; left: 5%; animation-delay: 2s; }

@keyframes blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* =====================================================
   Section Headers
   ===================================================== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.section-header h2 i {
    color: var(--primary-color);
}

.section-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* =====================================================
   Topics Section
   ===================================================== */
.topics-section {
    padding: 5rem 0;
    background: var(--bg-light);
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.topic-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    display: block;
    color: inherit;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.topic-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-white);
    margin-bottom: 1.5rem;
}

.topic-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.topic-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.topic-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.topic-meta i {
    margin-right: 0.25rem;
}

/* =====================================================
   Tools Section
   ===================================================== */
.tools-section {
    padding: 5rem 0;
    background: var(--bg-white);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition-normal);
}

.tool-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.tool-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tool-header i {
    font-size: 1.5rem;
}

.tool-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.tool-content {
    padding: 1.5rem;
}

.tool-content input[type="text"],
.tool-content input[type="number"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition-fast);
}

.tool-content input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.strength-meter {
    height: 8px;
    background: var(--bg-soft);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: var(--transition-normal);
    border-radius: var(--radius-full);
}

.strength-bar.weak { width: 33%; background: var(--danger-color); }
.strength-bar.medium { width: 66%; background: var(--accent-color); }
.strength-bar.strong { width: 100%; background: var(--success-color); }

.strength-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.cipher-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.btn-small {
    flex: 1;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-small:hover {
    background: var(--primary-dark);
}

.cipher-result {
    background: var(--bg-soft);
    padding: 1rem;
    border-radius: var(--radius-md);
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
    margin: 0;
}

.hash-output {
    margin-bottom: 0.75rem;
}

.hash-output label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.hash-output code {
    display: block;
    background: var(--bg-soft);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    word-break: break-all;
}

/* =====================================================
   Glossary Section
   ===================================================== */
.glossary-section {
    padding: 5rem 0;
    background: var(--bg-light);
}

.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.glossary-item {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.glossary-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.glossary-item h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.glossary-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* =====================================================
   Quiz Section
   ===================================================== */
.quiz-section {
    padding: 5rem 0;
    background: var(--bg-white);
}

.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.quiz-question {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.quiz-question h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.quiz-question h3 span {
    background: var(--primary-color);
    color: var(--text-white);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
}

#questionText {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.quiz-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-soft);
}

.quiz-option.selected {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

.quiz-option.correct {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.quiz-option.incorrect {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

.quiz-option input {
    display: none;
}

.quiz-option i {
    width: 20px;
    text-align: center;
}

.quiz-controls {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-light);
}

.quiz-score {
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
}

.quiz-score span {
    color: var(--primary-color);
}

/* =====================================================
   Footer
   ===================================================== */
.footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-white);
}

.footer-section h3 i {
    color: var(--primary-light);
}

.footer-section p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-section h4 {
    color: var(--text-white);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-light);
    transition: var(--transition-fast);
}

.footer-section ul li a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* =====================================================
   Topic Page Styles
   ===================================================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a:hover {
    color: var(--text-white);
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.6);
}

.page-header h1 {
    position: relative;
    z-index: 1;
    margin-bottom: 0.5rem;
}

.page-header p {
    position: relative;
    z-index: 1;
    opacity: 0.9;
    font-size: 1.1rem;
    margin: 0;
}

/* Page Layout */
.page-layout {
    display: grid;
    grid-template-columns: 250px 1fr 280px;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.toc {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.toc h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toc ul {
    list-style: none;
}

.toc ul li {
    margin-bottom: 0.5rem;
}

.toc ul li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.toc ul li a:hover,
.toc ul li a.active {
    background: var(--bg-soft);
    color: var(--primary-color);
}

.toc ul li a i {
    width: 16px;
    text-align: center;
    font-size: 0.75rem;
}

/* Main Content */
.content-area {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.content-area h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-light);
}

.content-area h2:first-child {
    margin-top: 0;
}

.content-area h2 i {
    color: var(--primary-color);
}

.content-area h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.content-area p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-area ul, .content-area ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.content-area li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* Info Boxes */
.info-box {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
}

.info-box i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-box p {
    margin: 0;
}

.definition-box {
    background: rgba(37, 99, 235, 0.08);
    border-left: 4px solid var(--primary-color);
}

.definition-box i {
    color: var(--primary-color);
}

.warning-box {
    background: rgba(245, 158, 11, 0.08);
    border-left: 4px solid var(--accent-color);
}

.warning-box i {
    color: var(--accent-color);
}

.tip-box {
    background: rgba(16, 185, 129, 0.08);
    border-left: 4px solid var(--secondary-color);
}

.tip-box i {
    color: var(--secondary-color);
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead {
    background: var(--bg-soft);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--text-primary);
}

td {
    color: var(--text-secondary);
}

tbody tr:hover {
    background: var(--bg-light);
}

/* Code Blocks */
pre, code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
}

pre {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: 1.5rem 0;
}

code {
    background: var(--bg-soft);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    color: var(--primary-color);
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Right Sidebar */
.right-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.quick-info {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.quick-info h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-info ul {
    list-style: none;
}

.quick-info ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.quick-info ul li:last-child {
    border-bottom: none;
}

.quick-info ul li strong {
    color: var(--text-primary);
}

/* Page Navigation */
.page-nav {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.page-nav h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.nav-buttons a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: var(--bg-soft);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-buttons a:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

.nav-buttons a.next {
    background: var(--primary-color);
    color: var(--text-white);
}

.nav-buttons a.next:hover {
    background: var(--primary-dark);
}

/* Interactive Demos */
.demo-box {
    background: var(--bg-soft);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 1.5rem 0;
    text-align: center;
}

.demo-box h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.demo-input {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto 1rem;
}

.demo-input input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
}

.demo-input input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.demo-button {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.demo-button:hover {
    background: var(--primary-dark);
}

.demo-result {
    background: var(--bg-white);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    font-family: monospace;
}

/* Visual Diagrams */
.diagram-box {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 1.5rem 0;
    text-align: center;
}

.diagram-box svg {
    max-width: 100%;
    height: auto;
}

.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.flow-step {
    background: var(--primary-color);
    color: var(--text-white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
}

.flow-arrow {
    color: var(--text-light);
    font-size: 1.5rem;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-soft);
    z-index: 999;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0;
    transition: width 0.3s ease;
}

/* =====================================================
   Responsive Design
   ===================================================== */
@media (max-width: 1200px) {
    .page-layout {
        grid-template-columns: 220px 1fr;
    }
    
    .right-sidebar {
        display: none;
    }
}

@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        margin: 0 auto 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .security-shield {
        width: 250px;
        height: 250px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .dropdown-content {
        position: static;
        box-shadow: none;
        padding-left: 1rem;
    }
    
    .page-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .content-area {
        padding: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
}
