:root {
    --primary-color: #03dac6;
    --secondary-color: #ff6b6b;
    --bg-dark: #121212;
    --bg-medium: #1e1e1e;
    --bg-light: #2c2c2c;
    --text-color: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #333;
    --accent-color: #03dac6;
    --header-color: #bb86fc;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-color);
}

/* --- 模态框样式 (Modal Styles) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-medium);
    width: 95%;
    height: 92%;
    max-width: 1400px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 1.2rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(44, 44, 44, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
    letter-spacing: 0.5px;
}

.modal-back-btn {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.modal-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border-color: var(--text-secondary);
}

.modal-back-btn i {
    font-size: 0.9rem;
}

/* Body Scroll */
.modal-body {
    padding: 2rem 3rem;
    overflow-y: auto;
    flex: 1;
    scroll-behavior: smooth;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 详情内容美化 */
.modal-body h3 {
    color: var(--accent-color);
    border-left: 3px solid var(--accent-color);
    padding-left: 10px;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.modal-body p {
    line-height: 1.8;
    color: #ddd;
    font-size: 1.05rem;
}

.modal-body ul {
    list-style: none;
    padding: 0;
}

.modal-body ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.modal-body ul li::before {
    content: "•";
    color: var(--accent-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1.4rem;
}

/* 参数表格 */
.parameter-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    overflow: hidden;
}

.parameter-table th, .parameter-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.parameter-table th {
    background: rgba(255,255,255,0.05);
    color: var(--accent-color);
    font-weight: 600;
}

.parameter-table tr:last-child td {
    border-bottom: none;
}

.parameter-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

/* 标签样式 */
.material-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
}

.material-tag {
    background: rgba(3, 218, 198, 0.15);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(3, 218, 198, 0.3);
}

/* 参考文献 */
.reference-list {
    background: rgba(0,0,0,0.2);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 1rem;
}

.reference-item {
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    color: #999;
}

/* --- 能量游乐场 (Energy Playground) 样式 --- */
.playground-interface {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
    margin-bottom: 2rem;
    background: rgba(30, 30, 30, 0.5);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    position: relative;
}

.playground-column {
    flex: 1;
    background: var(--bg-light);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.playground-column:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.source-column {
    border-top: 4px solid #03dac6;
}

.target-column {
    border-top: 4px solid #ff6b6b;
}

.column-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.column-header h2 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--text-color);
    text-align: left;
}

.header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.source-icon {
    background: rgba(3, 218, 198, 0.1);
    color: #03dac6;
}

.target-icon {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

/* 能量网格 - 紧凑型 */
.energy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    flex-grow: 1;
}

.energy-card {
    background: var(--bg-medium);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 100px;
}

.energy-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.energy-card.selected {
    background: rgba(3, 218, 198, 0.1);
    border-color: #03dac6;
    box-shadow: 0 0 15px rgba(3, 218, 198, 0.2);
}

.target-column .energy-card.selected {
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff6b6b;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.2);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 0;
}

.card-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

/* 中间连接器 */
.playground-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    position: relative;
}

.connector-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--border-color);
    z-index: 1;
}

.connector-node {
    width: 50px;
    height: 50px;
    background: var(--bg-medium);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    font-size: 1.2rem;
    color: var(--accent-color);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transition: all 0.5s ease;
}

.playground-interface:hover .connector-node {
    transform: rotate(180deg);
    box-shadow: 0 0 25px rgba(3, 218, 198, 0.4);
}

/* 占位符结果 */
.placeholder-result {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-style: italic;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

/* 响应式调整 */
@media (max-width: 900px) {
    .playground-interface {
        flex-direction: column;
        gap: 10px;
    }
    
    .playground-connector {
        width: 100%;
        height: 60px;
        flex-direction: row;
    }
    
    .connector-line {
        width: 2px;
        height: 100%;
        top: 0;
        left: 50%;
    }
    
    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
}
