/* ===================================
   Premium Blockchain Explorer Styles
   Light Blue Base + Green/Yellow Accents
   =================================== */

:root {
    /* Primary Colors - Light Blue Palette */
    --primary-50: #e0f4ff;
    --primary-100: #b8e5ff;
    --primary-200: #8cd6ff;
    --primary-300: #5fc7ff;
    --primary-400: #3abcff;
    --primary-500: #00b0ff;
    --primary-600: #00a3f0;
    --primary-700: #0091de;
    --primary-800: #0080cc;
    --primary-900: #0061ad;

    /* Accent Colors */
    --accent-green: #00e676;
    --accent-green-dark: #00c853;
    --accent-green-light: #69f0ae;

    --accent-yellow: #ffd600;
    --accent-yellow-dark: #ffab00;
    --accent-yellow-light: #ffea00;

    /* Neutrals */
    --bg-primary: #f0f7ff;
    --bg-secondary: #e3f2fd;
    --bg-tertiary: #d1ebff;

    --surface-white: rgba(255, 255, 255, 0.95);
    --surface-glass: rgba(255, 255, 255, 0.7);
    --surface-glass-dark: rgba(255, 255, 255, 0.85);

    --text-primary: #0a2540;
    --text-secondary: #425466;
    --text-tertiary: #6b7c93;

    --border-light: rgba(0, 176, 255, 0.1);
    --border-medium: rgba(0, 176, 255, 0.2);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 176, 255, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 176, 255, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 176, 255, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 176, 255, 0.2);

    /* Effects */
    --glow-green: 0 0 20px rgba(0, 230, 118, 0.3);
    --glow-yellow: 0 0 20px rgba(255, 214, 0, 0.3);
    --glow-blue: 0 0 20px rgba(0, 176, 255, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* ===================================
   Background Effects
   =================================== */

.bg-gradient {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at 30% 20%,
        rgba(0, 176, 255, 0.15) 0%,
        transparent 50%
    ),
    radial-gradient(
        ellipse at 70% 80%,
        rgba(0, 230, 118, 0.08) 0%,
        transparent 50%
    ),
    radial-gradient(
        ellipse at 90% 40%,
        rgba(255, 214, 0, 0.08) 0%,
        transparent 50%
    );
    animation: gradientShift 20s ease infinite;
    z-index: -3;
}

@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-5%, -5%) rotate(5deg); }
}

.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(0, 176, 255, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(0, 230, 118, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -2;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 176, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 176, 255, 0.03) 1px, transparent 1px);
    background-size: 100px 100px;
    z-index: -1;
}

/* ===================================
   Container & Layout
   =================================== */

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

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

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    background: var(--surface-glass-dark);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    animation: slideDown 0.6s ease-out;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-image {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-600);
    background: rgba(0, 176, 255, 0.08);
}

.nav-link.active {
    color: var(--primary-700);
    background: linear-gradient(135deg, rgba(0, 176, 255, 0.15) 0%, rgba(0, 230, 118, 0.08) 100%);
    box-shadow: var(--shadow-sm);
}

.network-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 230, 118, 0.1);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-green-dark);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: var(--glow-green);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* ===================================
   Stats Grid
   =================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out both;
}

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

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-medium);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.stat-icon svg {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.stat-icon.green {
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-light) 100%);
    box-shadow: var(--glow-green);
}

.stat-icon.blue {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-300) 100%);
    box-shadow: var(--glow-blue);
}

.stat-icon.yellow {
    background: linear-gradient(135deg, var(--accent-yellow-dark) 0%, var(--accent-yellow) 100%);
    box-shadow: var(--glow-yellow);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-value .unit {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-tertiary);
}

.stat-change {
    font-size: 0.813rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    display: inline-block;
}

.stat-change.positive {
    color: var(--accent-green-dark);
    background: rgba(0, 230, 118, 0.1);
}

.stat-change.neutral {
    color: var(--text-tertiary);
    background: rgba(107, 124, 147, 0.1);
}

/* ===================================
   Main Grid & Cards
   =================================== */

.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    animation: fadeInUp 0.6s ease-out both;
    transition: all 0.4s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-medium);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.view-all {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.view-all:hover {
    color: var(--primary-700);
    transform: translateX(4px);
}

/* ===================================
   Blocks List
   =================================== */

.blocks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.block-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.block-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
    border-color: var(--primary-300);
}

.block-number {
    font-weight: 700;
    color: var(--primary-700);
    font-size: 1rem;
}

.block-hash {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.813rem;
    color: var(--text-tertiary);
}

.block-time {
    font-size: 0.813rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ===================================
   Health Metrics
   =================================== */

.health-status {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.813rem;
    font-weight: 700;
}

.health-status.excellent {
    color: var(--accent-green-dark);
    background: rgba(0, 230, 118, 0.15);
}

.health-metrics {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.metric-bar {
    height: 8px;
    background: rgba(0, 176, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.metric-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.metric-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.metric-fill.green {
    background: linear-gradient(90deg, var(--accent-green-dark) 0%, var(--accent-green) 100%);
}

.metric-fill.blue {
    background: linear-gradient(90deg, var(--primary-600) 0%, var(--primary-400) 100%);
}

.metric-fill.yellow {
    background: linear-gradient(90deg, var(--accent-yellow-dark) 0%, var(--accent-yellow) 100%);
}

.metric-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.metric-value {
    font-weight: 700;
    color: var(--text-primary);
}

/* ===================================
   Transactions Table
   =================================== */

.transactions-table {
    overflow-x: auto;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 1fr 1fr 0.8fr;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(0, 176, 255, 0.05);
    border-radius: 12px;
    font-size: 0.813rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.table-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tx-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 1fr 1fr 0.8fr;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    font-size: 0.875rem;
    transition: all 0.3s ease;
    align-items: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.tx-row:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--primary-300);
    transform: translateX(2px);
}

.tx-hash {
    font-family: 'Monaco', 'Courier New', monospace;
    color: var(--primary-600);
    font-weight: 600;
}

.tx-address {
    font-family: 'Monaco', 'Courier New', monospace;
    color: var(--text-tertiary);
    font-size: 0.813rem;
}

.tx-value {
    font-weight: 700;
    color: var(--text-primary);
}

.tx-time {
    color: var(--text-tertiary);
    font-size: 0.813rem;
}

.tx-status {
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
}

.tx-status.success {
    color: var(--accent-green-dark);
    background: rgba(0, 230, 118, 0.15);
}

/* ===================================
   Validators Grid
   =================================== */

.validators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.validator-card {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.validator-card:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-4px);
    border-color: var(--primary-300);
    box-shadow: var(--shadow-md);
}

.validator-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.validator-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--accent-green) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1.25rem;
}

.validator-info h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.validator-address {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.validator-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

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

.validator-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.validator-stat-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}

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

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .container {
        padding: 1rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .logo-text {
        font-size: 1.125rem;
    }

    .nav {
        width: 100%;
        justify-content: space-around;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .nav-link {
        font-size: 0.813rem;
        padding: 0.5rem 0.75rem;
    }

    .network-status {
        font-size: 0.813rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100%;
    }

    .stat-card {
        padding: 1.5rem;
        min-width: 0;
        width: 100%;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .main-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card {
        padding: 1rem;
    }

    .card-title {
        font-size: 1.125rem;
    }

    .blocks-list {
        overflow-x: hidden;
    }

    .block-item {
        grid-template-columns: auto 1fr auto;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        min-width: 0;
    }

    .block-number {
        font-size: 0.875rem;
        white-space: nowrap;
    }

    .block-hash {
        font-size: 0.75rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
    }

    .block-time {
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .health-metrics {
        gap: 1rem;
    }

    .metric-info {
        font-size: 0.875rem;
    }

    .table-header,
    .tx-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .table-header {
        display: none;
    }

    .tx-row {
        padding: 1rem;
        grid-template-columns: 1fr;
    }

    .tx-hash,
    .tx-from,
    .tx-to {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .tx-hash::before {
        content: 'Hash: ';
        font-weight: 600;
        color: var(--text-secondary);
    }

    .tx-from::before {
        content: 'From: ';
        font-weight: 600;
        color: var(--text-secondary);
    }

    .tx-to::before {
        content: 'To: ';
        font-weight: 600;
        color: var(--text-secondary);
    }

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

    .footer {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .footer-powered {
        order: 2;
    }

    .footer-brand {
        order: 1;
        align-items: center;
    }
}

/* Tablet responsiveness */
@media (max-width: 1024px) and (min-width: 769px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .validators-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.footer {
    margin-top: 4rem;
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeInUp 1s ease-out 0.9s both;
    gap: 1rem;
}

.footer-powered {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    opacity: 0.6;
    margin: 0;
}

.footer-powered a {
    color: var(--primary-500);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-powered a:hover {
    opacity: 1;
}

.footer-copyright {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    opacity: 0.6;
    margin: 0;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.footer-logo {
    height: 24px;
    width: auto;
    opacity: 0.75;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
}

/* ===================================
   Search Bar
   =================================== */

.search-container {
    margin-bottom: 2rem;
    position: relative;
    animation: fadeInUp 0.6s ease-out 0.2s both;
    z-index: 100;
}

.search-bar {
    display: flex;
    gap: 1rem;
    background: var(--surface-glass-dark);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    padding: 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    border-color: var(--primary-500);
    box-shadow: var(--shadow-lg), 0 0 0 3px rgba(0, 176, 255, 0.1);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    outline: none;
}

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

.search-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.938rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 176, 255, 0.3);
}

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

.search-button svg {
    width: 18px;
    height: 18px;
}

.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--surface-white);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 10000;
}

.search-loading,
.search-no-results,
.search-error {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.search-error {
    color: #f44336;
}

.search-results-container {
    padding: 1rem;
}

.search-results-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.search-result-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    background: rgba(0, 176, 255, 0.03);
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: rgba(0, 176, 255, 0.08);
    border-color: var(--primary-300);
    transform: translateX(4px);
}

.search-result-type {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result-value {
    font-size: 0.938rem;
    color: var(--text-primary);
    font-family: 'Monaco', 'Courier New', monospace;
    word-break: break-all;
}

/* Mobile responsive for search */
@media (max-width: 768px) {
    .search-bar {
        flex-direction: column;
        gap: 0.75rem;
    }

    .search-button {
        width: 100%;
        justify-content: center;
    }

    .search-input {
        font-size: 0.938rem;
    }
}

/* ===================================
   SPA Page Components
   =================================== */

/* Page Header */
.page-header {
    margin-bottom: 2rem;
    animation: fadeIn 0.4s ease;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-400) 0%, var(--accent-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.breadcrumb {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb a {
    color: var(--primary-400);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--primary-300);
    text-decoration: underline;
}

/* Data Tables */
.data-table {
    width: 100%;
    overflow-x: auto;
    animation: fadeIn 0.5s ease;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.938rem;
}

.data-table thead {
    background: rgba(0, 176, 255, 0.05);
    border-radius: 12px;
}

.data-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.813rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 176, 255, 0.1);
    color: var(--text-primary);
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(0, 176, 255, 0.03);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Detail Cards */
.detail-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: start;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 176, 255, 0.1);
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.938rem;
}

.detail-value {
    color: var(--text-primary);
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.detail-value .expandable {
    flex: 1 1 100%;
    min-width: 0;
}

/* Hash Display */
.hash {
    font-family: 'Monaco', 'Courier New', monospace;
    color: var(--primary-400);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.875rem;
}

.hash:hover {
    color: var(--primary-300);
    text-decoration: underline;
}

.hash-full {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.link-primary {
    color: var(--primary-400);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.link-primary:hover {
    color: var(--primary-300);
    text-decoration: underline;
}

/* Copy Button */
.copy-btn {
    background: rgba(0, 176, 255, 0.1);
    border: 1px solid rgba(0, 176, 255, 0.2);
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: rgba(0, 176, 255, 0.2);
    border-color: var(--primary-300);
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    font-size: 0.813rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge.success {
    background: rgba(0, 230, 118, 0.15);
    color: var(--accent-green-dark);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.badge.failed {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.badge.in {
    background: rgba(0, 230, 118, 0.15);
    color: var(--accent-green-dark);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.badge.out {
    background: rgba(255, 184, 0, 0.15);
    color: var(--accent-yellow-dark);
    border: 1px solid rgba(255, 184, 0, 0.3);
}

/* 트랜잭션 타입 배지 (채움 배경) */
.badge.transfer {
    background: rgba(0, 200, 100, 0.75);
    color: #fff;
    border: 1px solid rgba(0, 200, 100, 0.5);
}

.badge.contract-call {
    background: rgba(0, 150, 220, 0.8);
    color: #fff;
    border: 1px solid rgba(0, 150, 220, 0.5);
}

.badge.contract-creation {
    background: rgba(130, 100, 200, 0.75);
    color: #fff;
    border: 1px solid rgba(130, 100, 200, 0.5);
}

/* 실패 수식어: 배경 연하게 + 빨간 테두리 + 그림자 */
.badge.tx-fail {
    opacity: 0.85;
    border: 2px solid #ff4757 !important;
    box-shadow: 0 0 6px rgba(255, 71, 87, 0.45);
}

/* 범례 컨테이너 */
.tx-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* 카드 헤더 오른쪽 정렬 영역 */
.card-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* 대시보드 배지 셀 */
.tx-badge-cell {
    display: flex;
    align-items: center;
}

/* Transaction List Toolbar & Tabs */
.tx-list-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem 1.5rem 0;
    border-bottom: 1px solid rgba(0, 176, 255, 0.15);
    margin-bottom: 0;
}

.tx-tabs {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.tx-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 10px 10px 0 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid transparent;
    border-bottom: none;
    transition: all 0.2s ease;
    position: relative;
    bottom: -1px;
    background: transparent;
}

.tx-tab:hover {
    color: var(--primary-400);
    background: rgba(0, 176, 255, 0.06);
}

.tx-tab.active {
    color: var(--primary-700);
    background: rgba(0, 176, 255, 0.08);
    border-color: rgba(0, 176, 255, 0.2);
    border-bottom-color: transparent;
}

.tx-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(0, 176, 255, 0.12);
    color: var(--primary-600);
}

.tx-tab.active .tx-tab-count {
    background: rgba(0, 176, 255, 0.22);
    color: var(--primary-700);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.6;
}

/* 스캔 진행 중 UI */
.tx-scan-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    font-size: 0.938rem;
}

.spinner.small {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

/* Mobile: tx-tabs */
@media (max-width: 768px) {
    .tx-list-toolbar {
        padding: 1rem 1rem 0;
        gap: 0.75rem;
    }

    .tx-tab {
        font-size: 0.75rem;
        padding: 0.45rem 0.6rem;
        gap: 0.25rem;
    }

    .tx-tab-count {
        font-size: 0.65rem;
        min-width: 1.2rem;
    }

    .tx-legend {
        justify-content: flex-end;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 176, 255, 0.1);
}

.page-btn {
    padding: 0.625rem 1rem;
    background: rgba(0, 176, 255, 0.05);
    border: 1px solid rgba(0, 176, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.page-btn:hover:not(.disabled) {
    background: rgba(0, 176, 255, 0.15);
    border-color: var(--primary-300);
    transform: translateY(-2px);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-400) 100%);
    border-color: var(--primary-400);
    color: white;
}

.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-ellipsis {
    color: var(--text-secondary);
    padding: 0 0.5rem;
}

/* Gas Progress Bar */
.gas-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 176, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.gas-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-600) 0%, var(--primary-400) 100%);
    border-radius: 999px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.gas-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* Expandable Details */
.expandable {
    margin-top: 0.5rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.expandable summary {
    cursor: pointer;
    padding: 0.5rem 1rem;
    background: rgba(0, 176, 255, 0.05);
    border: 1px solid rgba(0, 176, 255, 0.2);
    border-radius: 8px;
    font-weight: 600;
    color: var(--primary-400);
    transition: all 0.2s ease;
    list-style: none;
}

.expandable summary::-webkit-details-marker {
    display: none;
}

.expandable summary::before {
    content: '▶';
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.2s ease;
}

.expandable[open] summary::before {
    transform: rotate(90deg);
}

.expandable summary:hover {
    background: rgba(0, 176, 255, 0.1);
    border-color: var(--primary-300);
}

.expandable pre {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    font-size: 0.813rem;
    line-height: 1.6;
    overflow-x: auto;
    overflow-wrap: break-word;
    word-break: break-all;
    white-space: pre-wrap;
    max-width: 100%;
    box-sizing: border-box;
    color: var(--text-secondary);
}

/* Event Log Entries */
.log-entry {
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 176, 255, 0.1);
    border-radius: 8px;
}

.log-entry summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.log-entry summary:hover {
    color: var(--primary-400);
}

.log-entry[open] summary {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 176, 255, 0.1);
}

/* Search Results Updates */
.search-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

.search-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.search-type {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-value {
    font-size: 0.938rem;
    color: var(--text-primary);
    font-family: 'Monaco', 'Courier New', monospace;
    word-break: break-all;
}

.search-result-item {
    display: flex;
    align-items: center;
}

.search-no-results {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.938rem;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(0, 176, 255, 0.95);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 10001;
    backdrop-filter: blur(10px);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Error Messages */
.error-message {
    text-align: center;
    padding: 3rem 2rem;
    color: #ff4757;
    font-size: 1.125rem;
    font-weight: 600;
}

.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-page h1 {
    font-size: 6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-400) 0%, #ff4757 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.error-page p {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Loading Spinner Updates */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1.5rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 176, 255, 0.1);
    border-top-color: var(--primary-400);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner p {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Mobile Responsive - SPA Components */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.75rem;
    }

    .breadcrumb {
        font-size: 0.75rem;
        flex-wrap: wrap;
    }

    .card-header-right {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.5rem;
    }

    .tx-legend {
        gap: 0.3rem;
    }

    .tx-legend .badge {
        font-size: 0.65rem !important;
        padding: 0.15rem 0.4rem !important;
    }

    .data-table {
        font-size: 0.813rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 1rem;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .detail-label {
        font-size: 0.813rem;
    }

    .detail-value {
        font-size: 0.875rem;
    }

    .hash-full {
        font-size: 0.75rem;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .page-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.813rem;
    }

    .toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        font-size: 0.875rem;
    }

    /* 일반 data-table: 5번째 컬럼 숨김 */
    .data-table td:nth-child(5),
    .data-table th:nth-child(5) {
        display: none;
    }

    /* =============================================
       tx-list-table 모바일 카드 레이아웃
       — 위의 일반 숨김 규칙과 같은 특이성(0,1,1,1)이지만
         나중에 선언되어 display:block 이 우선 적용됨
       ============================================= */
    .tx-list-table thead { display: none; }

    .tx-list-table,
    .tx-list-table tbody { display: block; width: 100%; }

    .tx-list-table tr {
        display: grid;
        grid-template-areas:
            "badge  time "
            "hash   hash "
            "from   to   "
            "value  value";
        grid-template-columns: 1fr 1fr;
        gap: 0.3rem 0.75rem;
        padding: 0.875rem 1rem;
        background: rgba(255, 255, 255, 0.72);
        border-radius: 14px;
        border: 1px solid var(--border-light);
        margin-bottom: 0.5rem;
        transition: background 0.2s ease, border-color 0.2s ease;
    }

    .tx-list-table tr:hover {
        background: rgba(255, 255, 255, 0.95);
        border-color: var(--primary-300);
    }

    /* td 기본 초기화 (특이성 낮음 — 아래 nth-child 규칙이 덮어씀) */
    .tx-list-table td {
        padding: 0;
        border: none;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.8rem;
    }

    /* 공통 라벨 (::before) */
    .tx-list-table td::before {
        display: block;
        font-size: 0.6rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.45px;
        color: var(--text-tertiary);
        margin-bottom: 0.15rem;
        content: attr(data-label);
    }

    /* 그리드 배치 — display:block 명시로 일반 숨김 override */
    .tx-list-table td:nth-child(1) { display: block; grid-area: hash; }
    .tx-list-table td:nth-child(2) { display: none; }
    .tx-list-table td:nth-child(3) { display: block; grid-area: from; }
    .tx-list-table td:nth-child(4) { display: block; grid-area: to; }
    .tx-list-table td:nth-child(5) { display: block; grid-area: value; font-weight: 600; color: var(--text-primary); }
    .tx-list-table td:nth-child(6) {
        display: block;
        grid-area: time;
        text-align: right;
        color: var(--text-tertiary);
        font-size: 0.75rem;
    }
    .tx-list-table td:nth-child(7) { display: block; grid-area: badge; white-space: normal; }

    /* Time, Status 셀 라벨 숨김 (시간 포맷·배지가 자명) */
    .tx-list-table td:nth-child(6)::before,
    .tx-list-table td:nth-child(7)::before { display: none; }

    /* 모바일에서 범례 숨김 (카드 배지로 대체) */
    .tx-list-toolbar .tx-legend { display: none; }
    .tx-list-toolbar { align-items: flex-start; }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.5rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.625rem 0.75rem;
        font-size: 0.75rem;
    }

    /* 일반 data-table: 4·5번째 컬럼 숨김 */
    .data-table td:nth-child(4),
    .data-table th:nth-child(4),
    .data-table td:nth-child(5),
    .data-table th:nth-child(5) {
        display: none;
    }

    /* tx-list-table: 480px 전용 오버라이드 */
    /* from/to 세로 쌓기 + 일반 숨김 규칙 취소 */
    .tx-list-table tr {
        grid-template-areas:
            "badge  time "
            "hash   hash "
            "from   from "
            "to     to   "
            "value  value";
    }

    .tx-list-table td:nth-child(4) { display: block; grid-area: to; }
    .tx-list-table td:nth-child(5) { display: block; grid-area: value; }
    .tx-list-table td:nth-child(6) { text-align: left; }

    /* 탭 글자 크기 더 줄이기 */
    .tx-tab {
        font-size: 0.7rem;
        padding: 0.4rem 0.5rem;
    }
}
