/* ========================================
   Colistice-Manager Website - Global Styles
   ======================================== */

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

:root {
    --primary: #FF5B5B;
    --secondary: #4F46E5;
    --tertiary: #EC4899;
    --success: #10B981;
    --dark: #1F2937;
    --light: #F3F4F6;
    --white: #FFFFFF;
    --text: #111827;
    --border: #E5E7EB;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   Navigation Bar
   ======================================== */

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.25s ease;
}

.nav-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 5px 14px;
    border-radius: 999px;
    color: #f8fafc;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
}

.nav-user-avatar {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    aspect-ratio: 1 / 1 !important;
    border: 1.5px solid #6366f1 !important;
    background: #0f172a;
    display: block !important;
    flex-shrink: 0 !important;
}

.nav-user-name {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5 !important;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.35);
    color: #ffffff !important;
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.trainer-avatar, #trainer-avatar-img, .user-avatar-img, .trainer-avatar-ring img {
    border-radius: 50% !important;
    object-fit: cover !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* ========================================
   Buttons
   ======================================== */

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #FF7B7B);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    box-shadow: var(--shadow-lg), 0 0 16px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #6366F1);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-secondary:hover {
    box-shadow: var(--shadow-lg), 0 0 16px rgba(99, 102, 241, 0.4);
}

.btn-tertiary {
    background: linear-gradient(135deg, var(--tertiary), #F472B6);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-tertiary:hover {
    box-shadow: var(--shadow-lg), 0 0 16px rgba(244, 114, 182, 0.4);
}

.btn-discord {
    background: #5865F2;
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-discord:hover {
    background: #4752C4;
}

.btn-icon {
    font-size: 1.2rem;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="1200" height="600" fill="%23667eea"/><rect width="1200" height="600" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--white);
}

.title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 0.8s ease;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.buttons-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.buttons-container .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    flex-direction: column;
}

/* ========================================
   Animated Background
   ======================================== */

.pokemon-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.pokemon-float {
    position: absolute;
    font-size: 3rem;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(-40px) translateX(-10px); }
    75% { transform: translateY(-20px) translateX(10px); }
}

.hidden {
    display: none !important;
}

.login-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.login-modal.hidden {
    display: none;
}

.login-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
}

.login-panel {
    position: relative;
    width: min(520px, calc(100vw - 2rem));
    background: white;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    padding: 2rem 1.5rem 1.5rem;
    z-index: 1;
}

.login-kicker {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    color: #5865F2;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.login-panel h2 {
    margin-bottom: 1rem;
    font-size: 1.7rem;
}

.login-server-link {
    display: inline-block;
    margin: 0.75rem 0 1rem;
    padding: 0.85rem 1.2rem;
    border-radius: 12px;
    background: #5865F2;
    color: white;
    text-decoration: none;
    font-weight: 700;
}

.login-panel input {
    width: 100%;
    border: 1px solid #dbe2ef;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.login-copy {
    color: #475569;
    margin-bottom: 1rem;
}

.login-choice-list {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
}

.login-choice-btn {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid #dbe2ef;
    background: #f8fafc;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-choice-btn:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
}

.login-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.login-feedback {
    min-height: 1.3rem;
    margin-top: 1rem;
    color: #dc2626;
    font-size: 0.92rem;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.12);
    border: 1px solid rgba(79, 70, 229, 0.28);
    transition: all 0.2s ease;
}

.user-profile-badge:hover {
    background: rgba(79, 70, 229, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
}

.user-avatar {
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #FF5B5B, #4F46E5);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.95rem;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar-img {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #6366f1;
    background: #1e1b4b;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    flex-shrink: 0;
}

.user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    font-size: 0.75rem;
    color: #1F2937;
}

.user-meta strong {
    font-size: 0.82rem;
}

/* ========================================
   Features Section
   ======================================== */

.features {
    background: var(--white);
    padding: 4rem 2rem;
    margin-top: -4rem;
    position: relative;
    z-index: 20;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--light);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* ========================================
   Animations
   ======================================== */

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--dark);
    color: var(--white);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

/* ========================================
   Modals
   ======================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text);
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--primary);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .buttons-container {
        gap: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   ⚡ PIKACHU SPRINT LOADING BAR SYSTEM (pikachuloadingsprint.gif) & PRO UI
   ========================================================================== */

:root {
    --pika-gold: #fbbf24;
    --pika-amber: #f59e0b;
    --pika-cyan: #38bdf8;
    --pika-teal: #64ffda;
    --pika-bg-deep: rgba(6, 11, 25, 0.88);
}

/* Full / Center HUD Pikachu Sprint Loading Overlay */
#pikachu-sprint-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: radial-gradient(circle at 50% 42%, rgba(16, 32, 68, 0.92), rgba(5, 9, 22, 0.96));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: all;
}

#pikachu-sprint-overlay.pika-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Compact Mode for Tab / Fetch transitions so it feels snappy & non-intrusive */
#pikachu-sprint-overlay.pika-compact-mode {
    background: rgba(6, 11, 26, 0.62);
    backdrop-filter: blur(8px);
}

.pika-sprint-card {
    width: min(480px, 90vw);
    background: linear-gradient(155deg, rgba(16, 29, 58, 0.96), rgba(9, 16, 34, 0.98));
    border: 1px solid rgba(251, 191, 36, 0.42);
    border-radius: 22px;
    padding: 1.75rem 1.85rem 1.45rem;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.72),
        0 0 36px rgba(251, 191, 36, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: visible;
    transform: translateY(0) scale(1);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

#pikachu-sprint-overlay.pika-hidden .pika-sprint-card {
    transform: translateY(12px) scale(0.96);
}

.pika-sprint-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.35rem;
}

.pika-sprint-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pika-gold);
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.35);
    padding: 0.32rem 0.75rem;
    border-radius: 999px;
}

.pika-sprint-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pika-gold);
    box-shadow: 0 0 10px var(--pika-gold);
    animation: pikaPulseDot 0.9s infinite alternate;
}

.pika-sprint-percent {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 1.05rem;
    font-weight: 900;
    color: #fef08a;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.55);
}

/* The Loading Bar Track where Pikachu Sprints */
.pika-sprint-stage {
    position: relative;
    width: 100%;
    padding-top: 12px;
    margin-bottom: 1.15rem;
}

.pika-sprint-track {
    position: relative;
    width: 100%;
    height: 16px;
    background: rgba(6, 12, 28, 0.95);
    border-radius: 999px;
    border: 1px solid rgba(100, 255, 218, 0.28);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.85);
    overflow: hidden;
}

.pika-sprint-fill {
    height: 100%;
    width: var(--pika-progress, 12%);
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 50%, #fde047 80%, #64ffda 100%);
    background-size: 200% 100%;
    border-radius: 999px;
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.85);
    transition: width 0.16s cubic-bezier(0.22, 1, 0.36, 1);
    animation: pikaBarShimmer 1.2s linear infinite;
}

/* Pikachu GIF sprinting directly along the bar! */
.pika-sprint-runner-wrap {
    position: absolute;
    top: -38px;
    left: var(--pika-progress, 12%);
    transform: translateX(-62%);
    width: 72px;
    height: 54px;
    pointer-events: none;
    transition: left 0.16s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pika-sprint-runner {
    width: 68px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(251, 191, 36, 0.65)) drop-shadow(0 0 16px rgba(250, 204, 21, 0.45));
    user-select: none;
    -webkit-user-drag: none;
}

/* Electric Spark Trail behind Pikachu */
.pika-sprint-runner-wrap::before {
    content: '⚡';
    position: absolute;
    left: -12px;
    bottom: 6px;
    font-size: 0.82rem;
    filter: drop-shadow(0 0 6px #fbbf24);
    animation: pikaSparkTrail 0.45s ease-in-out infinite alternate;
}

.pika-sprint-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.pika-sprint-status {
    font-size: 0.92rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pika-sprint-sub {
    font-size: 0.76rem;
    color: #94a3b8;
    font-weight: 600;
}

/* Top Viewport Pikachu Sprint Bar for background fetches */
#pika-top-sprint {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 100001;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#pika-top-sprint.active {
    opacity: 1;
}

#pika-top-sprint .pika-top-fill {
    height: 100%;
    width: var(--pika-top-progress, 0%);
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #64ffda);
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.9);
    transition: width 0.15s ease-out;
}

#pika-top-sprint .pika-top-runner {
    position: absolute;
    top: 2px;
    left: var(--pika-top-progress, 0%);
    transform: translateX(-75%);
    width: 44px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(251, 191, 36, 0.85));
    transition: left 0.15s ease-out;
}

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

@keyframes pikaPulseDot {
    0% { transform: scale(0.85); opacity: 0.65; }
    100% { transform: scale(1.2); opacity: 1; }
}

@keyframes pikaSparkTrail {
    0% { transform: translate(-4px, 2px) scale(0.85); opacity: 0.45; }
    100% { transform: translate(2px, -3px) scale(1.15); opacity: 1; }
}

/* Pro App Smooth Animations & Micro-Interactions */
@keyframes proCardReveal {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pokemon-card,
.trainer-card,
.anime-card,
.feature-card,
.stat-card,
.inventory-item {
    animation: proCardReveal 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Smooth Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #070d1f;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.45), rgba(251, 191, 36, 0.45));
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.75), rgba(251, 191, 36, 0.75));
}

