:root {
    --bg-color: #0e1117;
    --card-bg: #1e2130;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-green: #00ff9d;
    --accent-blue: #2962ff;
    --font-main: 'Inter', sans-serif;
}

.btn-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    border-bottom: 1px dotted var(--text-secondary);
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: var(--accent-green);
    border-bottom-color: var(--accent-green);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    background-image: linear-gradient(rgba(14, 17, 23, 0.5), rgba(14, 17, 23, 0.85)), url('assets/hero_bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-img {
    height: 96px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(0, 255, 157, 0.2));
}

.logo-text {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: #ffffff;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 1.5rem;
    line-height: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

header {
    width: 100%;
    display: flex;
    justify-content: center; /* Center the banner */
    align-items: center;
    padding: 2rem 3rem; /* Reduced top padding back to a balanced level */
    margin-bottom: 8rem; /* Significantly increased spacing below header */
    position: relative;
    z-index: 10;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.banner-img {
    height: 220px; /* The sweet spot size */
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(0, 255, 157, 0.3));
    transition: filter 0.3s ease;
}

.banner-img:hover {
    filter: drop-shadow(0 0 30px rgba(0, 255, 157, 0.6));
}

.status-badge {
    position: absolute; /* Absolute positioning to keep it on the right */
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 255, 157, 0.05);
    color: var(--accent-green);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(0, 255, 157, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.1);
}

.status-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-green);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Command Centre Button */
.command-centre-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.command-centre-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.command-centre-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(0, 255, 157, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 157, 0);
    }
}

/* Embedded Terminal */
.terminal-embedded {
    margin-top: 1.5rem;
    width: 100%;
    max-width: 600px;
    height: 180px;
    background: rgba(10, 10, 15, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #00ff9d;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.terminal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.6rem;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
}

.terminal-content {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    opacity: 0.8;
}

.log-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Genesis Card Styling */
.genesis-card {
    border-color: rgba(255, 215, 0, 0.3); /* Gold tint */
    background: rgba(30, 33, 48, 0.8);
    display: flex;
    flex-direction: row; /* Horizontal layout */
    justify-content: space-around; /* Space out the two items */
    align-items: center;
}

.genesis-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.genesis-card .label {
    color: #ffd700; /* Gold */
    font-size: 0.7rem;
    margin-bottom: 0.2rem;
}

.genesis-card .value {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
    font-size: 1.5rem;
}


.dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    margin-bottom: 4rem;
}

.hero-content h1 {
    font-size: 5rem;
    line-height: 1;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #888);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-visual {
    display: flex;
    flex-direction: column; /* Stack grid and terminal */
    align-items: center;    /* Center them */
    gap: 2rem;              /* Space between grid and terminal */
    perspective: 1000px;
}

.glass-card {
    width: 100%;
    max-width: 600px;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(0, 255, 157, 0.2));
    animation: float 6s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes float {
    0% { transform: translateY(0px) rotateY(-5deg); }
    50% { transform: translateY(-20px) rotateY(5deg); }
    100% { transform: translateY(0px) rotateY(-5deg); }
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    max-width: 600px;
}

/* --- LIVE DECK WIDGET --- */
.live-deck-widget {
    background: rgba(30, 33, 48, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    /* Animation inherited from glass-card class if applied */
}

.deck-header {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 1px;
}

.deck-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.deck-item {
    display: flex;
    flex-direction: column;
}

.d-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.d-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}
/* ------------------------ */

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 600px;
}

.col-span-2 {
    grid-column: span 2;
}

.stat-card {
    background: rgba(30, 33, 48, 0.6);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 0; /* Allow shrinking */
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 255, 157, 0.1);
    border-color: rgba(0, 255, 157, 0.3);
}

.stat-card .label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.profit {
    color: var(--accent-green);
}

.cta-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
    margin-top: 2rem;
}

.feature-card {
    background: rgba(30, 33, 48, 0.6);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(45, 49, 66, 0.8);
    display: flex; /* Horizontal layout */
    align-items: center;
    gap: 2rem;
    text-align: left;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-green);
}

.feature-icon {
    width: 280px; /* Increased for better visual impact */
    height: 280px;
    object-fit: contain;
    margin-bottom: 0;
    filter: drop-shadow(0 0 15px rgba(0, 255, 157, 0.2));
    flex-shrink: 0;
}

.feature-content {
    display: flex;
    flex-direction: column;
}

.feature-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.feature-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-primary {
    background: transparent;
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
}

.btn-primary:hover {
    background: var(--accent-green);
    color: var(--bg-color);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
}

.btn-secondary {
    border: 1px solid #2d3142;
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
}

footer {
    border-top: 1px solid #2d3142;
    padding-top: 2rem;
    padding-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- PERFORMANCE PAGE STYLES --- */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

.chart-container {
    background: var(--card-bg);
    border: 1px solid #2d3142;
    border-radius: 12px;
    padding: 1.5rem;
    height: 400px;
    margin-bottom: 2rem;
    position: relative;
}

.audit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.audit-card {
    background: var(--card-bg);
    border: 1px solid #2d3142;
    border-radius: 12px;
    padding: 1.5rem;
}

.audit-card h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.table-wrapper {
    max-height: 400px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th {
    text-align: left;
    color: #666;
    padding-bottom: 1rem;
    font-weight: 400;
    font-size: 0.8rem;
}

td {
    padding: 0.8rem 0;
    border-bottom: 1px solid #2d3142;
}

.text-green { color: var(--accent-green); }
.text-red { color: #ff2957; }

.coin-tag {
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: monospace;
}

@media (max-width: 768px) {
    /* Header Adjustments */
    header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 3rem; /* Adjusted for mobile */
    }
    
    .header-banner {
        width: 100%;
        justify-content: center;
    }
    
    .banner-img {
        height: auto;
        max-height: 100px; /* Much smaller on mobile */
        width: auto;
        max-width: 100%;
    }

    .status-badge {
        position: static; /* No longer absolute */
        transform: none;
        margin-top: 0.5rem;
        align-self: center;
    }

    .command-centre-btn {
        width: 50px;
        height: 50px;
        top: 15px;
        right: 15px;
    }

    /* Hero Adjustments */
    .hero-split {
        display: flex;
        flex-direction: column;
        gap: 3rem;
        margin-bottom: 3rem;
    }

    .hero-content {
        text-align: center;
        order: 1; /* Content first */
    }

    .hero-visual {
        order: 2; /* Visual second */
        width: 100%;
    }

    .hero-content h1 {
        font-size: 2.5rem; /* Smaller title */
        margin-bottom: 1rem;
    }
    
    .subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        margin-left: auto;
        margin-right: auto;
    }
    
    .cta-group {
        justify-content: center;
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    /* Metrics Grid */
    .metrics-grid {
        grid-template-columns: 1fr; /* Stack metrics */
        gap: 1rem;
    }
    
    .col-span-2 {
        grid-column: span 1;
    }
    
    .genesis-card {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.5rem;
    }

    /* Features */
    .feature-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .feature-icon {
        width: 120px;
        height: 120px;
        margin-bottom: 0.5rem;
    }

    /* General Container */
    .container {
        padding: 1rem;
    }
    
    /* Footer */
    footer {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    /* Performance Page Specifics */
    .audit-grid { 
        grid-template-columns: 1fr; 
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .chart-container {
        height: 300px; /* Slightly shorter on mobile */
        padding: 0.5rem;
    }
}

/* System Selector Tabs */
.system-tabs {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.3); /* Darker background for contrast */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px; /* More rounded */
    padding: 6px;
    margin-bottom: 2rem;
    gap: 8px; /* More space between buttons */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); /* Lift it off the page */
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05); /* Visible default background */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Visible default border */
    padding: 0.85rem 2rem; /* Larger click area */
    color: #a0a0a0;
    font-family: var(--font-main);
    font-weight: 700; /* Bolder text */
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase; /* Make it look like a UI element */
    letter-spacing: 1px;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px); /* Subtle lift */
}

.tab-btn .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #444;
    transition: background-color 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5); /* Inset shadow for depth */
}

/* Active State - Classic (Green) */
.tab-btn.active#tab-classic {
    background: linear-gradient(180deg, rgba(0, 255, 157, 0.15) 0%, rgba(0, 255, 157, 0.05) 100%);
    color: #00ff9d;
    border: 1px solid #00ff9d; /* Solid border */
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.2); /* Glow */
}

.tab-btn.active#tab-classic .status-dot {
    background-color: #00ff9d;
    box-shadow: 0 0 10px #00ff9d;
}

/* Active State - Trinity (Purple) */
.tab-btn.active#tab-trinity {
    background: linear-gradient(180deg, rgba(167, 139, 250, 0.15) 0%, rgba(167, 139, 250, 0.05) 100%);
    color: #a78bfa;
    border: 1px solid #a78bfa; /* Solid border */
    box-shadow: 0 0 15px rgba(167, 139, 250, 0.2); /* Glow */
}

.tab-btn.active#tab-trinity .status-dot {
    background-color: #a78bfa;
    box-shadow: 0 0 10px #a78bfa;
}

/* Trinity Mode Overrides */
body.trinity-mode {
    --accent-green: #a78bfa; /* Purple */
    --accent-blue: #8b5cf6; /* Darker Purple */
}

body.trinity-mode .status-badge {
    border-color: rgba(139, 92, 246, 0.3) !important;
    color: #a78bfa !important;
}

body.trinity-mode .dot {
    background-color: #a78bfa !important;
    box-shadow: 0 0 10px #a78bfa !important;
}

body.trinity-mode h2 {
    color: #a78bfa !important;
}

body.trinity-mode .genesis-item .label {
    color: #a78bfa !important;
}

