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

:root {
    /* Light Theme (Default) */
    --bg-color: #f0f4f8;
    --card-bg: rgba(255, 255, 255, 0.8);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --border-color: rgba(0, 0, 0, 0.1);
    --hero-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --card-gradient: linear-gradient(-45deg, rgba(255, 255, 255, 0.9), rgba(59, 130, 246, 0.1), rgba(255, 255, 255, 0.9), rgba(139, 92, 246, 0.1));
    --font-heading: 'Play', sans-serif;
    --font-body: 'Play', sans-serif;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Loader Animation */
#skeleton-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.loader-r-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-r-icon {
    font-size: 4rem;
    color: var(--accent-blue);
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 20px rgba(88, 166, 255, 0.4));
    animation: float 3s ease-in-out infinite;
}

.loader-progress-container {
    position: relative;
    /* Change from absolute to relative */
    width: 300px;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    margin-top: 2rem;
    /* Add spacing from icon */
    margin-bottom: 1.5rem;
    /* Add spacing to text */
}

#splash-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #58a6ff, #bc8cff);
    /* Explicit gradient */
    width: 0%;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(88, 166, 255, 0.6);
    animation: fillProgress 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.loader-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-blue);
    font-weight: 600;
}

.pulse-text {
    animation: pulseText 2s ease-in-out infinite;
}

.splash-footer {
    position: absolute;
    bottom: 2rem;
    width: 100%;
    text-align: center;
    opacity: 0;
    animation: fadeIn 1s ease 0.5s forwards;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes fillProgress {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

@keyframes pulseText {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

[data-theme="dark"] {
    /* Dark Theme */
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --accent-hover: #60a5fa;
    --border-color: rgba(255, 255, 255, 0.1);
    --hero-gradient: linear-gradient(135deg, #60a5fa, #c084fc);
    --card-gradient: linear-gradient(-45deg, rgba(30, 41, 59, 0.7), rgba(88, 166, 255, 0.1), rgba(30, 41, 59, 0.7), rgba(188, 140, 255, 0.1));
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    /* Anti-Select */
    -webkit-user-select: none;
}

/* Allow selection in inputs if any */
input,
textarea {
    user-select: text;
    -webkit-user-select: text;
}

/* Background Pattern for specific themes if needed */
[data-theme="dark"] body {
    background-image:
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
}

.container {
    max-width: 1200px;
    width: 90%;
    margin: 2rem auto;
    text-align: center;
}

/* Top Controls */
.top-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 1rem;
    z-index: 100;
}

.icon-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
    font-size: 1.2rem;
}

.icon-btn:hover {
    transform: scale(1.1);
    background: var(--accent-color);
    color: white;
    border-color: transparent;
}

/* Hero Section */
.hero {
    margin: 4rem 0 3rem;
    animation: fadeInDown 0.8s ease-out;
    position: relative;
    padding: 0 1rem;
}

.premium-title {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
    line-height: 1.1;
    letter-spacing: -2px;
}

.gradient-text {
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

p.subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.6;
    font-weight: 300;
}

/* Hero Identity Grid (Authors) */
.hero-identity-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.author-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--card-bg);
    padding: 0.5rem 1.25rem 0.5rem 0.5rem;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.author-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--hero-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
    border-radius: 50px;
}

.author-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    border-color: transparent;
    color: white;
}

.author-pill:hover::before {
    opacity: 1;
}

.author-pill img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.author-pill span {
    position: relative;
    z-index: 1;
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 0.95rem;
}

/* Central Repo Button */
.repo-btn-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.repo-central-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    font-family: var(--font-body);
}

.repo-central-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
    filter: brightness(1.1);
}

.repo-icon-fork {
    font-size: 1.1rem;
}

/* Grid & Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

/* Card Styles with Premium Animation */
.card {
    background: var(--card-gradient);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-blue);
    box-shadow: 0 20px 50px rgba(88, 166, 255, 0.15);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover::before {
    opacity: 1;
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Card Icons & Text */
.card-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
}

.card h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
    flex-grow: 1;
}

.status-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(16, 185, 129, 0.2);
    transition: all 0.3s ease;
}

.card:hover .status-badge {
    background: #10b981;
    color: white;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

/* 404 Specific Styles */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 70vh;
    text-align: center;
}

.error-code {
    font-family: var(--font-heading);
    font-size: 10rem;
    font-weight: 800;
    margin: 0;
    line-height: 1;
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.2));
    position: relative;
    animation: glitch 3s infinite;
}

/* Footer */
footer {
    margin-top: auto;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
    text-align: center;
    background: var(--card-bg);
    backdrop-filter: blur(8px);
}

footer a.footer-author {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

footer a.footer-repo {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--accent-color) !important;
    text-decoration: none;
    transform: translateY(-2px);
    display: inline-block;
}

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

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--hero-gradient);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .error-code {
        font-size: 6rem;
    }

    .container {
        width: 95%;
        margin: 2rem auto;
    }
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

/* Prevent horizontal scroll */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}