* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', 'Consolas', monospace;
    background: linear-gradient(135deg, #0a0e27 0%, #0d1117 50%, #050a1f 100%);
    color: #00d9ff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Cybernetic grid background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 217, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* Animated particles background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(0, 217, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
    animation: float 15s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(100px); opacity: 0; }
}

/* Navigation */
nav {
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.3), 0 0 40px rgba(0, 217, 255, 0.1);
    border-bottom: 2px solid rgba(0, 217, 255, 0.5);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00d9ff;
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.8), 0 0 40px rgba(0, 217, 255, 0.4);
    margin-bottom: 1rem;
    cursor: pointer;
    transition: transform 0.3s;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.logo:hover {
    transform: scale(1.05);
    text-shadow: 0 0 30px rgba(0, 217, 255, 1), 0 0 60px rgba(0, 217, 255, 0.6);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
}

.nav-links a {
    color: #00d9ff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 217, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.nav-links a:hover::before {
    width: 200%;
    height: 200%;
}

.nav-links a:hover, .nav-links a.active {
    border-color: #00d9ff;
    background: rgba(0, 217, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.hieroglyph-border {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(0, 217, 255, 0.05));
    border: 3px solid #00d9ff;
    border-radius: 20px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    animation: glowPulse 3s infinite;
}

.hieroglyph-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00d9ff, #0066ff, #00d9ff);
    border-radius: 20px;
    z-index: -1;
    filter: blur(10px);
    opacity: 0.3;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 30px rgba(0, 217, 255, 0.4), inset 0 0 30px rgba(0, 217, 255, 0.1); }
    50% { box-shadow: 0 0 60px rgba(0, 217, 255, 0.8), inset 0 0 60px rgba(0, 217, 255, 0.2); }
}

.hero h1 {
    font-size: 3.5rem;
    color: #00d9ff;
    text-shadow: 0 0 30px rgba(0, 217, 255, 1), 0 0 60px rgba(0, 217, 255, 0.5);
    margin-bottom: 1rem;
    animation: titleFloat 3s ease-in-out infinite;
    letter-spacing: 4px;
    text-transform: uppercase;
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero p {
    font-size: 1.3rem;
    color: #66e0ff;
    opacity: 0.9;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

/* Cards */
.card {
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.9), rgba(13, 17, 23, 0.8));
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 217, 255, 0.2);
    transition: all 0.4s;
    backdrop-filter: blur(10px);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00d9ff, transparent);
    animation: scanline 3s linear infinite;
}

@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 217, 255, 0.4), 0 0 30px rgba(0, 217, 255, 0.3);
    border-color: rgba(0, 217, 255, 0.6);
}

.card h2 {
    color: #00d9ff;
    font-size: 2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.card h3 {
    color: #00d9ff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card p {
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #66e0ff;
}

.tips-list {
    list-style: none;
    padding-left: 0;
}

.tips-list li {
    padding: 1rem;
    margin: 0.5rem 0;
    background: rgba(0, 217, 255, 0.1);
    border-left: 4px solid #00d9ff;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.1);
}

.tips-list li:hover {
    background: rgba(0, 217, 255, 0.2);
    transform: translateX(10px);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

/* Grid layouts */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.nav-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.pyramid-card, .challenge-card {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.15), rgba(0, 102, 255, 0.1));
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.pyramid-card::before, .challenge-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 217, 255, 0.2), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
}

.pyramid-card:hover::before, .challenge-card:hover::before {
    top: 100%;
    left: 100%;
}

.pyramid-card:hover, .challenge-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 50px rgba(0, 217, 255, 0.5), 0 0 40px rgba(0, 217, 255, 0.3);
    border-color: #00d9ff;
}

.pyramid-top {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
    color: #00d9ff;
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.8);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.pyramid-card h3, .challenge-card h3 {
    color: #00d9ff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pyramid-card p, .challenge-card p {
    color: #66e0ff;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-arrow {
    color: #00d9ff;
    font-weight: bold;
    display: inline-block;
    transition: transform 0.3s;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.pyramid-card:hover .card-arrow {
    transform: translateX(10px);
}

/* Oracle quotes */
.oracle-quote {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.2), rgba(0, 217, 255, 0.1));
    border-left: 5px solid #00d9ff;
    padding: 1.5rem;
    border-radius: 10px;
    font-style: italic;
    position: relative;
    transition: all 0.3s;
    cursor: pointer;
    margin-top: 1rem;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.1);
}

.oracle-quote:hover {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.3), rgba(0, 217, 255, 0.15));
    transform: translateX(10px);
    box-shadow: 0 0 25px rgba(0, 217, 255, 0.3);
}

.oracle-quote::before {
    content: '//';
    font-size: 3rem;
    position: absolute;
    top: -10px;
    left: 10px;
    color: rgba(0, 217, 255, 0.3);
    font-family: 'Courier New', monospace;
    font-style: normal;
}

.oracle-quote strong {
    color: #00d9ff;
    font-size: 1.2rem;
    text-shadow: 0 0 5px rgba(0, 217, 255, 0.5);
}

/* Footer */
footer, .egyptian-footer {
    background: rgba(10, 14, 39, 0.95);
    border-top: 2px solid rgba(0, 217, 255, 0.5);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    box-shadow: 0 -4px 20px rgba(0, 217, 255, 0.3);
}

footer p {
    color: #00d9ff;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

/* Interactive elements */
.decoder-demo {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(0, 217, 255, 0.1);
    border-radius: 15px;
    border: 2px solid rgba(0, 217, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.2);
}

.decoder-input, textarea, input[type="text"], input[type="number"] {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid #00d9ff;
    border-radius: 10px;
    background: rgba(10, 14, 39, 0.8);
    color: #00d9ff;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.2);
}

.decoder-input:focus, textarea:focus, input[type="text"]:focus, input[type="number"]:focus {
    outline: none;
    border-color: #00d9ff;
    box-shadow: 0 0 25px rgba(0, 217, 255, 0.5);
}

.decoder-output, .output {
    padding: 1rem;
    background: rgba(10, 14, 39, 0.9);
    border-radius: 10px;
    border: 2px solid #00d9ff;
    min-height: 60px;
    font-family: 'Courier New', monospace;
    color: #00d9ff;
    font-size: 1.2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    word-wrap: break-word;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3), inset 0 0 20px rgba(0, 217, 255, 0.1);
}

.demo-buttons, .button-row {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.demo-btn, .egyptian-btn {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #00d9ff, #0066ff);
    color: #0a0e27;
    border: 2px solid #00d9ff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    flex: 1;
    min-width: 120px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
}

.demo-btn:hover, .egyptian-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.6), 0 0 30px rgba(0, 217, 255, 0.4);
    background: linear-gradient(135deg, #0066ff, #00d9ff);
}

.egyptian-btn.large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

/* Difficulty badges */
.difficulty {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: bold;
    border: 2px solid;
    text-transform: uppercase;
}

.easy { 
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
    color: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.medium { 
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.hard { 
    background: rgba(255, 0, 102, 0.2);
    border-color: #ff0066;
    color: #ff0066;
    box-shadow: 0 0 10px rgba(255, 0, 102, 0.3);
}

/* Example boxes */
.example-box, .cipher-text {
    background: rgba(0, 217, 255, 0.15);
    border: 2px solid rgba(0, 217, 255, 0.4);
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.2);
}

.cipher-text {
    font-weight: bold;
    letter-spacing: 2px;
    text-align: center;
    color: #00d9ff;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

/* Instruction grid */
.instruction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.instruction-step {
    text-align: center;
    padding: 1rem;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #00d9ff, #0066ff);
    color: #0a0e27;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
    border: 3px solid rgba(0, 217, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 25px;
    background: rgba(10, 14, 39, 0.6);
    border: 3px solid rgba(0, 217, 255, 0.5);
    border-radius: 15px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d9ff, #0066ff, #00d9ff);
    transition: width 0.5s;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.8), inset 0 0 10px rgba(0, 217, 255, 0.5);
}

/* Quiz elements */
.quiz-option {
    background: rgba(0, 217, 255, 0.1);
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.1);
}

.quiz-option:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: #00d9ff;
    transform: translateX(10px);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.quiz-option.selected {
    border-color: #00d9ff;
    background: rgba(0, 217, 255, 0.3);
    box-shadow: 0 0 25px rgba(0, 217, 255, 0.4);
}

.quiz-option.correct {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.4);
}

.quiz-option.incorrect {
    background: rgba(255, 0, 102, 0.2);
    border-color: #ff0066;
    box-shadow: 0 0 25px rgba(255, 0, 102, 0.4);
}

.sphinx-question {
    color: #00d9ff;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.quiz-boxes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.quiz-box {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.15), rgba(0, 102, 255, 0.1));
    border: 3px solid rgba(0, 217, 255, 0.3);
    border-radius: 15px;
    padding: 2rem;
    text-decoration: none;
    color: #66e0ff;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.2);
}

.quiz-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #00d9ff, #0066ff, #00d9ff);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.8);
}

.quiz-box:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 217, 255, 0.5), 0 0 40px rgba(0, 217, 255, 0.3);
    border-color: #00d9ff;
}

.quiz-box-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    color: #00d9ff;
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.8);
}

.quiz-box-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px dashed rgba(0, 217, 255, 0.3);
}

.quiz-arrow {
    color: #00d9ff;
    font-weight: bold;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

/* Video frames */
.video-frame {
    border: 4px solid rgba(0, 217, 255, 0.5);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 217, 255, 0.3);
    margin-top: 1rem;
}

.video-frame iframe {
    width: 100%;
    height: 400px;
    border: none;
}

/* Textbook specific */
.anyflip-container {
    margin: 2rem 0;
}

.anyflip-container iframe {
    width: 100%;
    min-height: 600px;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.3);
}

/* Fact box */
.fact-box {
    background: rgba(0, 217, 255, 0.15);
    border: 2px solid rgba(0, 217, 255, 0.4);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.2);
}

/* Scroll text */
.scroll-text {
    color: #66e0ff;
    line-height: 1.6;
}

/* Responsive design */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .nav-links { justify-content: center; }
    .grid { grid-template-columns: 1fr; }
    .demo-buttons, .button-row { flex-direction: column; }
    .instruction-grid { grid-template-columns: 1fr; }
    .quiz-boxes-grid { grid-template-columns: 1fr; }
    
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
}