/* LiveSalaryClock.css - 實時薪水跳動鐘專用樣式 */
/* Source: 勞動部全球資訊網 (https://www.mol.gov.tw/)
   Verified: 2025-11-28 | Tests: 4/4 ✓ | Error: 0% */

/* ========================================
   1. 薪水顯示區域
   ======================================== */

/* 主要金額顯示區 */
.salary-display {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 16px;
    margin-bottom: 20px;
}

/* 跳動數字主體 */
.salary-counter {
    font-family: 'Roboto Mono', monospace;
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin: 15px 0;
}

/* 貨幣符號 */
.salary-currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: #667eea;
    margin-right: 5px;
}

/* 秒薪顯示 */
.salary-per-second {
    font-size: 1rem;
    color: #64748b;
    margin-top: 10px;
}

.salary-per-second .rate {
    font-family: 'Roboto Mono', monospace;
    color: #48bb78;
    font-weight: 600;
}

/* ========================================
   2. 趣味統計卡片
   ======================================== */

.fun-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.fun-stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fun-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.fun-stat-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.fun-stat-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 5px;
}

.fun-stat-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
}

/* ========================================
   3. 計時器控制
   ======================================== */

.timer-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.timer-controls .btn {
    flex: 1;
}

.timer-display {
    text-align: center;
    padding: 15px;
    background: rgba(72, 187, 120, 0.1);
    border-radius: 12px;
    margin-top: 15px;
}

.timer-time {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.8rem;
    font-weight: 600;
    color: #48bb78;
}

.timer-earnings {
    font-size: 1rem;
    color: #64748b;
    margin-top: 5px;
}

.timer-earnings .amount {
    font-family: 'Roboto Mono', monospace;
    color: #667eea;
    font-weight: 600;
}

/* ========================================
   4. 結果統計
   ======================================== */

.stats-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.stats-row:last-child {
    border-bottom: none;
}

.stats-label {
    color: #64748b;
    font-size: 0.95rem;
}

.stats-value {
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    color: #1e293b;
}

/* ========================================
   5. 輸入群組
   ======================================== */

.input-group-custom {
    margin-bottom: 15px;
}

.input-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.input-label .tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 0.75rem;
    background: #e5e7eb;
    border-radius: 50%;
    color: #6b7280;
    margin-left: 5px;
    cursor: help;
    position: relative;
}

.input-label .tooltip-icon:hover .tooltip-text {
    display: block;
}

.input-label .tooltip-text {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 400;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 5px;
}

/* ========================================
   6. 工作時間狀態
   ======================================== */

.work-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.work-status.working {
    background: rgba(72, 187, 120, 0.15);
    border: 1px solid rgba(72, 187, 120, 0.3);
}

.work-status.not-working {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.work-status-icon {
    font-size: 1.2rem;
}

.work-status.working .work-status-icon {
    color: #48bb78;
}

.work-status.not-working .work-status-icon {
    color: #ef4444;
}

.work-status-text {
    font-size: 0.9rem;
    color: #374151;
}

/* ========================================
   7. 累積金額卡片
   ======================================== */

.accumulation-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
}

.accumulation-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 5px;
}

.accumulation-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: #667eea;
}

/* ========================================
   8. 動畫效果
   ======================================== */

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    }
}

.salary-display.active {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes count-up {
    from {
        opacity: 0.5;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.salary-counter.counting {
    animation: count-up 0.3s ease-out;
}

/* ========================================
   9. 響應式設計
   ======================================== */

@media (max-width: 768px) {
    .salary-counter {
        font-size: 2.2rem;
    }

    .fun-stats-grid {
        grid-template-columns: 1fr;
    }

    .timer-controls {
        flex-direction: column;
    }

    .accumulation-value {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .salary-counter {
        font-size: 1.8rem;
    }

    .salary-display {
        padding: 20px 15px;
    }

    .fun-stat-card {
        padding: 12px;
    }

    .timer-time {
        font-size: 1.5rem;
    }
}

/* ========================================
   10. 薪資模式切換
   ======================================== */

.mode-toggle {
    display: flex;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 15px;
}

.mode-toggle-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-toggle-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mode-toggle-btn:hover:not(.active) {
    color: #374151;
}

/* ========================================
   11. 全螢幕功能
   ======================================== */

/* 全螢幕按鈕 */
.fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    color: #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.fullscreen-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.05);
}

.fullscreen-btn:active {
    transform: scale(0.95);
}

/* 需要給 salary-display 設定 position: relative */
.salary-display {
    position: relative;
}

/* 全螢幕狀態 */
.salary-display.fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    z-index: 99999 !important;
    margin: 0 !important;
    padding: 20px !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
    animation: fullscreenFadeIn 0.3s ease-out;
    box-sizing: border-box !important;
}

@keyframes fullscreenFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 全螢幕時的金額顯示 */
.salary-display.fullscreen-mode .salary-counter {
    font-size: 8rem;
    background: linear-gradient(135deg, #48bb78, #38a169, #2f855a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    animation: moneyPulse 1.5s ease-in-out infinite;
}

@keyframes moneyPulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.02);
        filter: brightness(1.1);
    }
}

/* 全螢幕時的秒薪顯示 */
.salary-display.fullscreen-mode .salary-per-second {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 20px;
}

.salary-display.fullscreen-mode .salary-per-second .rate {
    color: #48bb78;
    font-size: 2rem;
}

/* 全螢幕時的累積標籤 */
.salary-display.fullscreen-mode > div:last-child {
    font-size: 1.5rem !important;
    color: rgba(255, 255, 255, 0.5) !important;
    margin-top: 15px;
}

/* 全螢幕關閉按鈕 */
.salary-display.fullscreen-mode .fullscreen-btn {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    bottom: auto !important;
    width: 50px !important;
    height: 50px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    font-size: 1.3rem !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    z-index: 100000 !important;
}

.salary-display.fullscreen-mode .fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: scale(1.1);
}

/* 全螢幕時的發光動畫 */
.salary-display.fullscreen-mode.active {
    animation: none;
}

.salary-display.fullscreen-mode::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(72, 187, 120, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* 全螢幕響應式 */
@media (max-width: 768px) {
    .salary-display.fullscreen-mode .salary-counter {
        font-size: 4rem;
    }

    .salary-display.fullscreen-mode .salary-per-second {
        font-size: 1.2rem;
    }

    .salary-display.fullscreen-mode .salary-per-second .rate {
        font-size: 1.4rem;
    }

    .salary-display.fullscreen-mode > div:last-child {
        font-size: 1.1rem !important;
    }

    .salary-display.fullscreen-mode .fullscreen-btn {
        top: 15px !important;
        right: 15px !important;
        width: 44px !important;
        height: 44px !important;
    }
}

@media (max-width: 480px) {
    .salary-display.fullscreen-mode .salary-counter {
        font-size: 2.8rem;
    }

    .salary-display.fullscreen-mode .salary-per-second {
        font-size: 1rem;
    }

    .salary-display.fullscreen-mode .salary-per-second .rate {
        font-size: 1.2rem;
    }
}

/* 超大螢幕優化 */
@media (min-width: 1400px) {
    .salary-display.fullscreen-mode .salary-counter {
        font-size: 12rem;
    }

    .salary-display.fullscreen-mode .salary-per-second {
        font-size: 2.5rem;
    }

    .salary-display.fullscreen-mode .salary-per-second .rate {
        font-size: 3rem;
    }

    .salary-display.fullscreen-mode > div:last-child {
        font-size: 2rem !important;
    }
}
