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

:root {
    --primary: 56, 189, 248;
    --bg-dark: 10, 10, 12;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.4);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    user-select: none;
    -webkit-font-smoothing: antialiased;
}

body {
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    font-family: 'Inter', sans-serif;
    background-color: rgb(var(--bg-dark));
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.01);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes expandLine {
    from {
        width: 0;
    }

    to {
        width: 100px;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

@keyframes tipAppear {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

@keyframes dotPulse {

    0%,
    60%,
    100% {
        color: var(--text-muted);
        transform: scale(1);
    }

    30% {
        color: #ffffff;
        transform: scale(1.3);
    }
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Animation utility classes */
/* Animation utility classes - Converted to Transitions */
.animate-slide-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 2.5s var(--ease-out-expo), transform 2.5s var(--ease-out-expo);
}

.animate-slide-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 2.5s var(--ease-out-expo), transform 2.5s var(--ease-out-expo);
}

.animate-fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 2.5s var(--ease-out-expo), transform 2.5s var(--ease-out-expo);
}

.app-container.ready {
    opacity: 1;
}

.app-container.animations-active .animate-slide-left {
    opacity: 1;
    transform: translateX(0);
}

.app-container.animations-active .animate-slide-right {
    opacity: 1;
    transform: translateX(0);
}

.app-container.animations-active .animate-fade-up {
    opacity: 1;
    transform: translateY(0);
}


/* ==================== APP CONTAINER ==================== */
.app-container {
    width: 100vw;
    height: 100vh;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;

    opacity: 0;
    transition: opacity 0.8s var(--ease-out-expo);
}

/* Glass Overlay */
.glass-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.6) 100%);
    /* backdrop-filter: blur(2px); */
    z-index: 1;
}

#youtube-player-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%) scale(1.2);
    /* Scale up to avoid black bars on standard 16:9 during load */
    pointer-events: none;
    z-index: 0;
    object-fit: cover;
}

.bg-image-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%) scale(1.05);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 0;
    pointer-events: none;
}

/* ==================== CREDITS PANEL ==================== */
.credits-panel {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.credits-header {
    margin-bottom: 0.25rem;
}

.credits-title {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.team-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow: none;
}

.developer-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    transition: all 0.2s ease, opacity 2.5s var(--ease-out-expo), transform 2.5s var(--ease-out-expo);
    transform: translateY(20px);
    opacity: 0;
}

.app-container.animations-active .developer-card {
    transform: translateY(0);
    opacity: 1;
}

.developer-card:hover {
    background: rgba(var(--primary), 0.05);
    border-color: rgba(var(--primary), 0.2);
    transform: translateX(5px);
}

.developer-avatar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--primary), 0.3), rgba(var(--primary), 0.1));
    border: 1px solid rgba(var(--primary), 0.4);
    border-radius: 10px;
    overflow: hidden;
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(var(--primary), 1);
}

.developer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.developer-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.developer-name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.developer-name span {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.verified-badge {
    display: flex;
    align-items: center;
    animation: badgePulse 2s ease-in-out infinite;
}

.verified-badge i {
    font-size: 0.75rem;
    color: rgba(var(--primary), 1);
    filter: drop-shadow(0 0 6px rgba(var(--primary), 0.5));
}

.developer-role {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==================== CENTER CONTENT ==================== */
.center-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.main-title h1 {
    font-size: 5rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: 8px;
    text-transform: uppercase;
    text-shadow: 0 0 60px rgba(255, 255, 255, 0.1);
}

.main-title h1 .highlight {
    background: linear-gradient(135deg, rgba(var(--primary), 1), rgba(var(--primary), 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(var(--primary), 0.5));
}

.title-line {
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(var(--primary), 1), transparent);
    margin: 1.5rem auto;
    border-radius: 100px;
    animation: expandLine 0.5s var(--ease-out-expo) 0.3s forwards;
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.description {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* Social Links */
.social-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-links li {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 2.5s var(--ease-out-expo), transform 2.5s var(--ease-out-expo);
}

.app-container.animations-active .social-links li {
    opacity: 1;
    transform: translateY(0);
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.social-btn i {
    font-size: 1.1rem;
    color: rgba(var(--primary), 1);
}

.social-btn:hover {
    background: rgba(var(--primary), 0.15);
    border-color: rgba(var(--primary), 0.4);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(var(--primary), 0.2);
}

/* ==================== LOADING SECTION ==================== */
.loading-section {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    z-index: 10;
}

.loading-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.loading-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.loading-dots {
    display: inline-flex;
    margin-left: 2px;
}

.loading-dots span {
    display: inline-block;
}

.loading-dots span:nth-child(1) {
    animation: dotPulse 1.2s ease-in-out infinite 0s;
}

.loading-dots span:nth-child(2) {
    animation: dotPulse 1.2s ease-in-out infinite 0.15s;
}

.loading-dots span:nth-child(3) {
    animation: dotPulse 1.2s ease-in-out infinite 0.3s;
}

.loading-percent {
    font-size: 0.9rem;
    color: rgba(var(--primary), 1);
    font-weight: 700;
}

.loading-bar-container {
    width: 100%;
}

.loading-bar-bg {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    overflow: hidden;
}

.loading-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(var(--primary), 0.8), rgba(var(--primary), 1));
    border-radius: 100px;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 20px rgba(var(--primary), 0.5);
}

.loading-tips {
    position: relative;
    /* For absolute icon positioning */
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center the text */
    margin-top: 1rem;
    padding: 0.75rem 2.5rem;
    /* Add side padding to prevent text overlapping absolute icon */
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.loading-tips i {
    position: absolute;
    left: 1rem;
    color: rgba(var(--primary), 0.8);
    font-size: 0.85rem;
}

.loading-tips span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-height: 1.2em;
    text-align: center;
    width: 100%;
}

.loading-tips span.animating {
    animation: tipAppear 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* ==================== AUDIO CONTROLS ==================== */
/* ==================== AUDIO CONTROLS ==================== */
.audio-section {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10;
}

.song-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0.5rem;
    color: var(--text-secondary);
}

.song-info i {
    color: rgba(var(--primary), 1);
    font-size: 0.9rem;
    animation: pulse 2s ease-in-out infinite;
}

.song-info span {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.control-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(var(--primary), 0.1);
    border-color: rgba(var(--primary), 0.3);
    color: rgba(var(--primary), 1);
    transform: scale(1.1);
}

.control-btn.active {
    background: rgba(var(--primary), 0.2);
    border-color: rgba(var(--primary), 0.5);
    color: rgba(var(--primary), 1);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.volume-slider {
    -webkit-appearance: none;
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: rgba(var(--primary), 1);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(var(--primary), 0.5);
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(var(--primary), 0.7);
}

.volume-value {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    min-width: 35px;
}

/* ==================== SERVER INFO ==================== */
.server-info {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    backdrop-filter: blur(10px);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: rgba(var(--primary), 1);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(var(--primary), 0.5);
}

.server-status span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .main-title h1 {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }

    .credits-panel {
        top: 1rem;
    }

    .credits-panel {
        left: 1rem;
    }

    .audio-controls,
    .server-info {
        bottom: 1rem;
    }

    .audio-controls {
        left: 1rem;
    }

    .server-info {
        right: 1rem;
    }

    .loading-section {
        padding: 0 1rem;
        bottom: 5rem;
    }
}

h1 strong {
    color: rgb(var(--primary));
    font-weight: inherit;
    text-shadow: 0 0 20px rgba(var(--primary), 0.5);
}
/* ==================== GMOD ADAPTATIONS ==================== */
/* Crossfade-capable background layers. Each layer fades in when .visible is set. */
.bg-image-layer {
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}
.bg-image-layer.visible {
    opacity: var(--bg-opacity, 1);
}

/* Filename currently downloading (GMod DownloadingFile callback) */
.loading-file {
    font-family: 'Inter', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    min-height: 1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Social links: non-clickable in GMod, so style as static badge */
.social-links .social-btn {
    cursor: default;
}

/* ==================== SERVER INFO PANEL (bottom-left) ==================== */
.server-info-panel {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 220px;
    max-width: 320px;
}

.server-info-header {
    margin-bottom: 0.15rem;
}

.server-info-title {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.server-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.85rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(20px);
}

.info-row {
    display: grid;
    grid-template-columns: 20px auto 1fr;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
}

.info-row i {
    font-size: 0.85rem;
    color: rgba(var(--primary), 1);
    filter: drop-shadow(0 0 6px rgba(var(--primary), 0.3));
    text-align: center;
}

.info-row .info-label {
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.info-row .info-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.info-row.info-row-player .info-value {
    font-family: 'Inter', sans-serif;
    font-size: 0.74rem;
}

/* ==================== WORKSHOP NOTE ==================== */
.workshop-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.6rem;
    padding: 0.55rem 0.75rem;
    background: rgba(var(--primary), 0.06);
    border: 1px solid rgba(var(--primary), 0.15);
    border-radius: 8px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.workshop-note i {
    color: rgba(var(--primary), 1);
    font-size: 0.85rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

/* Responsive: hide server-info panel on very small screens to avoid overlap */
@media (max-width: 768px) {
    .server-info-panel {
        position: static;
        margin: 1rem;
        max-width: none;
    }
}

/* ==================== STATIC INFO LINES (Discord, Website) ==================== */
.social-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 1.4rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    list-style: none;
}

.social-info i {
    font-size: 1.05rem;
    color: rgba(var(--primary), 1);
    filter: drop-shadow(0 0 6px rgba(var(--primary), 0.4));
}

.social-info span {
    letter-spacing: 0.3px;
}
