/* 全域樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft JhengHei', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    overflow: hidden;
}

/* 標題列 */
.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 24px;
    color: #667eea;
    margin: 0;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.3s;
}

.icon-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* 主容器 */
.container {
    display: flex;
    height: calc(100vh - 70px);
    padding: 20px;
    gap: 20px;
}

/* 地圖區域 */
.map-section {
    flex: 1;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 側邊欄 */
.sidebar {
    width: 350px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 區塊樣式 */
.section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.section h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #667eea;
}

/* 任務列表 */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
    cursor: pointer;
}

.task-item:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateX(5px);
}

.task-item.completed {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4caf50;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.task-name {
    font-weight: bold;
    color: #333;
}

.task-status {
    font-size: 18px;
}

.task-location {
    font-size: 14px;
    color: #666;
}

/* 成就列表 */
.achievement-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.achievement-item {
    padding: 12px;
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: transform 0.3s;
}

.achievement-item:hover {
    transform: scale(1.02);
}

.achievement-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.achievement-icon {
    font-size: 24px;
}

.achievement-name {
    font-weight: bold;
    font-size: 16px;
}

.achievement-task {
    font-size: 13px;
    opacity: 0.9;
}

.empty-message {
    text-align: center;
    color: #999;
    padding: 20px;
    font-style: italic;
}

/* 按鈕樣式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(17, 153, 142, 0.3);
}

.btn-warning {
    background: #ff9800;
    color: white;
}

.btn-warning:hover {
    background: #e68900;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
}

/* 響應式設計 */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        max-height: 40vh;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 18px;
    }
    
    .container {
        padding: 10px;
    }
    
    .sidebar {
        max-height: 50vh;
    }
}