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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8fafc;
}

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

/* Navigation */
.navbar {
    background: #1a202c;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.nav-logo h2 {
    color: #e2e8f0;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #3b82f6;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    margin-top: 60px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fbbf24;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Sections */
.section {
    padding: 80px 0;
}

.alt-bg {
    background: white;
}

.section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1a202c;
}

/* Timeline Section */
.timeline-section {
    background: #1a202c;
    color: white;
    padding: 80px 0;
}

.timeline-section h2 {
    color: white;
}

.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: #3b82f6;
}

.timeline-event {
    position: relative;
    margin: 3rem 0;
    display: flex;
    align-items: center;
}

.timeline-event:nth-child(odd) {
    justify-content: flex-end;
}

.timeline-event:nth-child(even) {
    justify-content: flex-start;
}

.timeline-content {
    background: #2d3748;
    padding: 1.5rem;
    border-radius: 12px;
    width: 45%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border: 4px solid #1a202c;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.timeline-event:nth-child(odd) .timeline-content::before {
    left: -10px;
}

.timeline-event:nth-child(even) .timeline-content::before {
    right: -10px;
}

.timeline-year {
    font-size: 1.2rem;
    font-weight: 600;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-description {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Era Cards */
.era-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.era-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s, box-shadow 0.3s;
}

.era-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.era-card h3 {
    color: #1a202c;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.era-card p {
    color: #4a5568;
    margin-bottom: 1.5rem;
}

/* Interactive Demos */
.interactive-demo {
    margin-top: 1.5rem;
}

.demo-controls {
    margin-bottom: 1.5rem;
}

.demo-controls label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.demo-controls input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.demo-controls input:focus {
    outline: none;
    border-color: #3b82f6;
}

.demo-controls input[type="range"] {
    width: calc(100% - 60px);
    display: inline-block;
    margin-right: 10px;
}

.demo-result {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.result-box {
    margin-bottom: 0.5rem;
}

.result-box:last-child {
    margin-bottom: 0;
}

/* Caesar Cipher Wheel */
.alphabet-wheel {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    position: relative;
    height: 300px;
}

.wheel-outer, .wheel-inner {
    position: absolute;
    border: 3px solid #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-outer {
    width: 280px;
    height: 280px;
    background: #e2e8f0;
}

.wheel-inner {
    width: 200px;
    height: 200px;
    background: #3b82f6;
    color: white;
    transition: transform 0.5s ease;
}

.wheel-letter {
    position: absolute;
    font-weight: bold;
    font-size: 14px;
}

/* Enigma Machine */
.enigma-machine {
    background: #2d3748;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.enigma-rotors {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.rotor {
    width: 80px;
    height: 100px;
    background: #4a5568;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #718096;
}

.rotor-position {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.enigma-keyboard {
    margin-bottom: 2rem;
}

.key-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.enigma-key {
    width: 40px;
    height: 40px;
    background: #e2e8f0;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.enigma-key:hover {
    background: #cbd5e0;
    transform: translateY(-1px);
}

.enigma-key:active {
    background: #3b82f6;
    color: white;
    transform: translateY(1px);
}

.enigma-lampboard {
    margin-bottom: 1rem;
}

.lamp-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.lamp {
    width: 40px;
    height: 40px;
    background: #1a202c;
    border: 2px solid #4a5568;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-weight: bold;
    transition: all 0.3s;
}

.lamp.active {
    background: #fbbf24;
    color: #1a202c;
    box-shadow: 0 0 20px #fbbf24;
}

.enigma-output {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
}

.output-display {
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
}

/* Vigenère Demo */
.vigenere-table {
    overflow-x: auto;
    margin: 1rem 0;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.vigenere-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.vigenere-table th,
.vigenere-table td {
    padding: 0.3rem;
    text-align: center;
    border: 1px solid #e2e8f0;
    min-width: 25px;
}

.vigenere-table th {
    background: #3b82f6;
    color: white;
    font-weight: bold;
}

.vigenere-table .highlight {
    background: #fbbf24 !important;
    font-weight: bold;
}

/* RSA Demo */
.rsa-key-generation {
    margin-bottom: 2rem;
}

.key-steps {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.step {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.step:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.primes {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.calculation {
    font-family: 'Courier New', monospace;
    background: white;
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    border: 1px solid #e2e8f0;
}

/* AES Demo */
.aes-visual {
    text-align: center;
}

.aes-rounds {
    margin-bottom: 2rem;
}

.round-visualization {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.aes-round {
    width: 60px;
    height: 60px;
    background: #e2e8f0;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s;
}

.aes-round.active {
    background: #3b82f6;
    color: white;
    transform: scale(1.1);
}

.aes-arrow {
    font-size: 1.5rem;
    color: #718096;
}

/* Quantum Demo */
.bb84-protocol {
    text-align: center;
}

.photon-transmission {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 2rem;
    background: #f7fafc;
    border-radius: 12px;
}

.alice-side, .bob-side {
    flex: 1;
    text-align: center;
}

.quantum-channel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photon-beam {
    font-size: 2rem;
    color: #3b82f6;
    animation: photonMove 2s infinite linear;
}

@keyframes photonMove {
    0% { transform: translateX(-20px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(20px); opacity: 0; }
}

.quantum-bits {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.quantum-bit {
    width: 30px;
    height: 30px;
    background: #e2e8f0;
    border: 2px solid #cbd5e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

.quantum-bit.one {
    background: #3b82f6;
    color: white;
}

.quantum-bit.zero {
    background: #ef4444;
    color: white;
}

.basis-choice {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.basis {
    width: 30px;
    height: 30px;
    background: #fbbf24;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    border-radius: 4px;
}

.key-sifting {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.sifting-result {
    font-family: 'Courier New', monospace;
    background: #f7fafc;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
}

/* Post-Quantum Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.comparison-table th,
.comparison-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.comparison-table th {
    background: #f7fafc;
    font-weight: 600;
}

/* Buttons */
button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s, transform 0.2s;
}

button:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Steganography Demo */
.steganography-demo {
    text-align: center;
}

.visible-text {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.hidden-text {
    background: #fbbf24;
    color: #1a202c;
    padding: 1rem;
    border-radius: 8px;
    font-weight: bold;
    animation: reveal 0.5s ease-in;
}

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

/* Scytale Demo */
.scytale-demo {
    text-align: center;
}

.scytale-visual {
    position: relative;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rod {
    width: 200px;
    height: 20px;
    background: #8b4513;
    border-radius: 10px;
    position: relative;
}

.parchment {
    position: absolute;
    background: #f5deb3;
    padding: 0.5rem;
    border: 1px solid #daa520;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    transform: rotate(-5deg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Footer */
.footer {
    background: #1a202c;
    color: #e2e8f0;
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .era-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .photon-transmission {
        flex-direction: column;
        gap: 2rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    .timeline-content {
        width: 80%;
    }
    
    .timeline-line {
        left: 20px;
    }
    
    .timeline-event {
        justify-content: flex-start !important;
        margin-left: 40px;
    }
    
    .timeline-content::before {
        left: -30px !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .era-card {
        padding: 1.5rem;
    }
}