/* Veridium Futuristic Explorer Theme - Version 2.1 (Polished) */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;500;600;700&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
    --veridium-green: #00ff9d;
    --veridium-cyan: white;
    --veridium-blue: #0066ff;
    --veridium-dark-blue: #0a0e17;
    --bg-deep: #050508;
    --bg-panel: rgba(13, 16, 22, 0.6);
    /* More transparent for better glass effect */
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    /* White-ish subtle border instead of green */
    --neon-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
    --text-main: #f0f0f0;
    --text-muted: #8a9bbd;
    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Exo 2', sans-serif;
}

body {
    background-color: var(--bg-deep);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(0, 81, 255, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 85% 30%, rgba(0, 255, 157, 0.05) 0%, transparent 45%);
    background-size: cover;
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    padding-top: 120px;
    padding-bottom: 60px;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #fff;
    margin-bottom: 1rem;
}

a {
    color: var(--veridium-green);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

a:hover {
    color: var(--veridium-cyan);
    text-shadow: 0 0 8px var(--veridium-cyan);
    text-decoration: none;
}

/* Navbar */
.navbar {
    background: rgba(5, 5, 8, 0.85) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1.5rem;
    display: flex;
    justify-content: center;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.6rem;
    color: #fff !important;
    text-shadow: 0 0 15px rgba(0, 255, 157, 0.5);
    letter-spacing: 3px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    padding: 0.3rem 0;
    position: relative;
    animation: brandPulse 4s ease-in-out infinite;
}

/* Modern pulsing animation with color shift */
@keyframes brandPulse {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(0, 255, 157, 0.4),
            0 0 20px rgba(0, 255, 157, 0.2);
        letter-spacing: 3px;
    }

    50% {
        text-shadow: 0 0 20px rgba(0, 255, 157, 0.8),
            0 0 40px rgba(0, 255, 157, 0.4),
            0 0 60px rgba(0, 242, 234, 0.3);
        letter-spacing: 4px;
    }
}

/* Navbar layout improvements */
.navbar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.navbar-collapse {
    display: flex;
    justify-content: center;
}

.nav-link {
    color: var(--text-muted) !important;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    /* Slightly smaller for better fit */
    padding: 0.5rem 1rem !important;
    margin: 0 3px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--veridium-cyan) !important;
    background: rgba(0, 242, 234, 0.1);
    /* Cyan hint */
    box-shadow: 0 0 20px rgba(0, 242, 234, 0.15);
    transform: translateY(-2px);
}

/* Glass Cards */
.card {
    background: var(--bg-panel);
    border: 1px solid rgba(0, 255, 157, 0.25);
    /* More visible green border */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5),
        0 0 15px rgba(0, 255, 157, 0.1);
    /* Added glow */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    margin-bottom: 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.card:hover {
    border-color: rgba(0, 255, 157, 0.5);
    /* Brighter on hover */
    box-shadow: 0 15px 50px -10px rgba(0, 255, 157, 0.2),
        0 0 25px rgba(0, 255, 157, 0.15);
    transform: translateY(-5px);
}

.card-header {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-family: var(--font-heading);
    letter-spacing: 0.15em;
    font-size: 1.2rem;
    color: var(--veridium-cyan);
    padding: 1.2rem 2rem;
    text-transform: uppercase;
    font-weight: 600;
}

.card-body {
    padding: 2rem;
}

/* Stats */
#hashrate,
#difficulty,
#supply,
#lastPrice,
#marketCap,
#difficultyHybrid {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.3rem;
    /* Reduced for consistent sizing */
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    word-break: break-word;
    /* Prevent overflow */
    line-height: 1.4;
}

.header-icons {
    color: var(--veridium-cyan);
    /* Changed to Cyan for diversity */
    margin-right: 15px;
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(0, 242, 234, 0.3));
}

/* Search Box - IMPROVED SIZE */
#index-search {
    width: 100%;
    margin-bottom: 3rem;
    /* More spacing below search */
}

#index-search input.form-control {
    background: rgba(10, 14, 23, 0.7);
    border: 1px solid rgba(0, 255, 157, 0.3);
    /* Visible green border */
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
    padding: 0.8rem 1.5rem;
    height: auto;
    min-height: 45px;
    border-radius: 12px 0 0 12px;
    transition: all 0.3s ease;
    width: 70%;
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.1);
    /* Subtle glow */
}

#index-search input.form-control:focus {
    background: rgba(15, 20, 30, 0.9);
    border-color: var(--veridium-cyan);
    box-shadow: 0 0 25px rgba(0, 242, 234, 0.2),
        0 0 10px rgba(0, 255, 157, 0.15);
    /* Enhanced glow on focus */
}

.btn-success {
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.1), rgba(0, 242, 234, 0.1));
    border: 1px solid rgba(0, 255, 157, 0.3);
    border-left: none;
    color: var(--veridium-green);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    /* Adjusted text size */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 0 12px 12px 0;
    padding: 0 2rem;
    /* Reduced padding */
    transition: all 0.3s ease;
    min-height: 45px;
    /* Reduced height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--veridium-green), var(--veridium-cyan));
    color: #000;
    border-color: transparent;
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.4);
    transform: translateX(2px);
}

/* Tables - REMOVED HARSH BORDERS */
.table {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 0;
}

.table thead th {
    font-family: var(--font-heading);
    color: var(--veridium-cyan);
    border-top: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle white border */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1.5rem 1rem;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.1);
}

.table td {
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    /* Extremely subtle row lines */
    vertical-align: middle;
    padding: 1.2rem 1rem;
    font-variant-numeric: tabular-nums;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.015);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 255, 157, 0.03);
    /* No border on hover, just a glow */
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.05);
    transform: scale(1.002);
    /* slightly pop out */
    transition: all 0.2s ease;
    z-index: 1;
    position: relative;
}

/* Badges / Labels */
.badge,
.label {
    padding: 0.6em 1em;
    font-family: var(--font-heading);
    font-weight: 700;
    border-radius: 6px;
    letter-spacing: 0.05em;
    text-shadow: none;
}

.badge-success,
.label-success,
.table-success,
.table-success>td {
    background-color: rgba(0, 255, 157, 0.1) !important;
    color: #00ff9d !important;
    border: 1px solid rgba(0, 255, 157, 0.2) !important;
}

/* Fix for New Coins / Info alerts text visibility */
.alert-info,
.label-info,
.table-info,
.table-info>td,
.table-info>th {
    background-color: rgba(138, 43, 226, 0.4) !important;
    /* Ensure nice purple background */
    color: #ffffff !important;
    /* Force white text */
    border-color: rgba(245, 242, 248, 0.5) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    /* Improve readability */
}

/* Fix for Orange/Warning backgrounds */
.alert-warning,
.label-warning,
.table-warning,
.table-warning>td,
.table-warning>th,
tr.warning,
td.warning {
    background-color: rgba(255, 140, 0, 0.85) !important;
    /* Orange background */
    color: #ebecec !important;
    /* Black text for contrast */
    border-color: rgba(255, 140, 0, 0.9) !important;
    font-weight: 600;
}

/* Ensure links in warning rows are visible */
.table-warning a,
.table-warning a:hover,
.alert-warning a,
.alert-warning a:hover {
    color: #ebecec !important;
    /* Dark blue for links */
    text-decoration: none;
    font-weight: bold;
}

/* Fix for Red/Danger backgrounds */
.alert-danger,
.label-danger,
.table-danger,
.table-danger>td,
.table-danger>th,
tr.danger,
td.danger {
    background-color: rgba(172, 28, 42, 0.85) !important;
    /* Red background */
    color: #ffffff !important;
    /* White text for contrast */
    text-decoration: none;
    border-color: rgba(172, 28, 42, 0.9) !important;
    font-weight: 600;
}

/* Ensure links in danger rows are visible */
.table-danger a,
.table-danger a:hover,
.alert-danger a,
.alert-danger a:hover {
    color: #ffffff !important;
    /* White for links */
    text-decoration: none;
    font-weight: bold;
}

/* Footer */
.footer {
    background: transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    /* Normalized border width */
    padding: 2px 0;
    /* Minimal padding */
    font-size: 0.75rem;
    /* Smaller font */
    color: var(--text-muted);
}

/* DataTables Pagination */
.pagination .page-item .page-link {
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border-radius: 4px;
    margin: 0 2px;
}

.pagination .page-item.active .page-link {
    background-color: var(--veridium-green) !important;
    border-color: var(--veridium-green) !important;
    color: #000 !important;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #index-search input.form-control {
        width: 100%;
        border-radius: 12px;
        margin-bottom: 15px;
    }

    .btn-success {
        width: 100%;
        border-radius: 12px;
        border-left: 1px solid rgba(0, 255, 157, 0.3);
    }
}

/* Code/Hash blocks */
code,
pre {
    color: var(--veridium-cyan);
    font-family: 'Courier New', monospace;
    background: transparent;
    padding: 0;
}

.main-logo {
    width: 145px;
    height: 145px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 50px rgba(0, 255, 157, 0.1);
    transition: all 0.5s ease;
    border-radius: 50%;
}

.main-logo:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 0 60px rgba(0, 255, 157, 0.6);
    border-color: var(--veridium-cyan);
}