/* 全局樣式 */
:root {
    --primary-color: #f7931a;
    --secondary-color: #ff9500;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    --border-radius: 10px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

/* 導航欄樣式 */
.navbar {
    background: linear-gradient(90deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    border-bottom: 2px solid var(--primary-color);
    box-shadow: var(--box-shadow);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-brand i {
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 統計卡片樣式 */
.stat-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
    border: 1px solid #444;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    margin-bottom: 20px;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.stat-card h3 {
    font-weight: bold;
    margin: 0;
}

/* 挖礦面板樣式 */
.mining-panel {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
    border: 1px solid #444;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.mining-panel .card-header {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    border: none;
}

.mining-panel .card-header h4 {
    margin: 0;
    font-weight: bold;
}
.mining-panel .row .card-body {
    background-color: #4d4d4d;
}

/* 信息框樣式 */
.info-box {
    background: linear-gradient(135deg, #3d3d3d 0%, #4d4d4d 100%);
    border: 1px solid #555;
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.info-box:hover {
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.info-box h6 {
    color: #ccc;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.info-box h4 {
    margin: 0;
    font-weight: bold;
}

/* 表單元素樣式 */
.form-control, .form-select {
    background: #3d3d3d;
    border: 1px solid #555;
    color: white;
    border-radius: var(--border-radius);
}

.form-control:focus, .form-select:focus {
    background: #4d4d4d;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(247, 147, 26, 0.25);
    color: white;
}

.form-control::placeholder {
    color: #aaa;
}

/* 按鈕樣式 */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

.btn-primary:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(247, 147, 26, 0.3);
}

.btn-success {
    background: linear-gradient(45deg, var(--success-color), #20c997);
}

.btn-success:hover {
    background: linear-gradient(45deg, #20c997, var(--success-color));
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(45deg, var(--warning-color), #fd7e14);
    color: #212529;
}

.btn-warning:hover {
    background: linear-gradient(45deg, #fd7e14, var(--warning-color));
    transform: translateY(-2px);
    color: #212529;
}

/* 挖礦狀態樣式 */
.mining-status {
    background: #3d3d3d;
    border-radius: var(--border-radius);
    padding: 20px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #555;
}

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

.status-item span:first-child {
    color: #ccc;
    font-weight: 500;
}

.status-item span:last-child {
    font-weight: bold;
}

/* 排行榜樣式 */
.miner-leaderboard {
    max-height: 300px;
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #3d3d3d;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.leaderboard-item:hover {
    background: #4d4d4d;
    transform: translateX(5px);
}

.leaderboard-item.rank-1 {
    border-left-color: #ffd700;
    background: linear-gradient(135deg, #3d3d3d 0%, #4d4d4d 100%);
}

.leaderboard-item.rank-2 {
    border-left-color: #c0c0c0;
}

.leaderboard-item.rank-3 {
    border-left-color: #cd7f32;
}

.rank-number {
    font-weight: bold;
    color: var(--primary-color);
    min-width: 30px;
}

.miner-info {
    flex: 1;
    margin-left: 15px;
}

.miner-address {
    font-size: 0.9rem;
    color: #ccc;
    word-break: break-all;
}

.miner-hashrate {
    font-weight: bold;
    color: var(--primary-color);
}

/* 表格樣式 */
.table {
    color: white;
    background: #3d3d3d;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    font-weight: bold;
}

.table tbody tr {
    background: #3d3d3d;
    transition: var(--transition);
}

.table tbody tr:hover {
    background: #4d4d4d;
}

.table td {
    border-color: #555;
    vertical-align: middle;
}

/* 加載動畫 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

/* 通知樣式 */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
}

.notification {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
    border: 1px solid #555;
    border-radius: var(--border-radius);
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: var(--box-shadow);
    color: white;
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.error {
    border-left: 4px solid var(--danger-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

.notification.info {
    border-left: 4px solid var(--primary-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 15px;
    }
    
    .info-box {
        margin-bottom: 15px;
    }
    
    .mining-panel .card-body {
        padding: 15px;
    }
    
    .status-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .status-item span:last-child {
        margin-top: 5px;
    }

    .notification-container {
        left: 50%;
        right: auto;
        top: 10px;
        transform: translateX(-50%);
        max-width: 90vw;
        width: 90vw;
        padding: 0 5vw;
    }
    .notification {
        font-size: 15px;
        word-break: break-all;
        padding: 12px 10px;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* 滾動條樣式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* 動畫效果 */
.fade-in {
    animation: fadeIn 0.5s ease;
}

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

/* 特殊效果 */
.glow {
    box-shadow: 0 0 20px rgba(247, 147, 26, 0.3);
}

.pulse {
    animation: pulse 2s infinite;
}

/* 卡片懸停效果 */
.card {
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* 修復白色文字在白色背景上的可見性問題 */
.card-header h4,
.card-header h5 {
    color: #f7931a !important;
}

/* 確保所有卡片標題文字可見 */
.card .card-header {
    color: white;
}

/* 修復特定文字顏色 */
.form-label,
label {
    color: #1e90ff !important;
}

/* 修復總計文字顏色 */
#total-cost {
    color: #f7931a !important;
    font-weight: bold;
}

/* 確保表格標題可見 */
.table thead th {
    color: #f7931a !important;
}

/* 修復狀態文字 */
.status-item span:first-child {
    color: #1e90ff !important;
}

/* 修復排行榜標題 */
.miner-leaderboard {
    color: #ffffff;
}

/* 確保所有重要文字可見 */
.text-dark {
    color: #ffffff !important;
}

/* 修復按鈕文字在深色背景上的可見性 */
.btn-warning {
    color: #212529 !important;
}

.btn-warning:hover {
    color: #212529 !important;
}

/* 修復特定元素的文字顏色 */
.card-body span {
    color: #ffffff !important;
}

/* 修復總計標籤 */
.card-body span:contains("總計") {
    color: #f7931a !important;
    font-weight: bold;
}

/* 修復狀態標籤 */
.status-item span {
    color: #ffffff !important;
}

/* 確保所有文字在深色背景上可見 */
.card-body,
.card-body * {
    color: #ffffff;
}

/* 修復strong標籤 */
strong {
    color: #ffffff !important;
}

/* 修復特定ID的文字 */
#total-cost {
    color: #f7931a !important;
    font-weight: bold;
}

/* 確保表格內容可見 */
.table tbody td {
    color: #ffffff !important;
}

/* 修復鏈接顏色 */
a {
    color: var(--primary-color) !important;
}

a:hover {
    color: var(--secondary-color) !important;
}

/* 強制覆蓋Bootstrap默認樣式 */
.text-muted {
    color: #ffffff !important;
}

.text-secondary {
    color: #ffffff !important;
}

/* 修復所有可能的白色文字問題 */
.card *,
.card-body *,
.card-header * {
    color: inherit;
}

/* 確保深色主題下的文字可見性 */
body * {
    color: inherit;
}

/* 修復特定問題文字 */
.card-body span,
.card-body strong,
.card-body label,
.card-body .form-label {
    color: #ffffff !important;
}

/* 修復表格中的文字 */
.table * {
    color: inherit;
}

/* 確保狀態文字可見 */
.mining-status *,
.status-item * {
    color: #ffffff !important;
}

/* 強制修復所有文字可見性問題 */
.card-body span,
.card-body strong,
.card-body label,
.card-body .form-label,
.card-body div,
.card-body p,
.card-body h1,
.card-body h2,
.card-body h3,
.card-body h4,
.card-body h5,
.card-body h6 {
    color: #ffffff !important;
}

/* 修復特定問題區域 */
.card-body .d-flex span,
.card-body .d-flex strong {
    color: #ffffff;
}

/* 確保所有文字在深色主題下可見 */
.card-body *:not(.btn):not(.badge):not(.text-primary):not(.text-success):not(.text-warning):not(.text-info):not(.text-danger) {
    color: #ffffff;
}

/* 修復表格中的文字 */
.table tbody td,
.table tbody th {
    color: #ffffff !important;
}

/* 修復狀態區域的文字 */
.mining-status span,
.status-item span {
    color: #ffffff !important;
} 

/* 挖礦控制面板標題改回白色 */
.mining-panel .card-header h4 {
    color: #fff !important;
}

/* 其他主標題（卡片標題）仍用主題橙色 */
.card-header h4,
.card-header h5 {
    color: #f7931a !important;
} 

/* 礦池操作區塊文字顏色設為主題黃色 */
#pool-ops, #pool-ops * {
    color: #f7931a !important;
} 

#pool-ops button, #pool-ops button * {
    color: #ffffff !important;
} 

/* 挖礦規則區塊文字顏色調整 */
.card.border-warning .card-header.bg-warning,
.card.border-warning .card-body {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
    color: #333 !important;
} 

/* 幣安風格彈窗樣式 */
#coffeeModal .modal-content {
    background: #181A20;
    border-radius: 16px;
    border: 2px solid #F0B90B;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
#coffeeModal .modal-header {
    border-bottom: none;
    background: transparent;
    padding-bottom: 0;
}
#coffeeModal .modal-title {
    color: #F0B90B;
    font-weight: bold;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
#coffeeModal .modal-title::before {
    content: '☕';
    font-size: 2rem;
    margin-right: 8px;
}
#coffeeModal .modal-body {
    text-align: center;
    font-size: 1.08rem;
    color: #fff;
    padding-top: 0;
}
#coffeeModal .btn-close {
    filter: invert(1) grayscale(1);
}
#coffeeModal .btn-warning {
    background: linear-gradient(90deg, #F8D90F 0%, #F0B90B 100%);
    color: #181A20;
    border: none;
    font-weight: bold;
    font-size: 1.1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(240,185,11,0.15);
    padding: 0.6em 1.5em;
    margin-top: 10px;
    transition: background 0.2s, box-shadow 0.2s;
}
#coffeeModal .btn-warning:hover {
    background: linear-gradient(90deg, #F0B90B 0%, #F8D90F 100%);
    color: #181A20;
    box-shadow: 0 4px 16px rgba(240,185,11,0.25);
}
#coffeeModal a.btn {
    text-decoration: none;
} 

/* Hero Banner 樣式 */
.hero-banner {
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
    border-bottom: 2px solid #f7931a;
    position: relative;
    z-index: 2;
}
.hero-banner h1, .hero-banner h4 {
    text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.hero-banner .btn-lg {
    font-size: 1.15rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(247,147,26,0.10);
}

/* 終端動畫區域 */
.terminal-animation {
    background: #181a20;
    color: #39ff14;
    font-family: 'Fira Mono', 'Consolas', monospace;
    border-radius: 10px;
    min-height: 120px;
    max-height: 220px;
    overflow-y: auto;
    padding: 18px 20px;
    font-size: 1.1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    white-space: pre-line;
    line-height: 1.6;
    margin-bottom: 1rem;
}
.terminal-animation .typed-cursor {
    color: #39ff14;
    font-weight: bold;
    animation: blink 1s steps(1) infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@media (max-width: 991px) {
    .hero-banner .col-lg-5 {
        display: none !important;
    }
    .hero-banner .col-lg-7 {
        text-align: center;
    }
} 

.buy-coffee .card-body * {
    color: #f7931a !important;
}

.buy-coffee .card-body button span {
    color: #ffffff !important;
}
