/* CyberGuard Academy - Complete Cybersecurity Learning System Styles */

/* ============================================
   CSS Variables & Reset
   ============================================ */
:root {
    --primary-color: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #14b8a6;
    --secondary-color: #1e293b;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;
    --accent-green: #10b981;
    
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-light: #334155;
    --card-bg: rgba(255, 255, 255, 0.98);
    
    --text-dark: #1e293b;
    --text-light: #64748b;
    --text-white: #f8fafc;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --border-radius: 12px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.3);
    
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-white);
}

h1 { font-size: 3rem; margin-bottom: 1rem; }
h2 { font-size: 2.25rem; margin-bottom: 1rem; }
h3 { font-size: 1.75rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }
h5 { font-size: 1.1rem; margin-bottom: 0.5rem; }

p {
    margin-bottom: 1rem;
    color: #cbd5e1;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* ============================================
   Layout
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Header & Hero
   ============================================ */
.hero {
    background: var(--gradient-hero);
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--primary-color);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(13, 148, 136, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.logo-icon {
    font-size: 3rem;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero h1 {
    font-size: 2.75rem;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.tagline {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: 25px;
}

.ethics-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--success);
    padding: 10px 20px;
    border-radius: 30px;
    color: var(--success);
    font-weight: 500;
    margin-bottom: 30px;
}

.badge-icon {
    font-size: 1.25rem;
}

/* ============================================
   Level Navigation
   ============================================ */
.level-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.level-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.level-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* ============================================
   Warning Banner
   ============================================ */
.warning-banner {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
    border: 1px solid var(--warning);
    border-radius: var(--border-radius);
    padding: 24px;
    margin: 40px 0;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.warning-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.warning-content h3 {
    color: var(--warning);
    margin-bottom: 10px;
}

.warning-content p {
    color: #e2e8f0;
    margin-bottom: 0;
}

/* ============================================
   Course Overview / Roadmap
   ============================================ */
.course-overview {
    padding: 40px 0;
}

.course-overview h2 {
    text-align: center;
    margin-bottom: 30px;
}

.roadmap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.roadmap-item {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.roadmap-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.roadmap-item.beginner {
    border-top: 4px solid var(--success);
}

.roadmap-item.intermediate {
    border-top: 4px solid var(--accent-blue);
}

.roadmap-item.advanced {
    border-top: 4px solid var(--accent-purple);
}

.roadmap-item.expert {
    border-top: 4px solid var(--accent-red);
}

.level-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 10px;
}

.roadmap-item h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.roadmap-item p {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 0;
}

/* ============================================
   Level Sections
   ============================================ */
.level-section {
    margin: 60px 0;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.level-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--bg-dark) 100%);
    padding: 30px 40px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.level-badge {
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.level-1 { background: linear-gradient(135deg, #10b981, #059669); }
.level-2 { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.level-3 { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.level-4 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.level-5 { background: linear-gradient(135deg, #ef4444, #dc2626); }
.level-6 { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.level-7 { background: linear-gradient(135deg, #84cc16, #65a30d); }
.level-8 { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.level-9 { background: linear-gradient(135deg, #f97316, #ea580c); }
.level-10 { background: linear-gradient(135deg, #ec4899, #db2777); }

.level-header h2 {
    flex: 1;
    margin-bottom: 0;
}

.difficulty {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.difficulty.beginner {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.difficulty.intermediate {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
}

.difficulty.advanced {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-purple);
}

.difficulty.expert {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
}

.level-content {
    padding: 40px;
}

/* ============================================
   Concepts & Articles
   ============================================ */
.concept {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.concept:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.concept h3 {
    color: var(--primary-light);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.concept h4 {
    color: var(--text-white);
    margin-top: 20px;
    margin-bottom: 10px;
}

.concept p {
    color: #cbd5e1;
}

.key-concepts {
    background: rgba(13, 148, 136, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin-top: 20px;
}

.key-concepts ul {
    list-style: none;
    padding: 0;
}

.key-concepts li {
    padding: 8px 0;
    color: #e2e8f0;
}

.key-concepts li strong {
    color: var(--primary-light);
}

/* ============================================
   Steps & Visual Elements
   ============================================ */
.steps {
    margin: 20px 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 10px;
}

.step-num {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-text {
    color: #e2e8f0;
}

/* ============================================
   Comparison Tables
   ============================================ */
.comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.compare-item {
    padding: 24px;
    border-radius: var(--border-radius);
    border: 1px solid;
}

.compare-item.insecure {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.compare-item.secure {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.compare-item.tcp {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.compare-item.udp {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
}

.compare-item h4 {
    margin-top: 0;
    margin-bottom: 15px;
}

.compare-item.insecure h4 { color: var(--accent-red); }
.compare-item.secure h4 { color: var(--success); }
.compare-item.tcp h4 { color: var(--accent-blue); }
.compare-item.udp h4 { color: var(--accent-purple); }

.compare-item ul {
    list-style: none;
    padding: 0;
}

.compare-item li {
    padding: 8px 0;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.compare-item li:last-child {
    border-bottom: none;
}

/* ============================================
   Tables
   ============================================ */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background: rgba(13, 148, 136, 0.2);
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--primary-light);
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* ============================================
   Code Blocks
   ============================================ */
pre, .code {
    background: #0f172a;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 15px 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

pre code, .code code {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.code.bad {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.code.good {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
}

.vulnerable-example, .secure-example {
    margin: 20px 0;
}

.vulnerable-example h4 {
    color: var(--accent-red);
}

.secure-example h4 {
    color: var(--success);
}

/* ============================================
   Diagrams
   ============================================ */
.diagram {
    background: rgba(13, 148, 136, 0.1);
    border: 1px solid rgba(13, 148, 136, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    font-family: var(--font-mono);
    white-space: pre;
    color: #e2e8f0;
    overflow-x: auto;
}

/* ============================================
   Mini Projects
   ============================================ */
.mini-project {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid rgba(13, 148, 136, 0.2);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-top: 30px;
}

.mini-project h3 {
    color: var(--primary-light);
    margin-bottom: 15px;
}

.project-files {
    margin-top: 20px;
}

.file {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.file h4 {
    color: var(--accent-orange);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-features {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--success);
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin-top: 20px;
}

.project-features h4 {
    color: var(--success);
    margin-top: 0;
}

.project-features ul {
    list-style: none;
    padding: 0;
}

.project-features li {
    padding: 6px 0;
    color: #e2e8f0;
}

/* ============================================
   Tools Section
   ============================================ */
.tools-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tools-section h3 {
    color: var(--primary-light);
    margin-bottom: 20px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tool-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.tool-card:hover {
    background: rgba(13, 148, 136, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.tool-card h4 {
    color: var(--accent-blue);
    margin-top: 0;
    margin-bottom: 10px;
}

.tool-card p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* ============================================
   Example Boxes
   ============================================ */
.example-box, .example-boxes {
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid var(--accent-blue);
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
}

.example-box h5, .example-boxes h5 {
    color: var(--accent-blue);
    margin-top: 0;
}

.example-box ul, .example-boxes ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.example-box li, .example-boxes li {
    padding: 6px 0;
    color: #e2e8f0;
}

/* ============================================
   Sub Concepts
   ============================================ */
.sub-concept {
    margin: 25px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.sub-concept h4 {
    color: var(--primary-light);
    margin-top: 0;
}

/* ============================================
   Firewall Types
   ============================================ */
.firewall-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.type-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.type-card h5 {
    color: var(--accent-orange);
    margin-top: 0;
}

.type-card p {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 0;
}

/* ============================================
   XSS Types
   ============================================ */
.xss-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.xss-type {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 20px;
}

.xss-type h5 {
    color: var(--accent-red);
    margin-top: 0;
}

.xss-type p {
    font-size: 0.9rem;
    color: #cbd5e1;
    margin-bottom: 0;
}

/* ============================================
   Warning Concept
   ============================================ */
.warning-concept {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--border-radius);
    padding: 24px;
}

.warning-concept .concept-header h3 {
    color: var(--accent-orange);
}

/* ============================================
   Mistakes Section
   ============================================ */
.mistakes {
    margin: 20px 0;
}

.mistake {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.mistake h4 {
    margin-top: 0;
    font-size: 1rem;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .level-header {
        padding: 20px;
    }
    
    .level-header h2 {
        font-size: 1.5rem;
    }
    
    .level-content {
        padding: 20px;
    }
    
    .comparison {
        grid-template-columns: 1fr;
    }
    
    .roadmap {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .warning-banner {
        flex-direction: column;
    }
    
    .level-nav {
        flex-direction: column;
    }
    
    .level-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .hero {
        padding: 40px 15px;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.level-section {
    animation: fadeIn 0.5s ease-out;
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ============================================
   Selection
   ============================================ */
::selection {
    background: var(--primary-color);
    color: white;
}

