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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
}

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

header {
    background: linear-gradient(90deg, #e94560, #0f3460);
    color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

nav {
    background: linear-gradient(90deg, #0f3460, #16213e);
    padding: 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

nav a:hover {
    background: #e94560;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.section {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.section h2 {
    color: #0f3460;
    border-bottom: 3px solid #e94560;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 2em;
}

.section h3 {
    color: #16213e;
    margin: 20px 0 15px;
    font-size: 1.5em;
}

.section p {
    margin-bottom: 15px;
    text-align: justify;
}

.content-block {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-left: 4px solid #e94560;
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 10px 10px 0;
}

.content-block h4 {
    color: #0f3460;
    margin-bottom: 10px;
}

.code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    overflow-x: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.code-block pre {
    margin: 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.code-block .keyword {
    color: #569cd6;
}

.code-block .string {
    color: #ce9178;
}

.code-block .comment {
    color: #6a9955;
}

.code-block .function {
    color: #dcdcaa;
}

.code-block .number {
    color: #b5cea8;
}

.example-section {
    background: linear-gradient(135deg, #fff5f5, #ffe3e3);
    border: 2px solid #e94560;
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
}

.example-section h3 {
    color: #e94560;
}

.language-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.language-tab {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.language-tab.python {
    background: linear-gradient(135deg, #3776ab, #ffd43b);
    color: white;
}

.language-tab.golang {
    background: linear-gradient(135deg, #00add8, #005f73);
    color: white;
}

.language-tab:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.language-tab.active {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.diagram {
    background: white;
    border: 2px solid #0f3460;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

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

.info-box {
    background: linear-gradient(135deg, #e8f4f8, #d4e5f7);
    border: 2px solid #0f3460;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.info-box.warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-color: #ffc107;
}

.info-box.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: #28a745;
}

ul, ol {
    margin: 15px 0 15px 30px;
}

li {
    margin: 10px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    border: 2px solid #0f3460;
    padding: 12px;
    text-align: left;
}

th {
    background: linear-gradient(135deg, #0f3460, #16213e);
    color: white;
}

tr:nth-child(even) {
    background: #f8f9fa;
}

footer {
    background: linear-gradient(90deg, #16213e, #0f3460);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

footer a {
    color: #e94560;
    text-decoration: none;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #e94560;
    color: white;
    padding: 15px 20px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 5px 20px rgba(233, 69, 96, 0.4);
    transition: all 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.5);
}

.audio-visualizer {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.audio-visualizer canvas {
    width: 100%;
    border-radius: 10px;
}

.math-formula {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    font-family: 'Times New Roman', serif;
    font-size: 1.2em;
}

.algorithm-card {
    background: white;
    border: 2px solid #0f3460;
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.algorithm-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.algorithm-card h4 {
    color: #e94560;
    margin-bottom: 15px;
}

.flowchart {
    background: white;
    border: 3px solid #0f3460;
    border-radius: 15px;
    padding: 30px;
    margin: 25px 0;
}

.comparison-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .section {
        padding: 20px;
    }
}

.interactive-demo {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 15px;
    padding: 30px;
    margin: 25px 0;
    color: white;
}

.interactive-demo h4 {
    margin-bottom: 20px;
}

.interactive-demo button {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 5px;
}

.interactive-demo button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}
