/* Arc Trader Reputation - Enhanced Dark Theme */

/* ============================================
   CSS Reset and Custom Properties
   ============================================ */

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

:root {
    /* Background Colors */
    --bg-primary: #050508;
    --bg-secondary: rgba(15, 15, 25, 0.8);
    --bg-tertiary: rgba(25, 25, 40, 0.9);
    --bg-card: rgba(20, 20, 35, 0.6);

    /* Text Colors */
    --text-primary: #f0f0f5;
    --text-secondary: #a8a8b8;
    --text-muted: #6a6a7a;

    /* Accent Colors - More vibrant */
    --accent-primary: #00d4ff;
    --accent-secondary: #0099cc;
    --accent-tertiary: #7c3aed;
    --accent-glow: rgba(0, 212, 255, 0.4);
    --accent-glow-strong: rgba(0, 212, 255, 0.6);

    /* Status Colors */
    --danger: #ff4757;
    --danger-glow: rgba(255, 71, 87, 0.4);
    --success: #2ed573;
    --success-glow: rgba(46, 213, 115, 0.3);

    /* Glass effect */
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* Utility */
    --border: rgba(255, 255, 255, 0.08);
    --radius: 12px;
    --radius-lg: 20px;
}

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

body {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background: var(--bg-primary);
    position: relative;
    overflow-x: hidden;
}

/* Gradient orbs background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 20%, rgba(0, 212, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(124, 58, 237, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 40% 60%, rgba(255, 71, 87, 0.08) 0%, transparent 30%);
    animation: bgFloat 20s ease-in-out infinite;
    z-index: -2;
}

/* Grid overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(2%, 2%) rotate(1deg); }
    50% { transform: translate(0, 4%) rotate(0deg); }
    75% { transform: translate(-2%, 2%) rotate(-1deg); }
}

/* ============================================
   Base Styles
   ============================================ */

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-secondary);
    text-shadow: 0 0 10px var(--accent-glow);
}

.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
}

/* ============================================
   Header Styles
   ============================================ */

.header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.site-title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 50%, #00d4ff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease infinite;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.3));
}

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

.site-tagline {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 1.25rem;
    letter-spacing: 0.02em;
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(124, 58, 237, 0.1));
    color: var(--accent-primary);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}

/* ============================================
   Glass Card Mixin Style
   ============================================ */

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(0, 212, 255, 0.2);
    box-shadow:
        var(--glass-shadow),
        0 0 40px rgba(0, 212, 255, 0.1);
}

/* ============================================
   Section Styles (Shared)
   ============================================ */

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 1.1rem;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-tertiary));
    border-radius: 2px;
}

/* ============================================
   Search Section Styles
   ============================================ */

.search-section {
    margin-bottom: 3rem;
}

.search-form {
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
}

.search-input {
    flex: 1;
    padding: 1rem 1.25rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
    border-radius: var(--radius);
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    border-color: var(--accent-primary);
    box-shadow:
        0 0 0 4px var(--accent-glow),
        inset 0 0 20px rgba(0, 212, 255, 0.05);
}

.search-button {
    padding: 1rem 2rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--bg-primary);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.search-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.search-button:hover {
    transform: translateY(-3px);
    box-shadow:
        0 10px 30px var(--accent-glow),
        0 0 50px rgba(0, 212, 255, 0.2);
}

.search-button:hover::before {
    left: 100%;
}

.search-button:active {
    transform: translateY(-1px);
}

/* Search Result Box */
.search-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    animation: slideUp 0.3s ease;
}

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

.search-result.hidden {
    display: none;
}

.search-result.has-reports {
    border-color: var(--danger);
    box-shadow:
        var(--glass-shadow),
        0 0 40px var(--danger-glow),
        inset 0 0 60px rgba(255, 71, 87, 0.05);
}

.search-result.no-reports {
    border-color: var(--success);
    box-shadow:
        var(--glass-shadow),
        0 0 30px var(--success-glow);
}

.search-result .result-id {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.search-result .result-status {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.search-result.has-reports .result-status {
    color: var(--danger);
    font-weight: 700;
}

.search-result.no-reports .result-status {
    color: var(--success);
    font-weight: 600;
}

/* ============================================
   Top 10 List Styles
   ============================================ */

.top-section {
    margin-bottom: 3rem;
}

.top-list {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

.top-list .loading,
.top-list .empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
}

.top-list .error {
    padding: 2rem;
    text-align: center;
    color: var(--danger);
}

.top-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
    position: relative;
}

.top-item:last-child {
    border-bottom: none;
}

.top-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-tertiary));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.top-item:hover {
    background: rgba(0, 212, 255, 0.05);
}

.top-item:hover::before {
    opacity: 1;
}

.top-item .rank {
    width: 2.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-align: center;
    text-shadow: 0 0 10px var(--accent-glow);
}

.top-item .embark-id {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-left: 0.75rem;
}

.top-item .report-count {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--danger);
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.2), rgba(255, 71, 87, 0.1));
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 71, 87, 0.3);
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.15);
}

/* ============================================
   Report Section Styles
   ============================================ */

.report-section {
    text-align: center;
    margin-bottom: 3rem;
}

.report-button {
    display: inline-block;
    padding: 1.1rem 2.5rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--danger);
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.1), rgba(255, 71, 87, 0.05));
    border: 2px solid var(--danger);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.report-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 71, 87, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.report-button:hover {
    color: #fff;
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.3), rgba(255, 71, 87, 0.15));
    box-shadow:
        0 0 30px var(--danger-glow),
        0 10px 40px rgba(255, 71, 87, 0.2);
    transform: translateY(-3px);
}

.report-button:hover::before {
    width: 300%;
    height: 300%;
}

.report-button:active {
    transform: translateY(-1px);
}

/* ============================================
   About Section Styles
   ============================================ */

.about-section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.about-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ============================================
   Support Section Styles
   ============================================ */

.support-section {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(245, 158, 11, 0.05));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 1.75rem;
    margin-bottom: 3rem;
    text-align: center;
}

.support-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.coffee-button {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #1a1a25;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.3);
}

.coffee-button:hover {
    color: #1a1a25;
    transform: translateY(-3px);
    box-shadow:
        0 10px 40px rgba(251, 191, 36, 0.4),
        0 0 60px rgba(251, 191, 36, 0.2);
}

.coffee-button:active {
    transform: translateY(-1px);
}

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

.footer {
    border-top: 1px solid var(--border);
    padding-top: 2.5rem;
    text-align: center;
}

.disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.9;
    text-align: left;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.disclaimer strong {
    color: var(--text-secondary);
}

.disclaimer a {
    color: var(--accent-primary);
}

.disclaimer a:hover {
    text-decoration: underline;
}

.copyright {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

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

@media (max-width: 480px) {
    .container {
        padding: 2rem 1rem;
    }

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

    .site-tagline {
        font-size: 1rem;
    }

    .search-form {
        flex-direction: column;
        padding: 0.75rem;
    }

    .search-button {
        width: 100%;
        padding: 1rem;
    }

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

    .top-item {
        padding: 0.875rem 1rem;
    }

    .top-item .embark-id {
        font-size: 0.95rem;
    }

    .report-button,
    .coffee-button {
        width: 100%;
        padding: 1rem;
    }

    .about-section,
    .support-section {
        padding: 1.25rem;
    }
}

/* ============================================
   Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   Utility Classes
   ============================================ */

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--success);
}

.text-muted {
    color: var(--text-muted);
}
