/* ===================================
   Raptoreum Explorer - Main Stylesheet
   Colors inspired by raptoreum.com
   =================================== */

/* CSS Variables - Raptoreum Theme (Dark with Orange Accents) */
:root {
    /* Primary Colors (Orange theme) */
    --primary: #b45a46;
    --primary-light: #c96d59;
    --primary-dark: #a04a38;
    --secondary: #d67059;
    
    /* Accent Colors */
    --blue: #4a9eff;
    --green: #10b981;
    --orange: #b45a46;
    --red: #ef4444;
    
    /* Background Colors */
    --bg-primary: #000000;
    --bg-secondary: #0d0d0d;
    --bg-card: #1a1a1a;
    --bg-hover: #262626;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #737373;
    
    /* Border Colors */
    --border: #262626;
    --border-light: #404040;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.8);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   Navigation Bar
   =================================== */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.logo svg {
    color: var(--primary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.mobile-menu-overlay.active {
    display: block;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

.nav-link svg {
    width: 18px;
    height: 18px;
}

/* Search Container */
.search-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    min-width: 250px;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

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

.search-button {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
}

/* ===================================
   Main Content
   =================================== */
.main-content {
    min-height: calc(100vh - 70px - 200px);
    padding: 40px 0;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 50px;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

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

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

.stat-icon.purple {
    background: linear-gradient(135deg, #b45a4620 0%, #b45a4640 100%);
    color: var(--primary);
}

.stat-icon.blue {
    background: linear-gradient(135deg, #4a9eff20 0%, #4a9eff40 100%);
    color: var(--blue);
}

.stat-icon.green {
    background: linear-gradient(135deg, #10b98120 0%, #10b98140 100%);
    color: var(--green);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #b45a4620 0%, #b45a4640 100%);
    color: var(--primary);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-change {
    font-size: 13px;
    font-weight: 600;
}

.stat-change.positive {
    color: var(--green);
}

.stat-change.negative {
    color: var(--red);
}

.stat-subtext {
    font-size: 13px;
    color: var(--text-muted);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
}

/* Content Card */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.view-all:hover {
    color: var(--primary-light);
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    text-align: left;
    padding: 16px 24px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.data-table tbody td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 14px;
}

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

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.data-table .loading {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

/* Info List */
.info-list {
    padding: 24px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

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

.info-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.status-online {
    color: var(--green);
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--primary);
}

.footer-section h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 8px;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary);
}

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

.footer-bottom p {
    color: var(--text-muted);
    font-size: 14px;
}

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

/* Tablet */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .search-container {
        min-width: 200px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: 2;
    }
    
    .nav-brand {
        order: 1;
    }
    
    .search-container {
        order: 3;
        width: 100%;
        min-width: auto;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 8px;
        transform: translateX(-100%);
        transition: var(--transition);
        z-index: 999;
        border-right: 1px solid var(--border);
        max-width: 300px;
        height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-link {
        justify-content: flex-start;
        padding: 14px 16px;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .data-table thead th,
    .data-table tbody td {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* Styling für Links in der Tabelle zur Block-Höhe */
.data-table tbody td a {
    color: var(--text-primary); /* Setzt die Linkfarbe auf Weiß (#ffffff) */
    text-decoration: none;      /* Optional: Entfernt die Unterstreichung, falls gewünscht */
    transition: var(--transition); /* Behält den Übergang bei */
}

.data-table tbody td a:hover {
    color: var(--primary-light); /* Optional: Ändert die Farbe beim Hovern zu Hell-Orange */
    text-decoration: underline; /* Optional: Fügt Unterstreichung beim Hovern hinzu */
}

/* ===================================
   Transaction & Block Detail Links
   =================================== */

/* Ensure links maintain proper styling in detail views */
.detail-value a,
.flow-address a,
.summary-card a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.detail-value a:hover,
.flow-address a:hover,
.summary-card a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Link styling in tables */
.link {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

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

/* Monospace text styling */
.mono {
    font-family: 'Courier New', monospace;
}

/* Copy button hover state */
button[onclick*="copyToClipboard"] {
    transition: var(--transition);
}

button[onclick*="copyToClipboard"]:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.nav-brand {
    display: flex;
    flex-direction: column; /* Stapelt Logo und Feedback Button */
    align-items: flex-start;
}

.logo-group {
    display: flex;
    flex-direction: column;
    gap: 4px; /* Abstand zwischen Logo-Zeile und Button */
}

.feedback-mini-btn {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted); /* Dezent grau */
    text-decoration: none;
    color: #000000;
    padding: 2px 8px;
    background: yellow;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
    width: fit-content;
}

.feedback-mini-btn:hover {
    color: var(--primary); /* Deine Hauptfarbe (Orange/Gelb) beim Hover */
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

/* Verhindert, dass die Navbar zu hoch wird */
.navbar {
    padding: 0.5rem 1rem;
}

.number {
    font-variant-numeric: tabular-nums;
}

.decimals {
    font-size: 0.7em;
    vertical-align: baseline;
    opacity: 0.8;
    color: darkgray
}

.api-notice {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.9em;
}

.contact-icons a {
    margin-right: 8px;
    text-decoration: none;
    font-size: 1.1em;
}

.status-online { color: #4caf50; font-weight: bold; }
.status-offline { color: #9e9e9e; }

.full-width { grid-column: 1 / -1; }

.page-footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid #eee;
    color: #666;
}

.stat-card.blue .stat-icon { color: #2196f3; }
.stat-card.purple .stat-icon { color: #9c27b0; }
