/* 控制面板 - 使用統一設計系統 */
.panel {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

/* 面板呼吸效果 */
.panel.highlight {
    animation: panelHighlight 2s infinite;
}

@keyframes panelHighlight {
    0% { box-shadow: 0 0 0 2px rgba(201, 60, 74, 0.2), var(--shadow-md); }
    50% { box-shadow: 0 0 0 3px rgba(201, 60, 74, 0.4), var(--shadow-lg); }
    100% { box-shadow: 0 0 0 2px rgba(201, 60, 74, 0.2), var(--shadow-md); }
}

.panel-title {
    font-family: var(--font-heading);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-title-icon {
    margin-right: var(--spacing-sm);
    font-size: var(--font-size-xl);
}

.panel-help {
    font-size: var(--font-size-base);
    color: var(--color-primary);
    cursor: pointer;
    opacity: 0.7;
    transition: all var(--transition-base);
}

.panel-help:hover {
    opacity: 1;
    transform: scale(1.1);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 改進按鈕樣式 - 使用統一設計系統 */
.action-button {
    padding: var(--spacing-md);
    background: var(--color-primary);
    color: var(--color-text-on-primary);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
}

/* 按鈕波紋效果 */
.action-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.action-button:active::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* 突出顯示推薦操作 */
.action-button.recommended {
    background: var(--color-accent);
    animation: pulse 2s infinite;
}

.action-button:hover:not(:disabled) {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-button.recommended:hover:not(:disabled) {
    background: var(--color-accent-hover);
}

.action-button:disabled {
    background: var(--color-border);
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.action-cost {
    font-size: var(--font-size-xs);
    background: rgba(0, 0, 0, 0.2);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.action-icon {
    margin-right: var(--spacing-sm);
    font-size: var(--font-size-lg);
}

/* 暗黑模式樣式已由 variables.css 統一處理，此處僅保留特殊覆蓋 */

/* 列表改進 - 使用統一設計系統 */
.flowers-list, .birds-list, .memories-list, .tears-list {
    max-height: 200px;
    overflow-y: auto;
    padding-right: var(--spacing-xs);
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) var(--color-border-light);
}

.flowers-list::-webkit-scrollbar, 
.birds-list::-webkit-scrollbar, 
.memories-list::-webkit-scrollbar, 
.tears-list::-webkit-scrollbar {
    width: 6px;
}

.flowers-list::-webkit-scrollbar-thumb, 
.birds-list::-webkit-scrollbar-thumb, 
.memories-list::-webkit-scrollbar-thumb, 
.tears-list::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    border-radius: var(--radius-sm);
}

.flowers-list::-webkit-scrollbar-track, 
.birds-list::-webkit-scrollbar-track, 
.memories-list::-webkit-scrollbar-track, 
.tears-list::-webkit-scrollbar-track {
    background-color: var(--color-border-light);
    border-radius: var(--radius-sm);
}

.flower-item, .bird-item, .memory-item, .tear-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: all var(--transition-base);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-xs);
}

.flower-item:hover, .bird-item:hover, .memory-item:hover, .tear-item:hover {
    background: var(--color-light-hover);
    transform: translateX(4px);
}

/* 記憶狀態樣式 */
.memory-item.memory-locked {
    opacity: 0.7;
    border-left: 3px solid var(--color-error);
}

.memory-item.memory-unlocked {
    border-left: 3px solid var(--color-success);
}

/* 新增項目效果 */
.new-item {
    animation: newItem 2s ease;
}

@keyframes newItem {
    0% { background-color: rgba(201, 60, 74, 0.2); }
    100% { background-color: transparent; }
}

.flower-item-icon, .bird-item-icon, .memory-item-icon, .tear-item-icon {
    font-size: var(--font-size-xl);
    margin-right: var(--spacing-md);
    width: 32px;
    text-align: center;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.flower-item-details, .bird-item-details, .memory-item-details, .tear-item-details {
    flex: 1;
}

.item-name {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xs);
    font-family: var(--font-body);
}

.item-level, .item-description {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: var(--line-height-normal);
    font-family: var(--font-body);
}

@media (prefers-color-scheme: dark) {
    .flowers-list, .birds-list, .memories-list, .tears-list {
        scrollbar-color: #5D5CDE #333;
    }
    
    .flowers-list::-webkit-scrollbar-thumb, 
    .birds-list::-webkit-scrollbar-thumb, 
    .memories-list::-webkit-scrollbar-thumb, 
    .tears-list::-webkit-scrollbar-thumb {
        background-color: #5D5CDE;
    }
    
    .flowers-list::-webkit-scrollbar-track, 
    .birds-list::-webkit-scrollbar-track, 
    .memories-list::-webkit-scrollbar-track, 
    .tears-list::-webkit-scrollbar-track {
        background-color: #333;
    }
    
    .flower-item, .bird-item, .memory-item, .tear-item {
        border-bottom: 1px solid #444;
    }
    
    .flower-item:hover, .bird-item:hover, .memory-item:hover, .tear-item:hover {
        background: rgba(60, 60, 60, 0.5);
    }
    
    .item-name {
        color: #d4b483;
    }
    
    .item-level, .item-description {
        color: #aaa;
    }
    
    .counter-badge {
        background-color: #8B4513;
        box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    }
}

/* 進度條改進 - 使用統一設計系統 */
.progress-container {
    width: 100%;
    height: 12px;
    background: var(--color-border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: var(--spacing-xs);
    box-shadow: var(--shadow-inner);
    position: relative;
}

.progress-label {
    position: absolute;
    top: -18px;
    right: 0;
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    font-family: var(--font-body);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--color-primary), var(--color-primary-light));
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
    position: relative;
}

/* 進度條閃光效果 */
.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, 
                    transparent 0%, 
                    rgba(255,255,255,0.3) 50%, 
                    transparent 100%);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 淚水進度條特殊樣式 */
.tear-progress-bar {
    background: linear-gradient(to right, var(--color-accent), var(--color-accent-light)); 
}

/* 建造菜單改進 */
.build-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.build-item {
    padding: 12px;
    background: rgba(255, 245, 230, 0.8);
    border: 1px solid #d4b483;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.build-item:hover {
    background: rgba(255, 245, 230, 1);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 推薦選擇的項目 */
.build-item.recommended {
    box-shadow: 0 0 0 2px #5D5CDE, 0 2px 5px rgba(0,0,0,0.1);
    animation: recommendPulse 2s infinite;
}

@keyframes recommendPulse {
    0% { box-shadow: 0 0 0 2px rgba(93, 92, 222, 0.5), 0 2px 5px rgba(0,0,0,0.1); }
    50% { box-shadow: 0 0 0 3px rgba(93, 92, 222, 1), 0 5px 15px rgba(0,0,0,0.2); }
    100% { box-shadow: 0 0 0 2px rgba(93, 92, 222, 0.5), 0 2px 5px rgba(0,0,0,0.1); }
}

.build-item.disabled {
    background: #eee;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.build-icon {
    font-size: 28px;
    margin-bottom: 8px;
    color: #5a3921;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

.build-name {
    font-size: 14px;
    text-align: center;
    color: #5a3921;
    font-weight: bold;
    margin-bottom: 5px;
}

.build-cost {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.5);
    padding: 3px 8px;
    border-radius: 10px;
}

.build-cost-icon {
    font-size: 13px;
}

/* 建築足夠資源顯示 */
.build-item:not(.disabled) .build-cost {
    color: #4CAF50;
}

@media (prefers-color-scheme: dark) {
    .build-item {
        background: rgba(70, 60, 45, 0.8);
        border: 1px solid #a08463;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    
    .build-item:hover {
        background: rgba(80, 70, 55, 1);
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    }
    
    .build-item.disabled {
        background: #444;
        opacity: 0.5;
    }
    
    .build-icon {
        color: #d4b483;
    }
    
    .build-name {
        color: #d4b483;
    }
    
    .build-cost {
        color: #aaa;
        background: rgba(0,0,0,0.2);
    }
    
    .build-item:not(.disabled) .build-cost {
        color: #81C784;
    }
}

