@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --ocean-surface: #0a73b9;
    --ocean-mid: #054576;
    --ocean-deep: #020f26;
    --text-main: #ffffff;
    --text-muted: #a3c9e2;
    --accent: #00f2fe;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
}

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

body {
    background: linear-gradient(180deg, var(--ocean-surface) 0%, var(--ocean-mid) 40%, var(--ocean-deep) 100%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; }

/* SVG Background Animations */
.svg-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: -1;
}

.jellyfish {
    position: absolute;
    animation: float 12s ease-in-out infinite;
    opacity: 0.6;
}

.jelly1 { top: 20%; left: 10%; width: 120px; animation-delay: 0s; }
.jelly2 { top: 50%; right: 15%; width: 80px; animation-delay: -5s; }
.jelly3 { bottom: 10%; left: 30%; width: 150px; animation-delay: -2s; opacity: 0.4; }

.manta {
    position: absolute;
    top: 30%; right: -200px;
    width: 200px;
    opacity: 0.3;
    animation: swim 25s linear infinite;
}

.bubble {
    position: absolute;
    bottom: -50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: rise infinite ease-in;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

@keyframes swim {
    0% { transform: translateX(0) translateY(0) rotate(-10deg); }
    50% { transform: translateX(-60vw) translateY(50px) rotate(-5deg); }
    100% { transform: translateX(-120vw) translateY(0) rotate(-10deg); }
}

@keyframes rise {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translateY(-100vh) scale(1.5); opacity: 0; }
}

/* Nav */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
}
.logo svg { width: 30px; fill: var(--accent); }

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }

/* Hero */
.hero {
    position: relative;
    padding: 6rem 5% 4rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0, 242, 254, 0.3);
}

.hero h1 span { color: var(--accent); }

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.btn {
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent);
    color: var(--ocean-deep);
    box-shadow: 0 10px 20px rgba(0, 242, 254, 0.3);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 242, 254, 0.5);
    background: #fff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

/* Sections */
.container {
    padding: 0 5% 5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
}
.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 4rem;
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 6rem;
}
.feature-box {
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    transition: transform 0.3s;
}
.feature-box:hover {
    transform: translateY(-5px);
    border-color: rgba(0,242,254,0.3);
}
.feature-icon {
    width: 70px; height: 70px;
    background: rgba(0,242,254,0.1);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent);
}
.feature-icon svg { width: 35px; height: 35px; fill: currentColor; }
.feature-box h3 { font-size: 1.4rem; margin-bottom: 1rem; }
.feature-box p { color: var(--text-muted); line-height: 1.6; }

/* Enhanced Theme Cards */
.theme-registry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}
.theme-registry-header .title-wrap { display: flex; align-items: center; gap: 15px;}
.theme-registry-header h2 { font-size: 2.5rem; font-weight: 800; margin: 0; }
.theme-count {
    background: var(--accent);
    color: var(--ocean-deep);
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.1rem;
}

/* Compact Registry List (Replaces Cards) */
.theme-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.theme-row {
    display: flex;
    align-items: center;
    background: rgba(5, 15, 31, 0.4);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1.2rem 2rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.theme-row:hover {
    background: rgba(5, 15, 31, 0.8);
    border-color: rgba(0,242,254,0.3);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.row-main { 
    width: 25%; 
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
}

.row-header { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.row-title { 
    font-size: 1.3rem; 
    font-weight: 700; 
    color: #fff; 
    margin: 0; 
}

.row-badge { 
    background: rgba(0,242,254,0.1); 
    color: var(--accent); 
    font-size: 0.75rem; 
    font-weight: 800; 
    padding: 2px 8px; 
    border-radius: 6px; 
    border: 1px solid rgba(0,242,254,0.2);
}

.row-author { 
    font-size: 0.85rem; 
    color: #5a6b82; 
}

.row-desc { 
    width: 40%; 
    color: #a3c9e2; 
    font-size: 0.95rem; 
    line-height: 1.4; 
    padding-right: 2rem; 
}

.row-meta { 
    width: 10%; 
    color: #8c9baf; 
    font-size: 0.85rem; 
    font-weight: 600; 
    display: flex;
    align-items: center;
    gap: 6px;
}

.row-action { 
    width: 25%; 
    display: flex; 
    justify-content: flex-end; 
    gap: 10px;
}

.btn-media {
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: var(--accent);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-media:hover {
    background: var(--accent);
    color: #020f26;
}

.btn-media svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.btn-row-copy {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex; 
    align-items: center; 
    gap: 8px;
    transition: all 0.2s;
}

.btn-row-copy:hover {
    background: var(--accent);
    color: #020f26;
    border-color: var(--accent);
}

.btn-row-copy svg { 
    width: 16px; 
    height: 16px;
    fill: currentColor; 
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.page-btn.active {
    background: var(--accent);
    color: #020f26;
    border-color: var(--accent);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .theme-row { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 1.2rem; 
        padding: 1.5rem;
    }
    .row-main, .row-desc, .row-meta, .row-action { 
        width: 100%; 
        padding-right: 0; 
    }
    .row-action { 
        justify-content: flex-start; 
    }
}

/* Enhanced Timeline (Contribute) */
.timeline {
    position: relative; max-width: 1000px; margin: 0 auto;
}
.timeline::after {
    content: ''; position: absolute; width: 4px; background: rgba(0,242,254,0.3);
    top: 0; bottom: 0; left: 50%; margin-left: -2px; z-index: 1;
    border-radius: 4px;
}
.timeline-item {
    padding: 20px 50px; position: relative; width: 50%;
}
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-marker {
    position: absolute; width: 50px; height: 50px; right: -25px; top: 40px;
    background: var(--ocean-deep); border: 4px solid var(--accent);
    border-radius: 50%; z-index: 2; box-shadow: 0 0 25px rgba(0,242,254,0.5);
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; color: #fff;
}
.timeline-item:nth-child(even) .timeline-marker { left: -25px; }
.timeline-content {
    padding: 3rem; background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: 24px; backdrop-filter: blur(20px); transition: transform 0.3s;
}
.timeline-content:hover { transform: translateY(-5px); border-color: rgba(0,242,254,0.3); }

.timeline-content h3 { font-size: 2rem; margin-bottom: 1rem; }
.timeline-content p { color: var(--text-muted); font-size: 1.1rem; line-height: 1.6; }

/* macOS style window */
.mac-window {
    background: #0d1117; border-radius: 12px; border: 1px solid #30363d; margin-top: 2rem; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.mac-header {
    background: #161b22; padding: 12px 15px; display: flex; gap: 8px; border-bottom: 1px solid #30363d;
}
.mac-btn { width: 12px; height: 12px; border-radius: 50%; }
.mac-close { background: #ff5f56; } .mac-min { background: #ffbd2e; } .mac-max { background: #27c93f; }
.mac-body { padding: 1.5rem; font-family: 'Consolas', monospace; color: #8be9fd; overflow-x: auto; font-size: 0.95rem; line-height: 1.5; }

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 80px; padding-right: 0; }
    .timeline-item:nth-child(even) { left: 0; }
    .timeline-marker { left: 6px !important; right: auto !important; }
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent);
    color: #020f26;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 10px 30px rgba(0,242,254,0.4);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 1000;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(2, 8, 19, 0.95);
    backdrop-filter: blur(15px);
    overflow: hidden;
}

.lightbox.active {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 20px rgba(0,242,254,0.1);
    object-fit: contain;
}

.lightbox-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    text-align: center;
    color: #a3c9e2;
    font-size: 1.1rem;
    font-weight: 600;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 2001;
}

.lightbox-close:hover {
    color: var(--accent);
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 24px;
    padding: 15px;
    cursor: pointer;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    backdrop-filter: blur(5px);
}

.lightbox-btn:hover {
    background: var(--accent);
    color: #020813;
    border-color: var(--accent);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: -80px; }
.lightbox-next { right: -80px; }

@media (max-width: 900px) {
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}
