:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-dark: #1e293b;
    --text-light: #64748b;
    --success: #10b981;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out; }

body {
    font-family: 'Inter', 'Noto Sans TC', system-ui, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-dark);
    margin: 0;
    padding: 40px 20px;
    line-height: 1.6;
    min-height: 100vh;
}

.container { max-width: 860px; margin: 0 auto; }

.header { text-align: center; margin-bottom: 40px; }
.header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(to right, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
}
.header p { color: var(--text-light); font-size: 1.1rem; margin-top: 10px; font-weight: 600; }
.nav-link { color: var(--primary); text-decoration: none; font-size: 1rem; }
.nav-link:hover { color: var(--primary-hover); text-decoration: underline; }

/* 主頁上半部: 左側 Logo/標題, 右側集中放置純資訊類卡片 (目前設定/硬體偵測);
   這兩張卡片只是唯讀資訊, 用比正文卡片更小的字級與間距, 避免佔掉太多版面 */
.hero {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
}
.hero-brand {
    flex: 1 1 200px;
    text-align: left;
}
.hero-brand h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(to right, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
}
.hero-brand p { color: var(--text-light); font-size: 0.85rem; margin-top: 6px; font-weight: 600; }
.hero-info {
    flex: 2 1 400px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
}
.hero-info .card {
    flex: 1 1 220px;
    margin-bottom: 0;
    padding: 18px 20px;
}
.hero-info .section-label { font-size: 0.85rem; margin-bottom: 8px; }
.hero-info .info-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    text-align: left;
}
.hero-info .info-item {
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    flex: 0 1 auto;
}
.hero-info p { font-size: 0.8rem; margin: 8px 0 0; }

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    text-align: center;
    font-size: 0.9rem;
}
.info-item {
    background: rgba(99, 102, 241, 0.05);
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-weight: 600;
}
/* 資訊項目裡的「名稱」與「內容」用不同顏色, 方便一眼分辨 (例如 CPU/GPU/RAM 這類標籤) */
.info-label { color: var(--text-light); font-weight: 600; margin-right: 4px; }
.info-value { color: var(--primary); font-weight: 700; }

.section-label {
    display: flex;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-dark);
    align-items: center;
    gap: 8px;
}

input[type="text"], input[type="file"] {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    font-size: 1.1rem;
    background: #f8fafc;
    font-family: inherit;
}
input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: #fff;
}

.options-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    background: #f1f5f9;
    padding: 16px;
    border-radius: 18px;
}
.option-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
}
.option-item:hover { border-color: var(--primary); background: rgba(99, 102, 241, 0.05); }

/* Custom Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(20px); }

.btn-submit {
    width: 100%;
    padding: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 1.6rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
    margin-top: 20px;
}
.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 30px -10px rgba(99, 102, 241, 0.5);
}

#loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.98);
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.spinner {
    width: 70px;
    height: 70px;
    border: 8px solid rgba(255,255,255,0.1);
    border-top: 8px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loading-text { font-size: 1.8rem; font-weight: 800; margin-bottom: 30px; background: linear-gradient(to right, #818cf8, #f472b6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.terminal-box {
    width: 90%;
    max-width: 600px;
    height: 250px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    overflow-y: auto;
    color: #94a3b8;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}
.terminal-line { margin-bottom: 8px; border-left: 2px solid #334155; padding-left: 10px; }
.terminal-line.active { color: #22c55e; border-left-color: #22c55e; }
