/* 金屬質感主題樣式 */

/* 個性特質標籤 - 金屬質感增強 */
.personality-traits-tags {
    background: var(--metallic-light);
    border: 2px solid;
    border-image: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.4) 0%, 
        rgba(200, 200, 200, 0.3) 50%, 
        rgba(100, 100, 100, 0.2) 100%) 1;
    box-shadow: var(--shadow-3d-light);
    position: relative;
}

[data-theme="dark"] .personality-traits-tags {
    background: var(--metallic-dark);
    border-image: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(200, 200, 200, 0.1) 50%, 
        rgba(100, 100, 100, 0.05) 100%) 1;
}

.trait-tag {
    background: var(--metallic-light);
    border: 2px solid;
    border-image: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.5) 0%, 
        rgba(200, 200, 200, 0.3) 50%, 
        rgba(100, 100, 100, 0.2) 100%) 1;
    box-shadow: var(--shadow-3d-light);
    position: relative;
    overflow: hidden;
}

.trait-tag::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    transition: left 0.5s ease;
}

.trait-tag:hover::after {
    left: 100%;
}

[data-theme="dark"] .trait-tag {
    background: var(--metallic-dark);
    border-image: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(200, 200, 200, 0.1) 50%, 
        rgba(100, 100, 100, 0.05) 100%) 1;
}

.trait-tag:hover {
    box-shadow: var(--shadow-3d-light),
                0 0 20px rgba(74, 144, 226, 0.2);
    border-image: linear-gradient(145deg, 
        rgba(74, 144, 226, 0.6) 0%, 
        rgba(74, 144, 226, 0.4) 50%, 
        rgba(74, 144, 226, 0.3) 100%) 1;
}

.trait-tag.selected {
    background: var(--metallic-primary);
    border-image: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.4) 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0.1) 100%) 1;
    box-shadow: var(--shadow-3d-light),
                0 0 25px rgba(74, 144, 226, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: white;
}

[data-theme="dark"] .trait-tag.selected {
    background: var(--metallic-primary);
    box-shadow: var(--shadow-3d-light),
                0 0 30px rgba(74, 144, 226, 0.6),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.trait-tag:active {
    box-shadow: var(--shadow-3d-pressed);
    transform: translateY(1px);
}

/* 淺色主題 - 金屬質感 */
:root {
    /* 金屬漸層色 */
    --metallic-light: linear-gradient(145deg, #ffffff 0%, #f0f0f0 50%, #e8e8e8 100%);
    --metallic-dark: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 50%, #0f0f0f 100%);
    --metallic-primary: linear-gradient(145deg, #4a90e2 0%, #357abd 50%, #2563eb 100%);
    --metallic-primary-hover: linear-gradient(145deg, #5ba0f2 0%, #4590cd 50%, #3573fb 100%);
    --metallic-rose-gold: linear-gradient(145deg, #F7CAC9 0%, #E8B4B8 50%, #D4AF37 100%);
    --metallic-rose-gold-hover: linear-gradient(145deg, #FFD4D3 0%, #F7CAC9 50%, #E8B4B8 100%);
    
    /* 立體陰影 */
    --shadow-3d-light: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    
    --shadow-3d-pressed: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(0, 0, 0, 0.15),
        0 1px 2px rgba(0, 0, 0, 0.1);
    
    --shadow-3d-border: 
        0 0 0 1px rgba(255, 255, 255, 0.5),
        0 0 0 2px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* 深色主題 - 金屬質感 */
[data-theme="dark"] {
    --metallic-light: linear-gradient(145deg, #3a3a3a 0%, #2a2a2a 50%, #1a1a1a 100%);
    --metallic-dark: linear-gradient(145deg, #1a1a1a 0%, #0f0f0f 50%, #050505 100%);
    --metallic-primary: linear-gradient(145deg, #4a90e2 0%, #357abd 50%, #2563eb 100%);
    --metallic-primary-hover: linear-gradient(145deg, #5ba0f2 0%, #4590cd 50%, #3573fb 100%);
    --metallic-rose-gold: linear-gradient(145deg, #F7CAC9 0%, #E8B4B8 50%, #D4AF37 100%);
    --metallic-rose-gold-hover: linear-gradient(145deg, #FFD4D3 0%, #F7CAC9 50%, #E8B4B8 100%);
    
    --shadow-3d-light: 
        0 4px 8px rgba(0, 0, 0, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    
    --shadow-3d-pressed: 
        inset 0 2px 4px rgba(0, 0, 0, 0.6),
        inset 0 1px 2px rgba(0, 0, 0, 0.5),
        0 1px 2px rgba(0, 0, 0, 0.3);
    
    --shadow-3d-border: 
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 0 2px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 按鈕金屬質感 */
.btn {
    position: relative;
    background: var(--metallic-light);
    border: none;
    box-shadow: var(--shadow-3d-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.15),
        0 3px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-3d-pressed);
}

/* 淺色主題：按鈕預設顯色（玻璃感保留） */
[data-theme="light"] .btn {
    background: var(--metallic-primary);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 
        0 4px 8px rgba(59, 130, 246, 0.3),
        0 2px 4px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .btn:hover {
    background: var(--metallic-primary-hover);
    box-shadow: 
        0 6px 12px rgba(59, 130, 246, 0.4),
        0 3px 6px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .btn:disabled {
    opacity: 1;
    filter: none;
}

.btn-primary {
    background: var(--metallic-primary);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 
        0 4px 8px rgba(59, 130, 246, 0.3),
        0 2px 4px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* 淺色主題：已撥款按鈕維持綠底白字 */
[data-theme="light"] .btn-paid {
    background: linear-gradient(145deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 
        0 4px 8px rgba(34, 197, 94, 0.3),
        0 2px 4px rgba(34, 197, 94, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .btn-paid:hover {
    background: linear-gradient(145deg, #2bd069 0%, #1fb356 50%, #178a43 100%);
}

[data-theme="light"] .btn-paid:disabled {
    opacity: 1;
    filter: none;
}

/* 保留小樹點使用按鈕顏色 */
[data-theme="light"] .btn-tree-points {
    background: linear-gradient(135deg, #29c3b2 0%, #1f8f85 100%);
    color: #fff;
    border: 1px solid rgba(41, 195, 178, 0.7);
}

[data-theme="light"] .btn-tree-points:hover {
    background: linear-gradient(135deg, #31d4c2 0%, #23a196 100%);
}

.btn-primary:hover {
    background: var(--metallic-primary-hover);
    box-shadow: 
        0 6px 12px rgba(59, 130, 246, 0.4),
        0 3px 6px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.btn-primary:active {
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(0, 0, 0, 0.2),
        0 1px 2px rgba(59, 130, 246, 0.3);
}

/* 卡片金屬質感 */
.card,
.vendor-demand-panel,
.supplier-allocation-panel,
.order-form-panel,
.order-rules-panel {
    background: var(--metallic-light);
    border: none;
    box-shadow: var(--shadow-3d-light);
    position: relative;
    overflow: hidden;
}

.card::before,
.vendor-demand-panel::before,
.supplier-allocation-panel::before,
.order-form-panel::before,
.order-rules-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.6), 
        transparent
    );
    pointer-events: none;
}

[data-theme="dark"] .card::before,
[data-theme="dark"] .vendor-demand-panel::before,
[data-theme="dark"] .supplier-allocation-panel::before,
[data-theme="dark"] .order-form-panel::before,
[data-theme="dark"] .order-rules-panel::before {
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent
    );
}

/* 輸入框金屬質感 */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
    background: var(--metallic-light);
    border: none;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(0, 0, 0, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.05);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(0, 0, 0, 0.05),
        0 0 0 2px rgba(59, 130, 246, 0.5),
        0 0 8px rgba(59, 130, 246, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] input[type="text"]:focus,
[data-theme="dark"] input[type="number"]:focus,
[data-theme="dark"] input[type="email"]:focus,
[data-theme="dark"] input[type="password"]:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(59, 130, 246, 0.6),
        0 0 12px rgba(59, 130, 246, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 單選按鈕金屬質感 - 垂直排列（舊版） */
.radio-label {
    background: var(--metallic-light);
    border: none;
    box-shadow: var(--shadow-3d-light);
    transition: all 0.2s ease;
}

.radio-label:hover {
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.12),
        0 2px 4px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.radio-label input[type="radio"]:checked + span {
    color: var(--primary);
    font-weight: 600;
}

/* 市場區域 - 水平排列樣式 */
.radio-group-horizontal {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--metallic-light);
    border: none;
    border-radius: 6px;
    box-shadow: var(--shadow-3d-light);
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
    position: relative;
}

.radio-option:hover {
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.12),
        0 2px 4px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: var(--bg-secondary);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

[data-theme="dark"] .radio-custom {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.05);
}

.radio-option input[type="radio"]:checked + .radio-custom {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.3);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.radio-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.radio-text {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
}

.radio-option input[type="radio"]:checked ~ .radio-text {
    color: var(--primary);
    font-weight: 600;
}

/* 深色主題單選按鈕文字 */
[data-theme="dark"] .radio-text {
    color: white;
}

[data-theme="dark"] .radio-option input[type="radio"]:checked ~ .radio-text {
    color: var(--primary);
}

/* 標籤頁金屬質感 */
.tab-btn {
    background: var(--metallic-light);
    border: none;
    box-shadow: var(--shadow-3d-light);
    transition: all 0.3s ease;
    position: relative;
    color: var(--text-primary);
}

/* 深色主題標籤按鈕 */
[data-theme="dark"] .tab-btn {
    color: white;
}

[data-theme="dark"] .tab-btn:hover:not(.active) {
    color: white;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--metallic-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-btn.active {
    background: var(--metallic-primary);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 
        0 4px 8px rgba(59, 130, 246, 0.3),
        0 2px 4px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.tab-btn.active::after {
    transform: scaleX(1);
}

/* 航空公司標籤按鈕品牌色 */
.tab-btn[data-tab="cathay"].active {
    background: linear-gradient(135deg, #0066CC 0%, #004499 100%);
    box-shadow: 
        0 4px 8px rgba(0, 102, 204, 0.4),
        0 2px 4px rgba(0, 102, 204, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.tab-btn[data-tab="cathay"].active::after {
    background: linear-gradient(90deg, #0066CC 0%, #0080FF 100%);
}

.tab-btn[data-tab="china-airlines"].active {
    background: linear-gradient(135deg, #E60012 0%, #B8000E 100%);
    box-shadow: 
        0 4px 8px rgba(230, 0, 18, 0.4),
        0 2px 4px rgba(230, 0, 18, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.tab-btn[data-tab="china-airlines"].active::after {
    background: linear-gradient(90deg, #E60012 0%, #FF1A33 100%);
}

.tab-btn[data-tab="eva-air"].active {
    background: linear-gradient(135deg, #006847 0%, #004A33 100%);
    box-shadow: 
        0 4px 8px rgba(0, 104, 71, 0.4),
        0 2px 4px rgba(0, 104, 71, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.tab-btn[data-tab="eva-air"].active::after {
    background: linear-gradient(90deg, #006847 0%, #00A86B 100%);
}

.tab-btn[data-tab="cathay"]:hover:not(.active) {
    border-color: rgba(0, 102, 204, 0.3);
    color: #0066CC;
}

.tab-btn[data-tab="china-airlines"]:hover:not(.active) {
    border-color: rgba(230, 0, 18, 0.3);
    color: #E60012;
}

.tab-btn[data-tab="eva-air"]:hover:not(.active) {
    border-color: rgba(0, 104, 71, 0.3);
    color: #006847;
}

.tab-btn:hover:not(.active) {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.15),
        0 3px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* 底部摘要欄金屬質感 */
.vendor-demand-footer {
    background: var(--metallic-light);
    border: none;
    box-shadow: var(--shadow-3d-light);
}

/* 供應商項目金屬質感 */
.supplier-item {
    background: var(--metallic-light);
    border: none;
    box-shadow: var(--shadow-3d-light);
    transition: all 0.3s ease;
}

.supplier-item:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.15),
        0 3px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* 刪除按鈕金屬質感 */
.btn-remove-supplier {
    background: linear-gradient(145deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    box-shadow: 
        0 4px 8px rgba(239, 68, 68, 0.3),
        0 2px 4px rgba(239, 68, 68, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.btn-remove-supplier:hover {
    background: linear-gradient(145deg, #f55 0%, #ef4444 50%, #dc2626 100%);
    box-shadow: 
        0 6px 12px rgba(239, 68, 68, 0.4),
        0 3px 6px rgba(239, 68, 68, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.btn-remove-supplier:active {
    transform: translateY(0);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(0, 0, 0, 0.2),
        0 1px 2px rgba(239, 68, 68, 0.3);
}

/* 預估金額金屬質感 */
.estimated-amount {
    color: var(--primary);
    text-shadow: 
        0 2px 4px rgba(59, 130, 246, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.3);
    font-weight: 700;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .estimated-amount {
    text-shadow: 
        0 2px 4px rgba(59, 130, 246, 0.5),
        0 1px 0 rgba(255, 255, 255, 0.1);
}

/* 規則列表金屬質感 */
.rules-list {
    perspective: 1000px;
}

.rules-list li {
    background: var(--metallic-light);
    margin-bottom: 8px;
    padding: 12px;
    border-radius: 4px;
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.05),
        0 1px 0 rgba(255, 255, 255, 0.5);
    border: none;
    opacity: 0;
    transform: rotateY(-90deg);
    animation: flipIn 0.6s ease-out forwards;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.rules-list li:nth-child(1) { animation-delay: 0.1s; }
.rules-list li:nth-child(2) { animation-delay: 0.2s; }
.rules-list li:nth-child(3) { animation-delay: 0.3s; }
.rules-list li:nth-child(4) { animation-delay: 0.4s; }
.rules-list li:nth-child(5) { animation-delay: 0.5s; }
.rules-list li:nth-child(6) { animation-delay: 0.6s; }
.rules-list li:nth-child(7) { animation-delay: 0.7s; }
.rules-list li:nth-child(8) { animation-delay: 0.8s; }

@keyframes flipIn {
    0% {
        opacity: 0;
        transform: rotateY(-90deg) translateX(-20px);
    }
    50% {
        opacity: 0.5;
        transform: rotateY(10deg) translateX(0);
    }
    100% {
        opacity: 1;
        transform: rotateY(0deg) translateX(0);
    }
}

[data-theme="dark"] .rules-list li {
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 規則項目 hover 效果 */
.rules-list li:hover {
    transform: rotateY(5deg) translateX(4px);
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.05),
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

[data-theme="dark"] .rules-list li:hover {
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 標題金屬質感 */
.panel-header-compact h3 {
    color: var(--text-primary);
    text-shadow: 
        0 1px 0 rgba(255, 255, 255, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

[data-theme="dark"] .panel-header-compact h3 {
    text-shadow: 
        0 1px 0 rgba(255, 255, 255, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 頁面標題金屬質感 */
.page-header h1 {
    color: var(--text-primary);
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
}

[data-theme="dark"] .page-header h1 {
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.1);
}

/* 表格金屬質感 */
table {
    border-collapse: separate;
    border-spacing: 0;
}

table th {
    background: var(--metallic-light);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    border: none;
}

table td {
    background: var(--bg-secondary);
    border: none;
    box-shadow: 
        inset 0 1px 0 rgba(0, 0, 0, 0.05),
        0 1px 0 rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] table th {
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] table td {
    box-shadow: 
        inset 0 1px 0 rgba(0, 0, 0, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.02);
}

/* Modal 金屬質感 */
.modal-content {
    background: var(--metallic-light);
    border: none;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 10px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .modal-content {
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

/* 背景漸層增強 */
body {
    background: 
        radial-gradient(ellipse at top, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        var(--bg-primary);
}

[data-theme="dark"] body {
    background: 
        radial-gradient(ellipse at top, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        var(--bg-primary);
}

/* 徽章金屬質感 */
.badge {
    background: var(--metallic-light);
    border: none;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
}

/* 深色主題徽章 */
[data-theme="dark"] .badge {
    color: white;
}

.badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.badge:hover::before {
    left: 100%;
}

[data-theme="dark"] .badge {
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.badge-pending {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 
        0 2px 4px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 深色主題待處理徽章 */
[data-theme="dark"] .badge-pending {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 
        0 2px 8px rgba(59, 130, 246, 0.5),
        0 0 0 1px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.badge-completed,
.badge-active {
    background: linear-gradient(145deg, #d1fae5 0%, #a7f3d0 50%, #6ee7b7 100%);
    color: #065f46;
    box-shadow: 
        0 2px 4px rgba(5, 150, 105, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.badge-processing {
    background: linear-gradient(145deg, #dbeafe 0%, #bfdbfe 50%, #93c5fd 100%);
    color: #1e40af;
    box-shadow: 
        0 2px 4px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.badge-cancelled,
.badge-ended {
    background: linear-gradient(145deg, #fee2e2 0%, #fecaca 50%, #fca5a5 100%);
    color: #991b1b;
    box-shadow: 
        0 2px 4px rgba(220, 38, 38, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* Logo 圖標金屬質感 */
.logo-icon {
    background: var(--metallic-primary);
    box-shadow: 
        0 4px 12px rgba(59, 130, 246, 0.3),
        0 2px 6px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.logo-icon:hover {
    box-shadow: 
        0 6px 16px rgba(59, 130, 246, 0.4),
        0 3px 8px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* 側邊欄金屬質感 */
.sidebar {
    background: var(--metallic-light);
    box-shadow: 
        4px 0 8px rgba(0, 0, 0, 0.1),
        inset -1px 0 0 rgba(0, 0, 0, 0.1);
    border-right: none;
}

[data-theme="dark"] .sidebar {
    box-shadow: 
        4px 0 8px rgba(0, 0, 0, 0.3),
        inset -1px 0 0 rgba(0, 0, 0, 0.3);
}

/* 選單項目金屬質感 */
.sidebar-menu-item {
    background: transparent;
    border: none;
    box-shadow: none;
    transition: all 0.3s ease;
}

.sidebar-menu-item:hover {
    background: var(--metallic-light);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.sidebar-menu-item.active {
    background: var(--metallic-primary);
    color: white;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(59, 130, 246, 0.2);
}

/* 平滑過渡動畫 */
* {
    transition: background-color 0.3s ease, 
                color 0.3s ease, 
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}
