/* GLOBAL RESET */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: "Inter", sans-serif; 
}

:root { 
    --stake-green: #1fff87; 
    --purple-main: #a044ff; 
    --bg-black: #0b0610; 
    --error-red: #ff4b4b;
    --nav-height: 80px;
}

body { 
    display: flex; 
    flex-direction: column; 
    height: 100vh; 
    background: var(--bg-black); 
    color: #ffffff; 
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
}

/* HEADER - Desktop */
header {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 0 40px; 
    height: var(--nav-height); 
    background: rgba(15, 0, 30, 0.95);
    border-bottom: 2px solid rgba(160, 68, 255, 0.3); 
    z-index: 100;
}

.toplogo { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    flex: 1; 
}

.toplogo img { 
    height: 45px; 
    width: 45px; 
    border-radius: 50%; 
    border: 2px solid var(--purple-main); 
}

.toplogo h1 { 
    font-family: 'Rajdhani', sans-serif; 
    font-size: 1.4rem; 
    letter-spacing: 1px;
}

.toplogo h1 span { color: var(--stake-green); }

/* NAVIGATION - Desktop center */
nav { flex: 2; display: flex; justify-content: center; }
.nav-list { list-style: none; display: flex; gap: 8px; }

.nav-link {
    text-decoration: none; 
    color: #ffffff; 
    font-weight: 800; 
    font-size: 0.8rem;
    padding: 10px 15px; 
    border-radius: 8px; 
    transition: 0.3s;
}

.nav-link.active {
    color: var(--stake-green);
    background: rgba(31, 255, 135, 0.1);
    border: 1px solid rgba(31, 255, 135, 0.2);
}

/* STATUS INDICATOR */
.header-spacer { flex: 1; display: flex; justify-content: flex-end; }
.status-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    border: 1px solid rgba(160, 68, 255, 0.3);
}

.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.live { background: var(--stake-green); animation: pulse 2s infinite; }
.status-dot.offline { background: var(--error-red); }
.status-text { font-family: 'Rajdhani'; font-weight: 800; font-size: 0.75rem; color: #fff; }

/* MAIN IFRAME AREA */
main { flex: 1; width: 100%; height: calc(100vh - var(--nav-height)); }
iframe { width: 100%; height: 100%; border: none; }

/* MOBILE OPTIMIZATIONS (Under 768px) */
@media (max-width: 768px) {
    header {
        padding: 0 15px;
        height: 60px;
    }

    .toplogo h1 { font-size: 1.1rem; }
    .toplogo img { height: 35px; width: 35px; }

    /* Hide the text on mobile status to save space */
    .status-text { display: none; }
    .status-container { padding: 8px; }

    /* MOVES NAV TO BOTTOM (App style) */
    nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #0f001e;
        border-top: 2px solid rgba(160, 68, 255, 0.3);
        padding: 10px 0;
        z-index: 1000;
        flex: none;
    }

    .nav-list {
        justify-content: space-around;
        width: 100%;
        gap: 0;
    }

    .nav-link {
        font-size: 0.65rem;
        padding: 5px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Adjust main to make room for bottom nav */
    main {
        height: calc(100vh - 120px); 
        margin-bottom: 60px;
    }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(31, 255, 135, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(31, 255, 135, 0); }
    100% { box-shadow: 0 0 0 0 rgba(31, 255, 135, 0); }
}