:root {
    --primary-color: #8b5cf6;
    --primary-dark: #7c3aed;
    --text-dark: #1e293b;
    --text-light: #f1f5f9;
    --card-bg: #ffffff;
    --light-bg: #f8fafc;
    --darker-bg: #1e293b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 0.75rem;
    --header-height: 80px;
}

[data-theme="dark"] {
    --text-dark: #f1f5f9;
    --text-light: #ff0000;
   
    
    --card-bg: #1e293b;
    --light-bg: #0f172a;
    --darker-bg: #020617;
    --border-color: #334155;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ===== Logo ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    user-select: none;
}

/* Falcon icon (logo.png) */
.logo-icon {
    height: 34px;        /* ICON SIZE */
    width: auto;
    max-width: 34px;
}

/* Brand text */
.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary, #0f172a);
}

/* ===== Mobile Optimization ===== */
@media (max-width: 768px) {
    .logo-icon {
        height: 28px;
        max-width: 28px;
    }

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

    .header {
        padding: 0 12px;
    }
}

/* ===== Large Screens ===== */
@media (min-width: 1024px) {
    .logo-icon {
        height: 42px;
        max-width: 42px;
    }

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





/* Header */
.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 100;
    box-shadow: var(--shadow);
}

.logo1 {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
}

.logo-icon1 {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    font-weight: bold;
}

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

.pool-btn {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
}

.pool-btn span {
    color: var(--text-dark);
}

.pool-dropdown {
    position: relative;
}

.pool-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    z-index: 10;
}

.pool-dropdown:hover .pool-dropdown-content {
    display: block;
}

.pool-dropdown-content a {
    padding: 0.75rem 1rem;
    display: block;
    text-decoration: none;
    color: var(--text-dark);
}

.pool-dropdown-content a:hover,
.pool-dropdown-content a.active {
    background: var(--primary-color);
    color: white;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* Layout */
.layout-container {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

.sidebar {
    width: 280px;
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 2rem 0;
    z-index: 50;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s;
}

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

.nav-link i {
    margin-right: 1rem;
    width: 20px;
    text-align: center;
}

.content-area {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    color: #64748b;
}

.footer-links a {
    margin: 0 1rem;
    font-size: 1.5rem;
    color: var(--text-dark);
    opacity: 0.7;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary-color);
}

/* Components */
.page-header { margin-bottom: 2rem; }
.page-title { font-size: 2rem; font-weight: 700; display: flex; align-items: center; gap: 0.75rem; color: var(--text-dark); }
.page-subtitle { color: #64748b; margin-top: 0.5rem; font-size: 1.1rem; }

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

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.stat-title { font-size: 0.9rem; color: #64748b; margin-bottom: 0.5rem; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--primary-color); }
.stat-subtitle { font-size: 0.9rem; color: #64748b; margin-top: 0.5rem; }

.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.chart-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.chart-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chart-container { height: 350px; position: relative; }

.table-container {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.table-header {
    padding: 1.5rem;
    background: var(--light-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.table-title {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.table-count { font-size: 0.95rem; color: #64748b; }

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

thead th {
    text-align: left;
    padding: 1rem 1.5rem;
    background: var(--light-bg);
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

tbody tr {
    border-bottom: 1px solid var(--border-color);
}

tbody td {
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
}

.explorer-link, .hash-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.explorer-link:hover, .hash-link:hover {
    text-decoration: underline;
}

.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success { background: #10b981; color: white; }
.badge-warning { background: #f59e0b; color: white; }
.badge-danger { background: #ef4444; color: white; }
.badge-info { background: #3b82f6; color: white; }
.badge-primary { background: var(--primary-color); color: white; }

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    margin-left: 0.5rem;
    font-size: 1rem;
}

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

/* Search Box (Active Miners) */
.search-box {
    position: relative;
    margin-bottom: 1.5rem;
    max-width: 500px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--card-bg);
    font-size: 1rem;
    color: var(--text-dark);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.page-link {
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--card-bg);
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
}

.page-link:hover:not(.disabled):not(.active) {
    background: var(--light-bg);
    border-color: var(--primary-color);
}

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

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Form inputs (Miner Dashboard) */
.form-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--card-bg);
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.form-input::placeholder {
    color: #94a3b8;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--light-bg);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    background-color: var(--darker-bg);
    color: white;
    text-align: center;
    border-radius: var(--radius);
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -150px;
    width: 300px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Info cards (Getting Started) */
.info-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.info-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.info-value {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Loading & Empty */
.loading, .empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.notification {
    position: fixed;
    top: 100px;
    right: 24px;
    padding: 14px 24px;
    background-color: #10b981;
    color: white;
    border-radius: var(--radius);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    animation: fadeIn 0.3s;
}

/* Dark mode fixes */
[data-theme="dark"] .pool-btn span,
[data-theme="dark"] .pool-dropdown-content a {
    color: var(--text-light) !important;
}

[data-theme="dark"] .pool-dropdown-content a:hover,
[data-theme="dark"] .pool-dropdown-content a.active {
    color: white !important;
}

[data-theme="dark"] .info-card h4 {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .info-card div[style*="background: var(--darker-bg)"] {
    color: #e2e8f0 !important;
    background: #1a1a2e !important;
}

[data-theme="dark"] .info-card div[style*="background"] {
    border-left-color: var(--primary-color) !important;
}
