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

html {
    scroll-behavior: smooth;
}

body {
    background: #0a0e27;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    font-size: 1rem;
    line-height: 1.6;
}

/* ===== TYPOGRAPHY & SPACING ===== */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.3;
}

p {
    margin-bottom: 1rem;
    line-height: 1.8;
    letter-spacing: 0.5px;
}

a {
    color: #00d4ff;
    text-decoration: none;
}

/* ===== NEON EFFECTS ===== */
.neon-text {
    color: #00d4ff;
    text-shadow: 0 0 10px #00d4ff, 0 0 20px #00d4ff, 0 0 40px #00d4ff;
    font-weight: bold;
}

.glow-effect {
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5), inset 0 0 30px rgba(0, 212, 255, 0.1);
    border: 2px solid #00d4ff;
    border-radius: 10px;
    padding: 10px;
}

.image-container {
    max-width: 100%;
    width: 100%;
}

.image-container.glow-effect {
    max-width: 500px;
    margin: 0 auto;
}

.card-image {
    height: 250px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-content .image-container.glow-effect {
    max-width: 400px;
    margin-bottom: 1rem;
}

/* ===== NAVBAR ===== */
.navbar {
    background: linear-gradient(90deg, rgba(10,14,39,0.95) 0%, rgba(0,20,40,0.9) 100%) !important;
    border-bottom: 2px solid #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    padding: 0.5rem 0 !important;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    color: #00d4ff !important;
    text-shadow: 0 0 10px #00d4ff;
}

.navbar-nav .nav-link {
    color: #ffffff !important;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #00d4ff !important;
    text-shadow: 0 0 10px #00d4ff;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, rgba(10,14,39,1) 0%, rgba(0,40,80,0.6) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    border-bottom: 3px solid #00d4ff;
    margin-top: 56px;
    padding: 2rem 0;
}

.hero-section h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    animation: glow-pulse 3s infinite;
    margin-bottom: 1.5rem;
}

.hero-section .lead {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #e0e0e0;
    margin-bottom: 2rem;
    letter-spacing: 0.3px;
}

@keyframes glow-pulse {
    0%, 100% { text-shadow: 0 0 20px #00d4ff, 0 0 40px #00d4ff; }
    50% { text-shadow: 0 0 30px #00d4ff, 0 0 60px #00d4ff, 0 0 80px #ff00ff; }
}

/* ===== BUTTONS ===== */
.btn-neon {
    background: #00d4ff;
    color: #000;
    border: 2px solid #00d4ff;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-neon:hover {
    background: #00d4ff;
    color: #0a0e27;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.8);
    transform: scale(1.05);
}

.btn-outline-light {
    border: 2px solid #ffffff;
    color: #ffffff;
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #00d4ff;
    border-color: #00d4ff;
}

/* ===== HORIZONTAL TILE LAYOUT ===== */
.horizontal-tile {
    display: flex;
    align-items: stretch;
    gap: 20px;
    background: rgba(10, 20, 50, 0.7);
    border: 2px solid #00d4ff;
    border-radius: 10px;
    overflow: hidden;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
    animation: fade-in 0.6s ease-out;
    margin-bottom: 1.5rem;
}

.horizontal-tile:hover {
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.4);
    border-color: #ff00ff;
    background: rgba(20, 40, 80, 0.8);
}

.tile-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 20px;
    border-right: 2px solid rgba(0, 212, 255, 0.3);
}

.tile-text h4 {
    color: #00d4ff;
    text-shadow: 0 0 10px #00d4ff;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    line-height: 1.4;
}

.tile-text p {
    color: #e0e0e0;
    line-height: 1.8;
    font-size: 1rem;
    margin: 0;
    letter-spacing: 0.3px;
}

.tile-image {
    flex: 0 0 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 280px;
}

.tile-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #00d4ff;
    box-shadow: inset 0 0 30px rgba(0, 212, 255, 0.3);
}

/* ===== CHAPTER SECTION ===== */
.chapter-section {
    margin-bottom: 3rem !important;
    padding: 2rem 0;
}

.chapter-section h3 {
    margin-bottom: 2rem !important;
    font-size: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #00d4ff;
    line-height: 1.3;
}

.story-content {
    padding: 1rem 0;
}

/* ===== CARD STYLES ===== */
.story-card {
    background: rgba(10, 20, 50, 0.8) !important;
    border: 2px solid #00d4ff;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.story-card:hover {
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.4) !important;
    border-color: #ff00ff;
    transform: translateY(-5px);
}

.story-card .card-body {
    padding: 1.5rem;
}

.story-card .card-title {
    color: #00d4ff;
    text-shadow: 0 0 10px #00d4ff;
    margin-bottom: 1rem;
}

.story-card p {
    color: #d0d0d0;
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* ===== CHARACTER CARDS ===== */
.character-card {
    background: rgba(10, 20, 50, 0.6);
    border: 2px solid #00d4ff;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.4);
    border-color: #ff00ff;
}

.character-card img {
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 2px solid #00d4ff;
    width: 100%;
    height: auto;
}

.character-card h4 {
    color: #00d4ff;
    text-shadow: 0 0 10px #00d4ff;
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.character-card p {
    color: #b0b0b0;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline-item {
    display: flex;
    margin-bottom: 2rem;
    padding-left: 0;
}

.timeline-marker {
    position: relative;
    width: 40px;
    height: 40px;
    background: #00d4ff;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 2rem;
    top: 0.5rem;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
}

.timeline-content h4 {
    color: #00d4ff;
    text-shadow: 0 0 10px #00d4ff;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: #d0d0d0;
    line-height: 1.7;
    font-size: 1rem;
}

/* ===== SECTION TITLES ===== */
.section-title {
    color: #00d4ff;
    text-shadow: 0 0 10px #00d4ff, 0 0 20px #00d4ff;
    margin-bottom: 2rem;
    font-size: 2rem;
    line-height: 1.2;
}

/* ===== CHAPTER CAROUSEL ===== */
.chapter-carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
}

.chapter-carousel-container {
    flex: 1;
    overflow: hidden;
    border-radius: 15px;
}

.chapter-carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 0;
    scrollbar-width: none;
}

.chapter-carousel::-webkit-scrollbar {
    display: none;
}

.chapter-card {
    flex: 0 0 160px;
    background: rgba(10, 20, 50, 0.9);
    border: 2px solid #00d4ff;
    border-radius: 12px;
    overflow: hidden;
    padding: 1rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.chapter-card:hover {
    transform: scale(1.08) translateY(-8px);
    border-color: #ff00ff;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.6), 0 8px 32px rgba(255, 0, 255, 0.4);
    background: rgba(20, 40, 80, 0.95);
}

.chapter-card-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid #00d4ff;
    margin-bottom: 0.75rem;
    position: relative;
}

.chapter-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.chapter-card:hover .chapter-card-image img {
    transform: scale(1.1);
}

.chapter-card-number {
    font-size: 2rem;
    font-weight: bold;
    color: #00d4ff;
    text-shadow: 0 0 15px #00d4ff;
    margin-bottom: 0.5rem;
}

.chapter-card h4 {
    color: #00d4ff;
    text-shadow: 0 0 10px #00d4ff;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.chapter-card p {
    color: #b0b0b0;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    flex-grow: 1;
    line-height: 1.5;
}

.chapter-link {
    display: inline-block;
    background: #00d4ff;
    color: #0a0e27;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 2px solid #00d4ff;
}

.chapter-link:hover {
    background: transparent;
    color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
}

.chapter-nav-btn {
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid #00d4ff;
    color: #00d4ff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.chapter-nav-btn:hover {
    background: #00d4ff;
    color: #0a0e27;
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.8);
    transform: scale(1.1);
}

.chapter-nav-btn:active {
    transform: scale(0.95);
}

/* ===== ANIMATIONS ===== */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(90deg, rgba(10,14,39,0.95) 0%, rgba(0,20,40,0.9) 100%) !important;
    border-top: 2px solid #00d4ff;
    padding: 2rem 0 !important;
}

footer p {
    color: #b0b0b0;
    margin: 0.5rem 0;
    line-height: 1.6;
}

footer a {
    color: #00d4ff;
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    text-shadow: 0 0 10px #00d4ff;
}

/* ===== RESPONSIVE DESIGN ===== */

/* TABLET - 768px and below */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section .lead {
        font-size: 1.1rem;
    }

    .horizontal-tile {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .tile-text {
        border-right: none;
        border-bottom: 2px solid rgba(0, 212, 255, 0.3);
        padding-right: 0;
        padding-bottom: 1rem;
    }
    
    .tile-text h4 {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }

    .tile-text p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .tile-image {
        flex: 0 0 200px;
        min-width: 200px;
    }
    
    .tile-image img {
        height: 180px;
    }

    .chapter-section h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem !important;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .card-image {
        height: 200px;
    }
}

/* SMALL PHONE - 576px and below */
@media (max-width: 576px) {
    body {
        font-size: 0.95rem;
    }

    .hero-section {
        min-height: 80vh;
        margin-top: 56px;
        padding: 1.5rem 0;
    }

    .hero-section h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-section .lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.75rem !important;
    }

    .btn {
        width: 100%;
    }

    .horizontal-tile {
        padding: 1rem 0.75rem;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .tile-text h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .tile-text p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .tile-image {
        flex: 0 0 160px;
        min-width: 160px;
    }

    .tile-image img {
        height: 150px;
    }

    .chapter-section h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem !important;
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }

    .card-image {
        height: 150px;
    }

    .character-card {
        padding: 1rem;
    }

    .character-card h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .character-card p {
        font-size: 0.9rem;
    }

    .timeline-marker {
        width: 32px;
        height: 32px;
        margin-right: 1rem;
    }

    .timeline-content h4 {
        font-size: 1.1rem;
    }

    .timeline-content p {
        font-size: 0.9rem;
    }

    .image-container.glow-effect {
        max-width: 100%;
    }

    .timeline-content .image-container.glow-effect {
        max-width: 100%;
    }
}

/* VERY SMALL PHONE - 480px and below */
@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .hero-section .lead {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .horizontal-tile {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .tile-text h4 {
        font-size: 1rem;
    }

    .tile-text p {
        font-size: 0.85rem;
    }

    .tile-image {
        flex: 0 0 140px;
        min-width: 140px;
    }

    .tile-image img {
        height: 130px;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .chapter-section h3 {
        font-size: 1.2rem;
    }
}

/* IPHONE SE - 375px and below */
@media (max-width: 375px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .hero-section .lead {
        font-size: 0.9rem;
    }

    .horizontal-tile {
        padding: 0.5rem;
    }

    .tile-text h4 {
        font-size: 0.95rem;
    }

    .tile-text p {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    .tile-image {
        flex: 0 0 120px;
        min-width: 120px;
    }

    .tile-image img {
        height: 110px;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .chapter-carousel-wrapper {
        gap: 1rem;
    }

    .chapter-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .chapter-card {
        flex: 0 0 140px;
        min-height: 260px;
    }

    .chapter-card-image {
        height: 100px;
    }

    .chapter-card-number {
        font-size: 1.5rem;
    }

    .chapter-card h4 {
        font-size: 0.9rem;
    }

    .chapter-card p {
        font-size: 0.75rem;
    }
}

/* MOBILE CAROUSEL ADJUSTMENTS */
@media (max-width: 768px) {
    .chapter-carousel-wrapper {
        gap: 1rem;
    }

    .chapter-card {
        flex: 0 0 140px;
        min-height: 260px;
    }

    .chapter-card-image {
        height: 100px;
    }
}
