:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.6);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --emerald: #10b981;
    --emerald-glow: rgba(16, 185, 129, 0.3);
    --cyan: #06b6d4;
    --cyan-glow: rgba(6, 182, 212, 0.3);
    --gold: #fbbf24;
    --gold-glow: rgba(251, 191, 36, 0.5);
    --border: rgba(148, 163, 184, 0.2);
    --shadow: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: rgba(248, 250, 252, 0.9);
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --emerald: #059669;
    --emerald-glow: rgba(5, 150, 105, 0.2);
    --cyan: #0891b2;
    --cyan-glow: rgba(8, 145, 178, 0.2);
    --gold: #d97706;
    --gold-glow: rgba(217, 119, 6, 0.4);
    --border: rgba(148, 163, 184, 0.3);
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Light Mode Hero Background */
[data-theme="light"] .hero {
    background: linear-gradient(
        135deg,
        #f0fdfa 0%,
        #ecfeff 25%,
        #fef3c7 50%,
        #fef3c7 75%,
        #ecfeff 100%
    );
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

[data-theme="light"] .hero-video-background,
[data-theme="light"] .hero-video,
[data-theme="light"] .hero-video-overlay,
[data-theme="light"] .hero-video-fade {
    display: none;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, var(--emerald-glow), transparent 40%),
        radial-gradient(circle at 80% 70%, var(--cyan-glow), transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Navbar */
nav {
    position: sticky;
    top: 0;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
}

.logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.brand-text .the-provident {
    color: var(--text-primary);
}

.brand-text .events {
    color: var(--text-primary);
}

.brand-text .center {
    color: var(--gold);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--emerald);
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.theme-toggle:hover {
    transform: scale(1.05);
    border-color: var(--emerald);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--emerald);
    background: var(--bg-card);
}

/* Hero Section */
.hero {
    padding: 6rem 0 3rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
}

.hero-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
    opacity: 0;
}

.hero-video-fade {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f172a;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.8s ease-in-out;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    width: fit-content;
}

.pill-clickable {
    cursor: pointer;
    color: var(--emerald);
    transition: all 0.3s ease;
}

.pill-clickable:hover {
    background: var(--bg-secondary);
    border-color: var(--emerald);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.pill-clickable svg {
    transition: transform 0.3s ease;
}

.pill-clickable:hover svg {
    transform: scale(1.2);
}

.hero-title {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    animation: glow 3s ease-in-out infinite;
}

.hero-title span {
    display: inline-block;
    opacity: 0;
    animation: slideInUp 0.8s ease-out forwards;
}

.hero-title .the-provident {
    color: #ffffff;
    animation-delay: 0.2s;
}

.hero-title .events {
    color: #ffffff;
    animation-delay: 0.4s;
}

.hero-title .center {
    color: var(--gold);
    animation-delay: 0.6s;
    text-shadow: 0 0 20px var(--gold-glow);
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 10px var(--emerald-glow));
    }
    50% {
        filter: drop-shadow(0 0 20px var(--cyan-glow));
    }
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.hero-tagline {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    font-style: italic;
    margin: -0.5rem 0 0.5rem 0;
    opacity: 0;
    animation: slideInUp 0.8s ease-out 0.8s forwards;
}

.hero-description {
    color: #ffffff;
    font-size: 1.125rem;
    line-height: 1.8;
    max-width: 700px;
    opacity: 0;
    animation: slideInUp 0.8s ease-out 1.0s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tags {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: #ffffff;
    font-size: 0.9rem;
    align-items: center;
    opacity: 0;
    animation: slideInUp 0.8s ease-out 1.2s forwards;
}

/* Alliance Link Hover */
a[href*="allianceindependentauthors"]:hover {
    color: var(--cyan) !important;
    text-decoration: underline;
}

/* Featured Book Section */
.featured-book-section {
    padding: 3rem 0 5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.featured-book-wrapper {
    max-width: 1100px;
    width: 100%;
}

/* Card */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 20px var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--shadow);
}

/* Featured Book Card */
.featured-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 8px 30px var(--shadow);
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 0;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--shadow);
}

.book-cover {
    width: 100%;
    height: 100%;
    min-height: 500px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.featured-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.featured-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.featured-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--emerald);
}

.feature-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
}

.feature-box-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tagline {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.95rem;
}

.starring {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.starring-label {
    color: var(--text-muted);
    font-weight: 600;
}

.disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Sections */
section {
    padding: 4rem 0;
    position: relative;
    z-index: 1;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
}

.section-title .events {
    color: var(--emerald);
}

.section-title .center {
    color: var(--gold);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.chip {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    flex: 1;
    min-width: 200px;
    transition: all 0.3s ease;
}

.chip:hover {
    border-color: var(--emerald);
    transform: translateY(-2px);
}

.chip-title {
    font-weight: 600;
    color: var(--emerald);
    margin-bottom: 0.5rem;
}

.chip-content {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.beyond-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.beyond-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.beyond-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.beyond-item h4 {
    color: var(--cyan);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.book-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tag {
    background: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.synopsis-card {
    padding: 3rem;
}

.synopsis-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 3rem;
    align-items: start;
}

.synopsis-book-image {
    display: flex;
    justify-content: center;
    align-items: start;
}

.synopsis-book-image img {
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.synopsis-book-image img:hover {
    transform: translateY(-10px) scale(1.02);
}

.synopsis-text {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
}

.synopsis-text p {
    margin-bottom: 1.5rem;
}

.media-card {
    aspect-ratio: 16/9;
    background: var(--bg-secondary);
    border-radius: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-muted);
    border: 2px dashed var(--border);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.media-card:hover {
    border-color: var(--emerald);
    transform: translateY(-4px);
}

.media-card-clickable {
    cursor: pointer;
    border: 2px solid var(--border);
    background: var(--bg-card);
}

.media-card-clickable:hover {
    border-color: var(--emerald);
    background: var(--bg-secondary);
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
}

/* Media Cards with Thumbnails */
.media-card-with-thumbnail {
    position: relative;
    overflow: hidden;
    padding: 0;
}

.media-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.4s ease;
}

.media-card-with-thumbnail:hover .media-thumbnail {
    transform: scale(1.08);
}

.media-card-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(
        to bottom,
        rgba(15, 23, 42, 0.7) 0%,
        rgba(15, 23, 42, 0.85) 100%
    );
    transition: background 0.3s ease;
}

.media-card-with-thumbnail:hover .media-card-overlay {
    background: linear-gradient(
        to bottom,
        rgba(16, 185, 129, 0.6) 0%,
        rgba(6, 182, 212, 0.7) 100%
    );
}

.media-card-overlay strong {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.media-card-overlay p {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Video Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    margin: 5% auto;
    padding: 0;
    max-width: 90%;
    max-height: 90vh;
    width: fit-content;
    animation: slideIn 0.3s ease;
}

.modal-content video {
    width: 100%;
    max-height: 85vh;
    border-radius: 1rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #fff;
    font-size: 42px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
}

.modal-close:hover {
    background: var(--emerald);
    border-color: var(--emerald);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.8);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.email-link {
    color: var(--emerald);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.email-link:hover {
    color: var(--cyan);
}

footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Icons */
.icon {
    width: 20px;
    height: 20px;
    display: inline-block;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }

    .featured-book-wrapper {
        max-width: 900px;
    }

    .featured-card {
        grid-template-columns: 1fr 350px;
    }

    .book-cover {
        min-height: 450px;
    }

    .synopsis-card {
        padding: 2.5rem;
    }

    .synopsis-grid {
        grid-template-columns: 300px 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero {
        padding: 3rem 0 2rem 0;
        min-height: 70vh;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-video-overlay {
        background: transparent;
        opacity: 0;
    }

    .featured-book-section {
        padding: 2rem 0 4rem 0;
    }

    .featured-book-wrapper {
        max-width: 100%;
    }

    .featured-card {
        grid-template-columns: 1fr;
    }

    .book-cover {
        min-height: 400px;
        order: -1;
    }

    .featured-content {
        order: 1;
    }

    .featured-buttons {
        flex-direction: column;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .synopsis-card {
        padding: 2rem 1.5rem;
    }

    .synopsis-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .synopsis-book-image img {
        max-width: 300px;
    }

    .nav-links {
        display: none;
    }

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

    .brand {
        font-size: 1rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.65rem 1.25rem;
    }

    .feature-chips {
        flex-direction: column;
    }

    .chip {
        min-width: unset;
    }

    .modal-content {
        margin: 10% auto;
        max-width: 95%;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        font-size: 38px;
        width: 48px;
        height: 48px;
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid rgba(255, 255, 255, 0.7);
    }

    .gallery-arrow {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .gallery-arrow.left {
        left: 10px;
    }

    .gallery-arrow.right {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 60vh;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection colors */
::selection {
    background-color: var(--emerald);
    color: white;
}

::-moz-selection {
    background-color: var(--emerald);
    color: white;
}

/* Gallery Modal */
.gallery-content {
    position: relative;
    max-width: 900px;
    margin: auto;
    padding: 20px;
    background: var(--background);
    border-radius: 10px;
    text-align: center;
}

.gallery-main-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
}

.gallery-thumbnails {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gallery-thumbnails img {
    width: 90px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 5px;
    opacity: 0.7;
    transition: 0.2s;
}

.gallery-thumbnails img:hover,
.gallery-thumbnail-active {
    opacity: 1;
    border: 2px solid var(--emerald);
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    color: white;
    user-select: none;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.gallery-arrow:hover {
    background: rgba(16, 185, 129, 0.9);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.gallery-arrow.left {
    left: 20px;
}

.gallery-arrow.right {
    right: 20px;
}
