:root {
    --bg-color: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --border-color: rgba(148, 163, 184, 0.2);
    --accent-color: #f59e0b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --action-bg: rgba(51, 65, 85, 0.8);
    --action-hover: #f59e0b;
    --action-text: #ffffff;
    --danger-color: #ef4444;
    --heal-color: #10b981;
    --info-color: #3b82f6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    background: radial-gradient(circle at center, #1e293b 0%, #020617 100%);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#game-container {
    width: 95%;
    max-width: 1000px;
    height: 90vh;
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

#game-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.8);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

#game-header h1 {
    color: var(--accent-color);
    font-size: 2.2rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
    margin-bottom: 5px;
}

#game-header h2 {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

#main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

#status-panel {
    width: 250px;
    padding: 20px;
    background: rgba(15, 23, 42, 0.5);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
}

#status-panel h3 {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 5px;
}

.margin-top {
    margin-top: 30px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

#skills-list {
    list-style-type: none;
}

#skills-list li {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    border-left: 3px solid var(--accent-color);
}

.empty-skill {
    color: var(--text-secondary);
    font-style: italic;
    border-left: 3px solid gray !important;
}

#story-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow: hidden;
}

#story-log {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#story-log p {
    line-height: 1.6;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--info-color);
    animation: fadeIn 0.3s ease-in-out;
}

#story-log p.combat {
    border-left-color: var(--danger-color);
}

#story-log p.success {
    border-left-color: var(--heal-color);
}

#story-log p.dialogue {
    border-left-color: var(--accent-color);
    font-style: italic;
}

#action-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

button.action-btn {
    background: var(--action-bg);
    color: var(--action-text);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    flex-grow: 1;
    min-width: calc(33.333% - 10px);
}

button.action-btn:hover {
    background: var(--action-hover);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

button.action-btn:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

button.action-btn.combat-btn {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.5);
    color: #fca5a5;
}

button.action-btn.combat-btn:hover {
    background: var(--danger-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

@media (max-width: 768px) {
    #main-content {
        flex-direction: column;
    }
    #status-panel {
        width: 100%;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    button.action-btn {
        min-width: calc(50% - 10px);
    }
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
