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

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

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

.header {
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chapter {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.chapter h2 {
    color: #4ecdc4;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.scientist-insight {
    background: linear-gradient(45deg, #ff6b6b20, #4ecdc420);
    border-left: 4px solid #ff6b6b;
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 10px 10px 0;
    font-style: italic;
}

.context-box {
    background: rgba(76, 205, 196, 0.1);
    border: 1px solid #4ecdc4;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    font-size: 0.9em;
}

.interactive-demo {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.code-block {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    overflow-x: auto;
    position: relative;
}

.code-block pre {
    color: #e0e0e0;
    margin: 0;
}

.python {
    border-left: 4px solid #3776ab;
}

.javascript {
    border-left: 4px solid #f7df1e;
}

.btn {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    margin: 10px 5px;
    transition: transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.visualization {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.array-container {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.array-element {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    min-width: 50px;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
}

.array-element.searching {
    background: linear-gradient(45deg, #ff6b6b, #ee5a6f);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.array-element.found {
    background: linear-gradient(45deg, #51e5ff, #52c4ff);
    transform: scale(1.2);
    box-shadow: 0 0 25px rgba(81, 229, 255, 0.8);
}

.complexity-meter {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.complexity-bar {
    height: 20px;
    background: linear-gradient(90deg, #4ecdc4 0%, #ff6b6b 100%);
    border-radius: 10px;
    position: relative;
    margin: 10px 0;
}

.complexity-indicator {
    position: absolute;
    top: -5px;
    width: 4px;
    height: 30px;
    background: white;
    border-radius: 2px;
    transition: left 0.3s ease;
}

.step-counter {
    text-align: center;
    font-size: 1.2em;
    margin: 10px 0;
    color: #4ecdc4;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #e0e0e0;
    cursor: pointer;
    border-radius: 5px 5px 0 0;
    margin-right: 5px;
}

.tab.active {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 1s infinite;
}