/*
 * JY 技术团队 - Cyberpunk UI Design System
 * Version: 1.0.0
 * Author: Gemini Engineer
 */

/* ---------------------------------- */
/*          1. CSS 變數定義           */
/* ---------------------------------- */
:root {
    /* 顏色系統 */
    --jy-bg-gradient: linear-gradient(145deg, #0d0518 0%, #1a0b36 50%, #0d0518 100%);
    --jy-neon-primary: #00ffff; /* 亮青色 */
    --jy-neon-secondary: #ff00ff; /* 粉紫色 */
    --jy-neon-danger: #ff4d4d; /* 危險紅 */
    --jy-neon-warning: #ffcc00; /* 警告橘 */
    --jy-color-text-primary: #e0e0e0; /* 主要文字色 */
    --jy-color-text-secondary: #a0a0b0; /* 次要文字色 */
    --jy-color-success: #00ff80; /* 成功綠 */

    /* 元件顏色 */
    --jy-card-bg: rgba(22, 16, 46, 0.6);
    --jy-card-border: rgba(0, 255, 255, 0.3);
    --jy-card-border-hover: rgba(0, 255, 255, 0.7);
    --jy-input-bg: rgba(0, 0, 0, 0.3);
    --jy-input-border: rgba(0, 255, 255, 0.4);
    --jy-input-border-focus: var(--jy-neon-primary);

    /* 字體 */
    --jy-font-primary: 'Orbitron', 'Microsoft YaHei', sans-serif; /* 標題、數字 */
    --jy-font-secondary: 'Rajdhani', 'Microsoft YaHei', sans-serif; /* 內文 */

    /* 尺寸 */
    --jy-top-nav-height: 100px;
    --jy-border-radius: 15px;
}

/* ---------------------------------- */
/*          2. 基礎與佈局樣式         */
/* ---------------------------------- */
.jy-shell {
    font-family: var(--jy-font-secondary);
    background: var(--jy-bg-gradient);
    color: var(--jy-color-text-primary);
    min-height: 100vh;
    padding-top: var(--jy-top-nav-height);
    box-sizing: border-box;
    overflow-x: hidden;
}

.jy-shell::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 15% 25%, rgba(0, 255, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 75%, rgba(255, 0, 255, 0.15) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

.jy-main {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px;
    position: relative;
    z-index: 10;
}

/* ---------------------------------- */
/*        3. 頂部導航 (.jy-top-nav)      */
/* ---------------------------------- */
.jy-top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--jy-top-nav-height);
    background: rgba(10, 5, 20, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--jy-card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
}

.jy-top-nav .nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--jy-color-text-primary);
    font-family: var(--jy-font-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.jy-top-nav .nav-brand .brand-logo {
    height: 40px;
}

.jy-top-nav .nav-items {
    display: flex;
    gap: 10px;
}

.jy-nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: var(--jy-border-radius);
    text-decoration: none;
    transition:
        background-color 0.3s,
        border-color 0.3s,
        box-shadow 0.3s;
}

.jy-nav-item:hover {
    background-color: rgba(0, 255, 255, 0.1);
    border-color: var(--jy-card-border);
}

.jy-nav-item.jy-nav-item--active {
    background: linear-gradient(45deg, rgba(0, 255, 255, 0.2), rgba(255, 0, 255, 0.2));
    border-color: var(--jy-card-border-hover);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.jy-nav-item .nav-card-icon {
    font-size: 1.2rem;
    color: var(--jy-neon-primary);
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.jy-nav-item .nav-card-content {
    line-height: 1.3;
}

.jy-nav-item .nav-card-title {
    color: var(--jy-color-text-primary);
    font-weight: 600;
}

.jy-nav-item .nav-card-desc {
    font-size: 0.8rem;
    color: var(--jy-color-text-secondary);
}

/* ---------------------------------- */
/*        4. 區塊與卡片 (.jy-section)   */
/* ---------------------------------- */
.jy-section {
    background: var(--jy-card-bg);
    border: 1px solid var(--jy-card-border);
    border-radius: var(--jy-border-radius);
    padding: 30px;
    margin-bottom: 40px;
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.jy-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.jy-section-title {
    font-family: var(--jy-font-primary);
    font-size: 1.5rem;
    color: var(--jy-color-text-primary);
    margin: 0;
    text-shadow: 0 0 10px var(--jy-neon-primary);
}

/* ---------------------------------- */
/*    5. 指標卡片 (.jy-metric-card)   */
/* ---------------------------------- */
.jy-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.jy-metric-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--jy-card-border);
    border-radius: var(--jy-border-radius);
    padding: 25px;
    text-align: center;
    transition:
        transform 0.3s,
        box-shadow 0.3s,
        border-color 0.3s;
}

.jy-metric-card:hover {
    transform: translateY(-5px);
    border-color: var(--jy-card-border-hover);
    box-shadow: 0 8px 30px rgba(0, 255, 255, 0.2);
}

.jy-metric-card .label {
    font-size: 0.9rem;
    color: var(--jy-color-text-secondary);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.jy-metric-card .value {
    font-family: var(--jy-font-primary);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--jy-neon-primary);
    text-shadow: 0 0 15px var(--jy-neon-primary);
    margin-bottom: 10px;
}

.jy-metric-card .change {
    font-size: 0.85rem;
    color: var(--jy-color-success);
}

.jy-metric-card .change.negative {
    color: var(--jy-neon-danger);
}

/* ---------------------------------- */
/*      6. 圖表卡片 (.jy-chart-card)    */
/* ---------------------------------- */
.jy-chart-card {
    /* .jy-section can be used directly or extended */
    padding: 30px;
}

/* ---------------------------------- */
/*      7. 列表卡片 (.jy-list-card)     */
/* ---------------------------------- */
.jy-list-card {
    /* .jy-section can be used directly */
}

.jy-list-card .log-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid var(--jy-neon-primary);
    border-radius: 5px;
    transition: background-color 0.3s;
}

.jy-list-card .log-item:hover {
    background-color: rgba(0, 255, 255, 0.1);
}

/* ---------------------------------- */
/*     8. 霓虹滾動條 (.jy-scrollbar-neon) */
/* ---------------------------------- */
.jy-scrollbar-neon::-webkit-scrollbar {
    width: 10px;
}

.jy-scrollbar-neon::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.jy-scrollbar-neon::-webkit-scrollbar-thumb {
    background: var(--jy-neon-primary);
    border-radius: 10px;
    box-shadow: 0 0 10px var(--jy-neon-primary);
}

.jy-scrollbar-neon::-webkit-scrollbar-thumb:hover {
    background: #4dffff;
}

/* ---------------------------------- */
/*        9. 表單元素 (.jy-input, etc.) */
/* ---------------------------------- */
.jy-input,
.jy-select {
    width: 100%;
    padding: 12px 15px;
    background: var(--jy-input-bg);
    border: 1px solid var(--jy-input-border);
    border-radius: 8px;
    color: var(--jy-color-text-primary);
    font-family: var(--jy-font-secondary);
    font-size: 1rem;
    transition:
        border-color 0.3s,
        box-shadow 0.3s;
}

.jy-input:focus,
.jy-select:focus {
    outline: none;
    border-color: var(--jy-input-border-focus);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.jy-button-primary {
    padding: 12px 30px;
    font-family: var(--jy-font-primary);
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    background: linear-gradient(45deg, var(--jy-neon-primary), var(--jy-neon-secondary));
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition:
        box-shadow 0.3s,
        transform 0.3s;
}

.jy-button-primary:hover {
    box-shadow: 0 0 20px var(--jy-neon-primary);
    transform: translateY(-2px);
}

.jy-button-secondary {
    padding: 10px 25px;
    background: transparent;
    border: 1px solid var(--jy-input-border);
    color: var(--jy-color-text-primary);
    border-radius: 8px;
    cursor: pointer;
    transition:
        background-color 0.3s,
        border-color 0.3s;
}

.jy-button-secondary:hover {
    background-color: rgba(0, 255, 255, 0.1);
    border-color: var(--jy-card-border-hover);
}

/* ---------------------------------- */
/*    10. 攻擊面板專用 (.jy-attack-*)  */
/* ---------------------------------- */

.jy-attack-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.jy-attack-form-card,
.jy-attack-running-card {
    /* Inherits from .jy-section */
}

.jy-form-group {
    margin-bottom: 20px;
}

.jy-form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--jy-color-text-secondary);
    font-size: 0.9rem;
}
