/* ========================================
   Capsule AI Pro - 懸浮膠囊式設計系統
   ======================================== */

/* CSS 變數定義 */
:root {
    /* 主色調 - 科技藍紫漸變 */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --accent-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);

    /* 純色 */
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #00f2fe;
    --error-color: #f5576c;
    --warning-color: #ffa726;

    /* 背景色 */
    --bg-dark: #0a0e27;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-glass: rgba(255, 255, 255, 0.08);
    --bg-overlay: rgba(10, 14, 39, 0.95);

    /* 文字色 */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    /* 陰影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.5);

    /* 圓角 */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* 間距 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* 重置與基礎樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* ========================================
   背景動畫層
   ======================================== */
.cosmic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.stars-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 60px 70px, #fff, transparent),
        radial-gradient(1px 1px at 50px 50px, #ddd, transparent),
        radial-gradient(1px 1px at 130px 80px, #fff, transparent),
        radial-gradient(2px 2px at 90px 10px, #eee, transparent);
    background-size: 200px 200px;
    background-repeat: repeat;
    opacity: 0.3;
    animation: stars-drift 120s linear infinite;
}

@keyframes stars-drift {
    from { transform: translateY(0); }
    to { transform: translateY(-200px); }
}

.gradient-orbs {
    position: absolute;
    width: 100%;
    height: 100%;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-gradient);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: var(--secondary-gradient);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--success-gradient);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 30px) scale(1.05); }
}

/* ========================================
   主視圖 - 表單
   ======================================== */
.main-view {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.main-view.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 頂部狀態欄 */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.status-left,
.status-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-color);
    animation: pulse-ring 2s ease-out infinite;
    position: relative;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--success-color);
    animation: pulse-ring 2s ease-out infinite;
}

.pulse-dot.success {
    background: #43e97b;
}

.pulse-dot.success::before {
    border-color: #43e97b;
}

@keyframes pulse-ring {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

.status-text {
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 內容區域 */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-lg) var(--spacing-md);
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

/* Logo 區域 */
.logo-section {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-capsule {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto var(--spacing-md);
}

.logo-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    z-index: 2;
    animation: icon-rotate 20s linear infinite;
}

@keyframes icon-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.logo-rings {
    position: absolute;
    inset: 0;
}

.ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    animation: ring-spin 10s linear infinite;
}

.ring-1 {
    border-top-color: var(--primary-color);
    border-right-color: var(--primary-color);
}

.ring-2 {
    inset: 10px;
    border-bottom-color: var(--secondary-color);
    border-left-color: var(--secondary-color);
    animation-duration: 8s;
    animation-direction: reverse;
}

.ring-3 {
    inset: 20px;
    border-top-color: var(--success-color);
    border-bottom-color: var(--success-color);
    animation-duration: 6s;
}

@keyframes ring-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.app-title {
    font-size: 2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.title-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--bg-dark);
    font-weight: 700;
    letter-spacing: 1px;
}

.app-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* 表單卡片 */
.form-card {
    width: 100%;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* 膠囊輸入組 */
.capsule-input-group {
    margin-bottom: var(--spacing-md);
}

.input-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.input-label i {
    color: var(--primary-color);
}

/* 膠囊輸入框 */
.capsule-input-wrapper {
    position: relative;
    display: flex;
    gap: 0.5rem;
}

.capsule-input {
    flex: 1;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.capsule-input::placeholder {
    color: var(--text-muted);
}

.capsule-input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.capsule-input.error {
    border-color: var(--error-color);
}

.capsule-input.success {
    border-color: var(--success-color);
}

.input-currency {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: 600;
    pointer-events: none;
}

/* 膠囊按鈕 */
.capsule-btn {
    padding: 1rem 1.75rem;
    background: var(--bg-glass);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.capsule-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.capsule-btn:active {
    transform: translateY(0);
}

.capsule-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.verify-btn {
    background: var(--primary-gradient);
    border-color: transparent;
}

.verify-btn:hover {
    filter: brightness(1.1);
    box-shadow: var(--shadow-glow);
}

/* 下拉選單 */
.capsule-select-wrapper {
    position: relative;
}

.capsule-select {
    width: 100%;
    padding: 1rem 3rem 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    appearance: none;
}

.capsule-select:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.capsule-select option {
    background: var(--bg-dark);
    color: var(--text-primary);
    padding: 0.5rem;
}

.select-arrow {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
}

/* 驗證訊息 */
.validation-message {
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.validation-message.success {
    background: rgba(67, 233, 123, 0.1);
    border: 1px solid rgba(67, 233, 123, 0.3);
    color: #43e97b;
    display: block;
}

.validation-message.error {
    background: rgba(245, 87, 108, 0.1);
    border: 1px solid rgba(245, 87, 108, 0.3);
    color: var(--error-color);
    display: block;
}

.validation-message.loading {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: var(--primary-color);
    display: block;
}

/* 分隔線 */
.section-divider {
    display: flex;
    align-items: center;
    margin: var(--spacing-lg) 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.section-divider span {
    padding: 0 1rem;
}

/* 提交按鈕 */
.submit-capsule-btn {
    width: 100%;
    padding: 1.25rem 2rem;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: var(--spacing-md);
}

.btn-glow {
    position: absolute;
    inset: -2px;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.submit-capsule-btn:hover .btn-glow {
    opacity: 0.7;
}

.btn-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.submit-capsule-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.submit-capsule-btn:active {
    transform: translateY(-1px);
}

.submit-capsule-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.submit-capsule-btn:disabled:hover {
    box-shadow: none;
}

.submit-capsule-btn:disabled .btn-glow {
    opacity: 0;
}

/* ========================================
   分析中視圖
   ======================================== */
.analyzing-view {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-overlay);
    backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.analyzing-view.active {
    opacity: 1;
    pointer-events: all;
}

.analyzing-container {
    text-align: center;
    max-width: 600px;
    padding: var(--spacing-lg);
}

/* 分析膠囊動畫 */
.analyzing-capsule {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto var(--spacing-xl);
}

.capsule-core {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.core-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    animation: core-spin 3s linear infinite;
}

.core-ring:nth-child(1) {
    border-top-color: var(--primary-color);
    border-right-color: var(--primary-color);
}

.core-ring:nth-child(2) {
    inset: 20px;
    border-bottom-color: var(--secondary-color);
    border-left-color: var(--secondary-color);
    animation-duration: 2.5s;
    animation-direction: reverse;
}

.core-ring:nth-child(3) {
    inset: 40px;
    border-top-color: var(--success-color);
    border-bottom-color: var(--success-color);
    animation-duration: 2s;
}

@keyframes core-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.core-center {
    position: relative;
    z-index: 2;
    font-size: 4rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse-scale 2s ease-in-out infinite;
}

@keyframes pulse-scale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.energy-particles {
    position: absolute;
    inset: -50px;
    pointer-events: none;
}

.analyzing-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.analyzing-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: var(--spacing-xl);
}

/* 進度膠囊 */
.progress-capsule {
    margin-bottom: var(--spacing-lg);
}

.progress-track {
    position: relative;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
    position: relative;
}

.progress-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.5));
    animation: progress-shine 2s ease-in-out infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percentage {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 數據流 */
.data-stream-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    max-height: 200px;
    overflow: hidden;
}

.data-stream {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--success-color);
    text-align: left;
    line-height: 1.6;
}

.stream-line {
    opacity: 0;
    animation: stream-fadeIn 0.3s ease forwards;
    margin-bottom: 0.25rem;
}

@keyframes stream-fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   結果視圖
   ======================================== */
.result-view {
    position: fixed;
    inset: 0;
    z-index: 10;
    background: var(--bg-dark);
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.result-view.active {
    opacity: 1;
    pointer-events: all;
}

.result-container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

/* 成功圖示 */
.success-icon {
    text-align: center;
    margin: var(--spacing-xl) 0;
    animation: success-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes success-pop {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.success-circle {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background: var(--success-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    box-shadow: 0 10px 40px rgba(67, 233, 123, 0.4);
}

.result-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.result-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

/* 結果卡片 */
.result-cards {
    display: grid;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.result-capsule-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    animation: fadeInUp 0.6s ease both;
}

.result-capsule-card:nth-child(2) {
    animation-delay: 0.1s;
}

.result-capsule-card:nth-child(3) {
    animation-delay: 0.2s;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header i {
    font-size: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.card-content {
    /* 由子元素定義 */
}

/* 資訊行 */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.info-value {
    font-weight: 600;
    color: var(--text-primary);
}

.info-value.highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.1rem;
}

/* 統計網格 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.stat-item {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 推薦桌號 */
.recommendation-card {
    display: block;
}

.table-recommendations {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.table-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    animation: slideInRight 0.5s ease both;
}

.table-item:nth-child(1) { animation-delay: 0.3s; }
.table-item:nth-child(2) { animation-delay: 0.4s; }
.table-item:nth-child(3) { animation-delay: 0.5s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.table-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.table-rank {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.1rem;
}

.table-name {
    font-weight: 600;
    font-size: 1.05rem;
}

/* 可點擊推薦房卡片 */
.table-item-clickable {
    cursor: pointer;
    outline: none;
    position: relative;
}

.table-item-clickable:focus-visible {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
}

.table-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
}

.table-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.table-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.tier-badge-hot {
    color: #43e97b;
    background: rgba(67, 233, 123, 0.12);
    border-color: rgba(67, 233, 123, 0.35);
}

.tier-badge-godly {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.12);
    border-color: rgba(255, 215, 0, 0.4);
}

.table-meta-score {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.tier-score-hot {
    color: #43e97b;
}

.tier-score-godly {
    color: #ffd700;
}

.table-chevron {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.55);
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.table-item-clickable:hover .table-chevron {
    background: var(--primary-gradient);
    color: white;
    transform: translateX(4px);
}

/* ========================================
   推薦房間詳情 Modal
   ======================================== */
.room-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.room-modal.active {
    opacity: 1;
    pointer-events: all;
}

.room-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 39, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.room-modal-card {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    padding: 2rem 1.75rem 1.75rem;
    background: linear-gradient(180deg, rgba(20, 24, 50, 0.95), rgba(10, 14, 39, 0.95));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                opacity 0.3s ease;
}

.room-modal.active .room-modal-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* 不同等級邊框光暈 */
.room-modal-card.evaluation-hot {
    border-color: rgba(67, 233, 123, 0.35);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(67, 233, 123, 0.15);
}

.room-modal-card.evaluation-godly {
    border-color: rgba(255, 215, 0, 0.45);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 50px rgba(255, 215, 0, 0.2),
                0 0 30px rgba(184, 134, 252, 0.18);
}

/* 自訂滾動條 */
.room-modal-card::-webkit-scrollbar {
    width: 6px;
}

.room-modal-card::-webkit-scrollbar-track {
    background: transparent;
}

.room-modal-card::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
}

.room-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    z-index: 2;
}

.room-modal-close:hover {
    background: rgba(245, 87, 108, 0.15);
    border-color: rgba(245, 87, 108, 0.4);
    color: #f5576c;
    transform: rotate(90deg);
}

.room-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.room-modal-rank {
    display: inline-block;
    padding: 0.25rem 0.85rem;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 0.75rem;
}

.room-modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.room-modal-tier {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.evaluation-hot .room-modal-tier {
    color: #43e97b;
    background: rgba(67, 233, 123, 0.12);
    border: 1px solid rgba(67, 233, 123, 0.35);
}

.evaluation-godly .room-modal-tier {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.45);
}

.room-modal-ring-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.room-modal-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.room-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
}

.room-stat:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
}

.room-stat-full {
    grid-column: 1 / -1;
}

.room-stat-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary-color);
    font-size: 0.95rem;
}

.evaluation-hot .room-stat-icon {
    background: rgba(67, 233, 123, 0.13);
    color: #43e97b;
}

.evaluation-godly .room-stat-icon {
    background: rgba(255, 215, 0, 0.13);
    color: #ffd700;
}

.room-stat-info {
    flex: 1;
    min-width: 0;
}

.room-stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.15rem;
    word-break: break-word;
}

.room-stat-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.5px;
}

.room-modal-section {
    margin-bottom: 1.25rem;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-md);
}

.room-modal-section:last-of-type {
    margin-bottom: 1.5rem;
}

.room-modal-section-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    font-size: 0.92rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.evaluation-hot .room-modal-section-header i { color: #43e97b; }
.evaluation-godly .room-modal-section-header i { color: #ffd700; }

.room-modal-reason {
    font-size: 0.88rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.72);
}

.room-modal-tips {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.room-modal-tips li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.86rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.75);
}

.room-modal-tips li i {
    margin-top: 0.3rem;
    font-size: 0.7rem;
    opacity: 0.7;
    flex-shrink: 0;
}

.evaluation-hot .room-modal-tips li i { color: #43e97b; }
.evaluation-godly .room-modal-tips li i { color: #ffd700; }

.room-modal-confirm {
    width: 100%;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    background: var(--primary-gradient);
}

.evaluation-hot .room-modal-confirm {
    background: linear-gradient(135deg, #43e97b, #00f2fe);
}

.evaluation-godly .room-modal-confirm {
    background: linear-gradient(135deg, #ffd700, #b886fc);
    color: var(--bg-dark);
}

.room-modal-confirm:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.35);
}

.room-modal-confirm:active {
    transform: translateY(0);
}

/* 手機尺寸 */
@media (max-width: 480px) {
    .room-modal {
        padding: 0.75rem;
    }

    .room-modal-card {
        padding: 1.75rem 1.25rem 1.25rem;
        max-height: calc(100vh - 1.5rem);
    }

    .room-modal-stats {
        grid-template-columns: 1fr;
    }

    .room-modal-title {
        font-size: 1.2rem;
    }

    .table-meta {
        font-size: 0.7rem;
    }
}

/* RSG 破解成功 */
.crack-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.85rem;
    padding: 2rem 1.25rem;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.08), rgba(102, 126, 234, 0.08));
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: var(--radius-lg);
    animation: fadeInUp 0.5s ease both;
}

.crack-success-ring {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.9rem;
    color: var(--success-color);
    background: radial-gradient(circle, rgba(0, 242, 254, 0.18), transparent 70%);
    border: 2px solid rgba(0, 242, 254, 0.5);
    box-shadow: 0 0 24px rgba(0, 242, 254, 0.35);
    animation: crackPulse 2s ease-in-out infinite;
}

@keyframes crackPulse {
    0%, 100% { box-shadow: 0 0 18px rgba(0, 242, 254, 0.3); transform: scale(1); }
    50% { box-shadow: 0 0 32px rgba(0, 242, 254, 0.55); transform: scale(1.05); }
}

.crack-success-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #00f2fe, #667eea);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.crack-success-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
}

/* RSG 數據綜合評估 */
.evaluation-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    padding: 2rem 1.25rem;
    border-radius: var(--radius-lg);
    animation: fadeInUp 0.5s ease both;
    position: relative;
    overflow: hidden;
}

.evaluation-result::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05), transparent 60%);
    pointer-events: none;
}

.evaluation-score-ring {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.evaluation-ring-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.evaluation-ring-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 8;
}

.evaluation-ring-progress {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.evaluation-score-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
}

.evaluation-score-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 1px;
}

.evaluation-score-unit {
    font-size: 1.1rem;
    margin-left: 2px;
    opacity: 0.85;
}

.evaluation-score-label {
    font-size: 0.78rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
}

.evaluation-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    z-index: 1;
}

.evaluation-status-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.4rem;
}

.evaluation-status-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.4;
    padding: 0 0.5rem;
}

.evaluation-status-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.55;
    max-width: 320px;
    padding: 0 0.5rem;
}

/* ========================================
   AI 四階段判定（冷機 / 試探 / 熱機 / 神機）
   ======================================== */

/* 冷機：紅橘色（風險高、不建議進場） */
.evaluation-cold {
    background: linear-gradient(135deg, rgba(245, 87, 108, 0.1), rgba(255, 167, 38, 0.08));
    border: 1px solid rgba(245, 87, 108, 0.35);
    box-shadow: 0 0 30px rgba(245, 87, 108, 0.15) inset;
}

.evaluation-cold .evaluation-ring-progress {
    stroke: #f5576c;
    filter: drop-shadow(0 0 8px rgba(245, 87, 108, 0.55));
}

.evaluation-cold .evaluation-score-number {
    background: linear-gradient(135deg, #f5576c, #ffa726);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.evaluation-cold .evaluation-status-icon {
    color: #f5576c;
    background: rgba(245, 87, 108, 0.12);
    border: 1px solid rgba(245, 87, 108, 0.4);
    animation: evalPulseCold 2s ease-in-out infinite;
}

.evaluation-cold .evaluation-status-title {
    color: #f5576c;
}

@keyframes evalPulseCold {
    0%, 100% { box-shadow: 0 0 12px rgba(245, 87, 108, 0.3); }
    50% { box-shadow: 0 0 22px rgba(245, 87, 108, 0.6); }
}

/* 試探：琥珀／黃色（觀察期，謹慎進場） */
.evaluation-watch {
    background: linear-gradient(135deg, rgba(255, 167, 38, 0.1), rgba(255, 215, 0, 0.06));
    border: 1px solid rgba(255, 167, 38, 0.35);
    box-shadow: 0 0 30px rgba(255, 167, 38, 0.15) inset;
}

.evaluation-watch .evaluation-ring-progress {
    stroke: #ffc107;
    filter: drop-shadow(0 0 8px rgba(255, 193, 7, 0.55));
}

.evaluation-watch .evaluation-score-number {
    background: linear-gradient(135deg, #ffd54f, #ffa726);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.evaluation-watch .evaluation-status-icon {
    color: #ffc107;
    background: rgba(255, 193, 7, 0.12);
    border: 1px solid rgba(255, 193, 7, 0.4);
    animation: evalPulseWatch 2s ease-in-out infinite;
}

.evaluation-watch .evaluation-status-title {
    color: #ffd54f;
}

@keyframes evalPulseWatch {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 193, 7, 0.3); }
    50% { box-shadow: 0 0 22px rgba(255, 193, 7, 0.6); }
}

/* 熱機：綠色（活躍，建議進場） */
.evaluation-hot {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.1), rgba(0, 242, 254, 0.08));
    border: 1px solid rgba(67, 233, 123, 0.35);
    box-shadow: 0 0 30px rgba(67, 233, 123, 0.15) inset;
}

.evaluation-hot .evaluation-ring-progress {
    stroke: #43e97b;
    filter: drop-shadow(0 0 8px rgba(67, 233, 123, 0.55));
}

.evaluation-hot .evaluation-score-number {
    background: linear-gradient(135deg, #43e97b, #00f2fe);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.evaluation-hot .evaluation-status-icon {
    color: #43e97b;
    background: rgba(67, 233, 123, 0.12);
    border: 1px solid rgba(67, 233, 123, 0.4);
    animation: evalPulseHot 2s ease-in-out infinite;
}

.evaluation-hot .evaluation-status-title {
    color: #43e97b;
}

@keyframes evalPulseHot {
    0%, 100% { box-shadow: 0 0 12px rgba(67, 233, 123, 0.3); }
    50% { box-shadow: 0 0 22px rgba(67, 233, 123, 0.6); }
}

/* 神機：金紫色漸層（最高等級，狂暴爆分） */
.evaluation-godly {
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 215, 0, 0.12), transparent 60%),
        linear-gradient(135deg, rgba(184, 134, 252, 0.12), rgba(255, 215, 0, 0.08));
    border: 1px solid rgba(255, 215, 0, 0.45);
    box-shadow:
        0 0 40px rgba(255, 215, 0, 0.18) inset,
        0 0 30px rgba(184, 134, 252, 0.2);
    animation: godlyGlow 3.5s ease-in-out infinite;
}

@keyframes godlyGlow {
    0%, 100% {
        box-shadow:
            0 0 40px rgba(255, 215, 0, 0.18) inset,
            0 0 30px rgba(184, 134, 252, 0.2);
    }
    50% {
        box-shadow:
            0 0 55px rgba(255, 215, 0, 0.28) inset,
            0 0 50px rgba(184, 134, 252, 0.35);
    }
}

.evaluation-godly::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(2px 2px at 12% 20%, rgba(255, 215, 0, 0.9), transparent 50%),
        radial-gradient(1.5px 1.5px at 80% 35%, rgba(255, 255, 255, 0.9), transparent 50%),
        radial-gradient(2px 2px at 25% 75%, rgba(184, 134, 252, 0.8), transparent 50%),
        radial-gradient(1.5px 1.5px at 88% 80%, rgba(255, 215, 0, 0.85), transparent 50%),
        radial-gradient(1.5px 1.5px at 50% 50%, rgba(255, 255, 255, 0.7), transparent 50%);
    pointer-events: none;
    animation: godlySparkle 4s ease-in-out infinite;
    opacity: 0.8;
}

@keyframes godlySparkle {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.05); }
}

.evaluation-godly .evaluation-ring-progress {
    stroke: #ffd700;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.7));
}

.evaluation-godly .evaluation-score-number {
    background: linear-gradient(135deg, #ffd700, #b886fc 60%, #ffd700);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: godlyShine 3s linear infinite;
}

@keyframes godlyShine {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.evaluation-godly .evaluation-status-icon {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.5);
    animation: evalPulseGodly 1.6s ease-in-out infinite;
}

.evaluation-godly .evaluation-status-title {
    background: linear-gradient(135deg, #ffd700, #b886fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

@keyframes evalPulseGodly {
    0%, 100% {
        box-shadow: 0 0 14px rgba(255, 215, 0, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 28px rgba(255, 215, 0, 0.75);
        transform: scale(1.06);
    }
}

/* 共用：AI 判定標籤 */
.evaluation-status-label {
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    margin-bottom: -0.25rem;
}

/* 判定詳細區塊（建議玩法 / 配注 / AI 觀察重點） */
.tier-sections {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-top: 0.5rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 600px) {
    .tier-sections {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tier-section {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    text-align: left;
    transition: all 0.3s ease;
}

.tier-section:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.tier-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.5px;
}

.tier-section-header i {
    font-size: 1rem;
}

.evaluation-cold .tier-section-header i { color: #f5576c; }
.evaluation-watch .tier-section-header i { color: #ffc107; }
.evaluation-hot .tier-section-header i { color: #43e97b; }
.evaluation-godly .tier-section-header i { color: #ffd700; }

.tier-section-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.tier-section-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.75);
}

.tier-section-list li i {
    flex-shrink: 0;
    margin-top: 0.3rem;
    font-size: 0.7rem;
    opacity: 0.6;
}

.evaluation-cold .tier-section-list li i { color: #f5576c; }
.evaluation-watch .tier-section-list li i { color: #ffc107; }
.evaluation-hot .tier-section-list li i { color: #43e97b; }
.evaluation-godly .tier-section-list li i { color: #ffd700; }

/* 警告膠囊 */
.warning-capsule {
    display: flex;
    gap: 1rem;
    padding: var(--spacing-md);
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid rgba(255, 167, 38, 0.3);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 0.6s ease 0.3s both;
}

.warning-icon {
    font-size: 2rem;
    color: var(--warning-color);
}

.warning-content {
    flex: 1;
}

.warning-title {
    font-weight: 600;
    color: var(--warning-color);
    margin-bottom: 0.25rem;
}

.warning-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 底部資訊 */
.bottom-info {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 0.6s ease 0.4s both;
}

.info-capsule {
    flex: 1;
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.info-capsule i {
    color: var(--primary-color);
}

/* 重置按鈕 */
.reset-capsule-btn {
    width: 100%;
    padding: 1.25rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.6s ease 0.5s both;
}

.reset-capsule-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.reset-capsule-btn:active {
    transform: translateY(0);
}

/* 版本資訊 */
.version-info {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: var(--spacing-sm);
    animation: fadeInUp 0.6s ease 0.6s both;
}

/* ========================================
   懸浮助手按鈕
   ======================================== */
.floating-assistant {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: none;
}

.floating-assistant.active {
    display: block;
}

.assistant-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    animation: float-assistant 3s ease-in-out infinite;
}

@keyframes float-assistant {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.assistant-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

.assistant-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.floating-assistant:hover .assistant-menu {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-item i {
    color: var(--primary-color);
}

/* ========================================
   響應式設計 (RWD)
   ======================================== */

/* 平板 (768px 以下) */
@media (max-width: 768px) {
    :root {
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
    }

    .status-bar {
        padding: 0.75rem 1rem;
        font-size: 0.75rem;
    }

    .content-wrapper {
        padding: var(--spacing-md);
    }

    .logo-capsule {
        width: 80px;
        height: 80px;
    }

    .logo-icon {
        font-size: 2rem;
    }

    .app-title {
        font-size: 1.5rem;
    }

    .title-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.6rem;
    }

    .form-card {
        padding: var(--spacing-md);
    }

    .capsule-input,
    .capsule-select {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .capsule-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.85rem;
    }

    .submit-capsule-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .analyzing-capsule {
        width: 150px;
        height: 150px;
    }

    .core-center {
        font-size: 3rem;
    }

    .analyzing-title {
        font-size: 1.5rem;
    }

    .result-container {
        padding: var(--spacing-md);
    }

    .success-circle {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }

    .result-title {
        font-size: 1.5rem;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .bottom-info {
        flex-direction: column;
    }

    .info-capsule {
        min-width: 100%;
    }

    .floating-assistant {
        bottom: 1rem;
        right: 1rem;
    }

    .assistant-btn {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* 手機 (480px 以下) */
@media (max-width: 480px) {
    .app-title {
        font-size: 1.25rem;
        flex-direction: column;
        gap: 0.25rem;
    }

    .capsule-input-wrapper {
        flex-direction: column;
    }

    .capsule-btn {
        width: 100%;
        justify-content: center;
    }

    .card-header h3 {
        font-size: 1rem;
    }

    .stat-item {
        padding: 0.75rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .table-rank {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .table-name {
        font-size: 0.95rem;
    }
}

/* 大螢幕 (1200px 以上) */
@media (min-width: 1200px) {
    .result-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .recommendation-card {
        grid-column: 1 / -1;
    }
}

/* 橫向模式調整 */
@media (max-height: 600px) and (orientation: landscape) {
    .logo-section {
        margin-bottom: var(--spacing-md);
    }

    .logo-capsule {
        width: 60px;
        height: 60px;
    }

    .logo-icon {
        font-size: 1.5rem;
    }

    .app-title {
        font-size: 1.25rem;
    }

    .form-card {
        padding: var(--spacing-sm);
    }

    .capsule-input-group {
        margin-bottom: var(--spacing-sm);
    }

    .section-divider {
        margin: var(--spacing-sm) 0;
    }
}

/* 列印樣式 */
@media print {
    .status-bar,
    .logo-section,
    .warning-capsule,
    .floating-assistant,
    .reset-capsule-btn {
        display: none;
    }

    .result-view {
        position: static;
        opacity: 1;
    }

    .result-container {
        max-width: 100%;
    }
}
