/* ============================================
   MT.COX - Bitcoin Exchange Game
   2008-2011 Web 2.0 Era Design
   Inspired by early Mt.Gox, PayPal, web banking
   ============================================ */

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    color: #333;
    background-color: #e8e8e8;
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: #1a3a5c;
    text-decoration: underline;
}

a:hover {
    color: #2a5a8c;
}

h2 {
    font-size: 18px;
    color: #1a3a5c;
    margin-bottom: 14px;
    font-weight: bold;
}

p {
    margin-bottom: 10px;
}

code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    background: #f0f0f0;
    padding: 1px 4px;
    border-radius: 2px;
}

/* === SCREEN MANAGEMENT === */
.screen {
    display: none;
}

.screen.active {
    display: block;
}


/* === CUSTOM SCROLLBARS === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #3a3a5e;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a5a8e;
}


/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 6px 14px;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.15s, box-shadow 0.15s;
    line-height: 1.4;
    vertical-align: middle;
}

.btn:hover {
    opacity: 0.9;
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(180deg, #3a6a9c 0%, #2a5a8c 100%);
    color: #ffffff;
    border-color: #1a4a6c;
}

.btn-primary:hover {
    background: linear-gradient(180deg, #2a5a8c 0%, #1a4a7c 100%);
}

.btn-secondary {
    background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 100%);
    color: #333;
    border-color: #bbb;
}

.btn-secondary:hover {
    background: linear-gradient(180deg, #f0f0f0 0%, #e0e0e0 100%);
}

.btn-buy {
    background: linear-gradient(180deg, #3a9b67 0%, #2e8b57 100%);
    color: #ffffff;
    border-color: #1e7b47;
}

.btn-buy:hover {
    background: linear-gradient(180deg, #2e8b57 0%, #1e7b47 100%);
}

.btn-sell {
    background: linear-gradient(180deg, #dd4444 0%, #cc3333 100%);
    color: #ffffff;
    border-color: #aa2222;
}

.btn-sell:hover {
    background: linear-gradient(180deg, #cc3333 0%, #bb2222 100%);
}

.btn-large {
    padding: 10px 24px;
    font-size: 14px;
    border-radius: 4px;
}

.btn-full {
    width: 100%;
    display: block;
}

.btn-small {
    padding: 3px 8px;
    font-size: 11px;
}


/* ============================================
   FORM ELEMENTS
   ============================================ */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 6px 8px;
    font-size: 13px;
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 3px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    border-color: #2a5a8c;
    box-shadow: 0 0 0 2px rgba(42, 90, 140, 0.15);
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
    font-size: 12px;
    color: #444;
}

.form-error {
    color: #cc3333;
    font-size: 12px;
    margin-top: 4px;
    padding: 4px 8px;
    background: #ffeaea;
    border-radius: 3px;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.form-row label {
    font-size: 12px;
    font-weight: bold;
    color: #444;
    white-space: nowrap;
    min-width: 90px;
}

.form-row input,
.form-row select {
    flex: 1;
}


/* ============================================
   NOTIFICATION POPUP
   ============================================ */
.notification-popup {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10000;
    padding: 10px 18px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    background: #333;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: notif-slide-in 0.3s ease-out;
    max-width: 380px;
}

.notif-success {
    background: #2e8b57;
    border-left: 4px solid #1e6b3a;
}

.notif-error {
    background: #cc3333;
    border-left: 4px solid #991a1a;
}

.notif-warning {
    background: #cc8833;
    border-left: 4px solid #aa6611;
}

.notif-info {
    background: #2a5a8c;
    border-left: 4px solid #1a3a5c;
}

@keyframes notif-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}


/* ============================================
   ACHIEVEMENT POPUP
   ============================================ */
.achievement-popup {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: linear-gradient(180deg, #1a3a5c 0%, #0f2540 100%);
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    border: 2px solid #FFD700;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: achievement-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 280px;
}

.achievement-icon {
    font-size: 28px;
    line-height: 1;
}

.achievement-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.achievement-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #FFD700;
    font-weight: bold;
}

.achievement-name {
    font-size: 15px;
    font-weight: bold;
}

@keyframes achievement-pop {
    0% {
        transform: translateX(-50%) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}


/* ============================================
   TUTORIAL OVERLAY
   ============================================ */
.tutorial-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 8000;
}

.tutorial-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 8001;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    padding: 28px 32px;
    max-width: 460px;
    width: 90%;
    border-top: 4px solid #2a5a8c;
}

.tutorial-step-indicator {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.tutorial-title {
    font-size: 18px;
    font-weight: bold;
    color: #1a3a5c;
    margin-bottom: 10px;
}

.tutorial-text {
    font-size: 13px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 20px;
}

.tutorial-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.tutorial-btn {
    padding: 8px 18px;
    font-size: 13px;
    font-family: Arial, Helvetica, sans-serif;
    border-radius: 3px;
    border: 1px solid #bbb;
    background: #f5f5f5;
    color: #555;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.15s;
}

.tutorial-btn:hover {
    background: #e5e5e5;
}

.tutorial-btn-primary {
    background: linear-gradient(180deg, #3a6a9c 0%, #2a5a8c 100%);
    color: #fff;
    border-color: #1a4a6c;
}

.tutorial-btn-primary:hover {
    background: linear-gradient(180deg, #2a5a8c 0%, #1a4a7c 100%);
}


/* ============================================
   INTRO PAGE
   ============================================ */
.intro-page {
    max-width: 600px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #ccc;
    overflow: hidden;
}

.intro-header {
    background: linear-gradient(180deg, #2a5a8c 0%, #1a3a5c 100%);
    color: #fff;
    padding: 28px 24px 20px;
    text-align: center;
}

.mtcox-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.logo-btc {
    font-size: 36px;
    color: #F7931A;
    line-height: 1;
}

.logo-text {
    font-size: 28px;
    font-weight: bold;
    color: #1a3a5c;
    letter-spacing: 1px;
}

/* Logo text is white when inside the intro header or auth header */
.intro-header .logo-text,
.auth-header .logo-text {
    color: #ffffff;
}

.intro-tagline {
    font-size: 13px;
    color: #b0c8e0;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

.intro-body {
    padding: 24px;
    text-align: center;
}

.intro-price-display {
    margin-bottom: 20px;
    padding: 14px;
    background: #f8faf8;
    border: 1px solid #d8e8d8;
    border-radius: 4px;
}

.intro-price-label {
    font-size: 12px;
    color: #666;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.intro-price-value {
    font-size: 32px;
    font-weight: bold;
    color: #2e8b57;
    margin: 4px 0;
}

.intro-price-change {
    font-size: 13px;
    color: #2e8b57;
    font-weight: bold;
}

.intro-description {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.intro-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}

.intro-feature {
    text-align: center;
    flex: 1;
    max-width: 140px;
    padding: 12px 8px;
    background: #f5f8fc;
    border: 1px solid #dde8f0;
    border-radius: 4px;
}

.intro-feature-icon {
    font-size: 24px;
    margin-bottom: 6px;
    color: #2a5a8c;
}

.intro-feature-text {
    font-size: 12px;
    font-weight: bold;
    color: #444;
}

.intro-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.intro-visitor-count {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}

.intro-footer {
    background: #f5f5f5;
    border-top: 1px solid #ddd;
    padding: 10px 24px;
    text-align: center;
    font-size: 11px;
    color: #888;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.intro-footer span {
    cursor: pointer;
}

.intro-footer span:hover {
    color: #2a5a8c;
}


/* ============================================
   AUTH PAGES (Register / Login / Wallet Setup)
   ============================================ */
.auth-page {
    max-width: 440px;
    margin: 50px auto;
}

.auth-header {
    background: linear-gradient(180deg, #2a5a8c 0%, #1a3a5c 100%);
    color: #fff;
    padding: 20px 24px;
    text-align: center;
    border-radius: 6px 6px 0 0;
    border: 1px solid #1a3a5c;
    border-bottom: none;
}

.auth-card {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 0 0 6px 6px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* When auth-card is used without auth-header preceding it (wallet setup steps) */
.setup-step {
    display: none;
    border-radius: 6px;
}

.setup-step.active {
    display: block;
}

.auth-switch {
    text-align: center;
    margin-top: 14px;
    font-size: 12px;
    color: #666;
}

.setup-info {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 14px;
}

/* Seed Phrase Grid */
.seed-phrase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.seed-word {
    background: #f5f8fc;
    border: 1px solid #ccd8e8;
    border-radius: 3px;
    padding: 6px 8px;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    color: #1a3a5c;
}

.seed-word-num {
    font-size: 10px;
    color: #999;
    font-weight: normal;
    margin-right: 4px;
}

.seed-checkbox {
    margin-bottom: 14px;
    font-size: 13px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 6px;
}

.seed-checkbox label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}


/* ============================================
   GAME HEADER
   ============================================ */
.game-header {
    background: linear-gradient(180deg, #2a5a8c 0%, #1a3a5c 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 44px;
    border-bottom: 2px solid #0f2540;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-logo .logo-btc {
    font-size: 22px;
}

.header-logo .logo-text {
    font-size: 16px;
    color: #ffffff;
}

.header-nav {
    display: flex;
    align-items: center;
    margin-left: 30px;
    gap: 2px;
}

.nav-tab {
    background: none;
    border: none;
    color: #a0b8d0;
    font-size: 13px;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    line-height: 1;
}

.nav-tab:hover {
    color: #d0e0f0;
}

.nav-tab.active {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-balances {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: #c0d4e8;
}

.header-balance-item {
    white-space: nowrap;
}

.header-balance-item strong {
    color: #ffffff;
}

.header-level {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: bold;
    color: #FFD700;
}

.xp-bar {
    width: 60px;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a8ad4 0%, #5a9ae4 100%);
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 0%;
}


/* ============================================
   STREAK COUNTER
   ============================================ */
.streak-counter {
    position: fixed;
    top: 52px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 7000;
    background: linear-gradient(180deg, #1a3a5c 0%, #0f2540 100%);
    color: #FFD700;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: bold;
    border: 2px solid #FFD700;
    box-shadow: 0 2px 12px rgba(255, 215, 0, 0.3);
    animation: streak-bounce 0.5s ease;
}

@keyframes streak-bounce {
    0% { transform: translateX(-50%) scale(0.7); }
    50% { transform: translateX(-50%) scale(1.15); }
    100% { transform: translateX(-50%) scale(1); }
}


/* ============================================
   GAME LAYOUT (3-column)
   ============================================ */
.game-layout {
    display: flex;
    background: #e8e8e8;
    min-height: calc(100vh - 46px);
}

.sidebar {
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #ddd;
    overflow-y: auto;
}

.sidebar-left {
    width: 220px;
    border-right: 1px solid #ccc;
    border-left: none;
    border-top: none;
}

.sidebar-right {
    width: 200px;
    border-left: 1px solid #ccc;
    border-right: none;
    border-top: none;
}

.main-content {
    flex: 1;
    padding: 8px;
    background: #efefef;
    min-width: 0;
}


/* ============================================
   PANELS
   ============================================ */
.panel {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
    overflow: hidden;
}

.panel-header {
    background: linear-gradient(180deg, #2a5a8c 0%, #1a3a5c 100%);
    color: #ffffff;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.3px;
}

.panel-desc {
    padding: 8px 10px;
    font-size: 12px;
    color: #666;
    border-bottom: 1px solid #eee;
    margin-bottom: 0;
}

/* Panels inside sidebars have no margin rounding (flush) */
.sidebar .panel {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-bottom: 0;
    border-top: none;
}

.sidebar .panel + .panel {
    border-top: none;
}


/* ============================================
   NEWS
   ============================================ */
.news-ticker {
    background: #0f2540;
    color: #FFD700;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid #1a3a5c;
}

.news-feed {
    max-height: 240px;
    overflow-y: auto;
}

.news-item {
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
    font-size: 12px;
    transition: background 0.2s;
}

.news-item:hover {
    background: #f8f8f8;
}

.news-item.new-item {
    animation: news-flash 0.6s ease;
}

@keyframes news-flash {
    0% { background: #fff8d0; }
    100% { background: transparent; }
}

.news-time {
    font-size: 10px;
    color: #999;
    display: block;
    margin-bottom: 1px;
}

.news-title {
    font-weight: bold;
    font-size: 12px;
    color: #333;
}

.news-body {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
    line-height: 1.4;
}

.news-bullish .news-title {
    color: #2e8b57;
}

.news-bearish .news-title {
    color: #cc3333;
}

.news-action .news-title {
    color: #cc8833;
}

.news-info .news-title {
    color: #2a5a8c;
}


/* ============================================
   TROLLBOX
   ============================================ */
.trollbox-feed {
    background: #1a1a2e;
    max-height: 200px;
    overflow-y: auto;
    padding: 6px 8px;
}

.trollbox-msg {
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 1.4;
    word-wrap: break-word;
}

.trollbox-username {
    color: #FFD700;
    font-weight: bold;
    margin-right: 4px;
}

.trollbox-text {
    color: #e0e8f0;
}


/* ============================================
   TAB CONTENT
   ============================================ */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}


/* ============================================
   PRICE DISPLAY
   ============================================ */
.price-display-panel {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 8px;
}

.price-main-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
}

.price-label {
    font-size: 12px;
    font-weight: bold;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-main {
    font-size: 26px;
    font-weight: bold;
    color: #1a3a5c;
}

.price-change-up {
    font-size: 13px;
    font-weight: bold;
    color: #2e8b57;
}

.price-change-down {
    font-size: 13px;
    font-weight: bold;
    color: #cc3333;
}

.price-change-neutral {
    font-size: 13px;
    font-weight: bold;
    color: #888;
}

.price-details-row {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: #888;
}

.price-details-row strong {
    color: #444;
}


/* ============================================
   CHART PANEL
   ============================================ */
.chart-panel {
    background: #0a0e17;
    border: 1px solid #1e2d4a;
    border-radius: 6px;
    margin-bottom: 8px;
    padding: 0;
    overflow: hidden;
}

.chart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: linear-gradient(180deg, #111827 0%, #0d1321 100%);
    border-bottom: 1px solid #1e2d4a;
}

.chart-mode-tabs {
    display: flex;
    gap: 2px;
    background: #0a0e17;
    border-radius: 4px;
    padding: 2px;
    border: 1px solid #1e2d4a;
}

.chart-tab {
    padding: 4px 12px;
    font-size: 11px;
    font-family: Consolas, 'Lucida Console', monospace;
    font-weight: bold;
    color: #5a6a8a;
    background: transparent;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: 0.5px;
}

.chart-tab:hover {
    color: #8a9aba;
    background: rgba(42, 58, 92, 0.3);
}

.chart-tab.active {
    color: #e0e8f0;
    background: #1e2d4a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.chart-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-label {
    font-family: Consolas, 'Lucida Console', monospace;
    font-size: 13px;
    font-weight: bold;
    color: #e0e8f0;
    letter-spacing: 0.3px;
}

#tv-chart-container {
    width: 100%;
    height: 380px;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 5px 10px;
    background: #0d1321;
    border-top: 1px solid #1e2d4a;
    font-size: 10px;
    font-family: Consolas, monospace;
    color: #5a6a8a;
}

.legend-entry {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 3px;
    border-radius: 1px;
}

.legend-entry-price {
    background: #f0b90b;
}

.legend-liq-price {
    background: #ea3943;
}

.legend-current-price {
    background: #00d2ff;
}


/* ============================================
   TRADE PANELS (Buy / Sell)
   ============================================ */
.trade-panels {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.trade-panel {
    flex: 1;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.trade-panel-header {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
}

.buy-header {
    background: linear-gradient(180deg, #3a9b67 0%, #2e8b57 100%);
}

.sell-header {
    background: linear-gradient(180deg, #dd4444 0%, #cc3333 100%);
}

.trade-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.trade-table td {
    padding: 6px 10px;
    border-top: 1px solid #eee;
    vertical-align: middle;
}

.trade-table tr:first-child td {
    border-top: none;
}

.input-with-btn {
    display: flex;
    gap: 4px;
    align-items: center;
}

.input-with-btn input {
    flex: 1;
    min-width: 0;
}


/* ============================================
   LOG FEED (Trade History, Tx Log)
   ============================================ */
.log-feed {
    max-height: 160px;
    overflow-y: auto;
    padding: 6px 10px;
    font-size: 12px;
}

.log-entry {
    padding: 3px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
    line-height: 1.4;
}

.log-buy {
    color: #2e8b57;
}

.log-sell {
    color: #cc3333;
}

.log-error {
    color: #cc3333;
    font-weight: bold;
}

.log-success {
    color: #2e8b57;
    font-weight: bold;
}


/* ============================================
   LEVERAGE PANEL
   ============================================ */
.leverage-panel {
    position: relative;
}

.leverage-controls {
    padding: 10px;
}

.leverage-buttons {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.leverage-position-info {
    padding: 0 10px 10px;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.info-table td {
    padding: 4px 8px;
    border-bottom: 1px solid #eee;
}

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

.info-table td:first-child {
    font-weight: bold;
    color: #666;
    width: 40%;
}

.info-table td:last-child {
    color: #333;
}


/* ============================================
   MINING TAB
   ============================================ */
.mining-controls {
    padding: 10px;
    display: flex;
    gap: 6px;
}

.mining-terminal {
    background: #0a0a1a;
    color: #00ff00;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    padding: 8px 10px;
    max-height: 200px;
    overflow-y: auto;
    line-height: 1.5;
}

.terminal-line {
    margin-bottom: 2px;
    word-wrap: break-word;
}

.system-msg {
    color: #00aaff;
}

.hash-miss {
    color: #555577;
}

.hash-hit {
    color: #00ff88;
    font-weight: bold;
}

.error-msg {
    color: #ff4444;
}

.reward-msg {
    color: #FFD700;
    font-weight: bold;
}


/* ============================================
   MINING PUZZLE
   ============================================ */
.mining-puzzle-area {
    position: relative;
}

.puzzle-content {
    padding: 12px;
    background: #0f1b2e;
    color: #e0e8f0;
}

.puzzle-target {
    margin-bottom: 8px;
}

.puzzle-label {
    font-size: 11px;
    color: #8899aa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 6px;
}

.puzzle-hash {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    color: #00ff88;
    word-break: break-all;
}

.puzzle-timer-display {
    font-size: 14px;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 10px;
}

.puzzle-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.puzzle-option {
    background: #1a2a3e;
    border: 1px solid #2a4a6e;
    border-radius: 4px;
    padding: 8px 10px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    color: #00ff88;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
    word-break: break-all;
}

.puzzle-option:hover {
    border-color: #FFD700;
    background: #1a3050;
}

.puzzle-option.correct {
    background: #1a4a2e;
    border-color: #2e8b57;
    color: #00ff88;
}

.puzzle-option.wrong {
    background: #4a1a1a;
    border-color: #cc3333;
    color: #ff6666;
}

.puzzle-result {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
}

.puzzle-result.success {
    background: rgba(46, 139, 87, 0.2);
    color: #00ff88;
    border: 1px solid #2e8b57;
}

.puzzle-result.fail {
    background: rgba(204, 51, 51, 0.2);
    color: #ff6666;
    border: 1px solid #cc3333;
}


/* ============================================
   UPGRADE TABLE (Hardware Shop)
   ============================================ */
.upgrade-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.upgrade-table th {
    background: #f0f0f0;
    border-bottom: 2px solid #ddd;
    padding: 6px 10px;
    text-align: left;
    font-size: 11px;
    font-weight: bold;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.upgrade-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.upgrade-table tr:hover {
    background: #f8f8f8;
}

.upgrade-table .locked {
    color: #999;
}

.upgrade-table .locked td {
    color: #999;
}

.upgrade-table .owned td {
    background: #f0f8f0;
    color: #2e8b57;
}

.locked {
    opacity: 0.7;
}

.owned {
    background: #f0f8f0;
}


/* ============================================
   WALLET TAB
   ============================================ */
.seed-reveal-section {
    padding: 10px;
}

.seed-phrase-reveal {
    margin-top: 8px;
    background: #f5f8fc;
    border: 1px solid #ccd8e8;
    border-radius: 4px;
    padding: 10px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    color: #1a3a5c;
    line-height: 1.6;
    word-wrap: break-word;
}

.transfer-buttons {
    padding: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.faucet-cooldown {
    font-size: 12px;
    color: #888;
    margin-left: 8px;
}


/* ============================================
   HACK DEFENSE
   ============================================ */
.hack-defense-area {
    border-color: #cc3333;
}

.hack-alert {
    padding: 12px;
    background: #fff5f5;
}

.hack-title {
    font-size: 16px;
    font-weight: bold;
    color: #cc3333;
    margin-bottom: 6px;
}

.hack-desc {
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.5;
}

.hack-code {
    background: #0a0a1a;
    color: #00ff88;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 3px;
    margin-bottom: 10px;
    word-break: break-all;
    line-height: 1.5;
}

.hack-input {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.hack-input input {
    flex: 1;
}

.hack-timer {
    font-size: 14px;
    font-weight: bold;
    color: #cc3333;
    margin-bottom: 8px;
}

.hack-submit-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #dd4444 0%, #cc3333 100%);
    color: #fff;
    border: 1px solid #aa2222;
    border-radius: 3px;
    cursor: pointer;
}

.hack-submit-btn:hover {
    background: linear-gradient(180deg, #cc3333 0%, #bb2222 100%);
}


/* ============================================
   FEATURE LOCK OVERLAY
   ============================================ */
.feature-lock {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 4px;
}

.lock-icon {
    font-size: 32px;
    margin-bottom: 6px;
    opacity: 0.8;
}

.lock-text {
    color: #ccc;
    font-size: 13px;
    font-weight: bold;
}


/* ============================================
   MINI BAR (Temperature)
   ============================================ */
.mini-bar {
    display: inline-block;
    width: 60px;
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    overflow: hidden;
    vertical-align: middle;
    margin-left: 6px;
}

.mini-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2e8b57 0%, #cc8833 50%, #cc3333 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}


/* ============================================
   RIGHT SIDEBAR
   ============================================ */

/* Progress Bar */
.progress-container {
    padding: 10px;
}

.progress-track {
    height: 14px;
    background: #1a1a2e;
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid #333;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #cc8833 0%, #FFD700 50%, #ffaa00 100%);
    border-radius: 7px;
    transition: width 0.5s ease;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
}

.progress-text {
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    color: #666;
    margin-top: 4px;
}

/* Stats Table */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.stats-table td {
    padding: 4px 10px;
    border-bottom: 1px solid #f0f0f0;
}

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

.stats-table td:first-child {
    color: #888;
    font-weight: bold;
    font-size: 11px;
}

.stats-table td:last-child {
    text-align: right;
    color: #333;
    font-weight: bold;
}

/* Fear & Greed */
.fear-greed-value {
    text-align: center;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: bold;
    color: #444;
}

.fear-greed-track {
    height: 14px;
    background: linear-gradient(90deg, #cc3333 0%, #cc8833 25%, #cccc33 50%, #88cc33 75%, #2e8b57 100%);
    border-radius: 7px;
    margin: 0 10px 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid #aaa;
}

.fear-greed-bar {
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    position: absolute;
    right: 0;
    top: 0;
    transition: width 0.5s ease;
}

/* Event Alert */
.event-alert-panel {
    border-color: #cc8833;
}

.event-alert-panel .panel-header {
    background: linear-gradient(180deg, #dd8844 0%, #cc7733 100%);
}

.event-description {
    padding: 8px 10px;
    font-size: 12px;
    color: #555;
    line-height: 1.5;
    border-bottom: 1px solid #eee;
}

.event-details {
    padding: 8px 10px;
    font-size: 11px;
    color: #666;
    line-height: 1.6;
}

.event-details code {
    font-size: 10px;
}

.event-timer {
    margin-top: 6px;
    font-weight: bold;
    color: #cc3333;
    font-size: 13px;
}

/* Achievements */
.achievements-list {
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.achievement-badge {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: default;
    border: 1px solid #ddd;
    transition: transform 0.15s;
    position: relative;
}

.achievement-badge:hover {
    transform: scale(1.1);
}

.achievement-badge.unlocked {
    background: linear-gradient(180deg, #fff8d0 0%, #ffeeaa 100%);
    border-color: #FFD700;
    box-shadow: 0 1px 4px rgba(255, 215, 0, 0.3);
}

.achievement-badge.locked {
    background: #f0f0f0;
    border-color: #ddd;
    opacity: 0.5;
    filter: grayscale(1);
}

.ach-icon {
    font-size: 16px;
    line-height: 1;
}

.ach-name {
    font-size: 7px;
    color: #666;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 34px;
}


/* ============================================
   WIN SCREEN
   ============================================ */
.win-page {
    max-width: 560px;
    margin: 50px auto;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid #ccc;
    padding: 30px;
    text-align: center;
}

.win-page .mtcox-logo {
    margin-bottom: 20px;
}

.win-content {
    padding: 0 10px;
}

.win-title {
    font-size: 28px;
    font-weight: bold;
    color: #1a3a5c;
    margin-bottom: 10px;
}

.win-message {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.win-stats {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.win-stats .stats-table {
    font-size: 13px;
}

.win-stats .stats-table td {
    padding: 6px 14px;
}

.win-tier {
    font-size: 20px;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 20px;
    padding: 10px;
    background: linear-gradient(180deg, #1a3a5c 0%, #0f2540 100%);
    border-radius: 4px;
    border: 2px solid #FFD700;
}

.win-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}


/* ============================================
   UTILITY & MISC
   ============================================ */

/* Panel content areas that need padding */
.panel > p,
.panel > .btn {
    margin: 10px;
}

.panel > .form-group {
    padding: 0 10px;
}

.panel > .form-group:first-of-type {
    padding-top: 10px;
}

.panel > .btn-full,
.panel > .btn-primary {
    margin: 10px;
    width: calc(100% - 20px);
}

/* Selection color */
::selection {
    background: #2a5a8c;
    color: #fff;
}

/* Faucet button container */
.panel > .btn + .faucet-cooldown {
    display: inline-block;
    margin-left: 4px;
}
