:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --primary-color: #10b981;
    --primary-hover: #059669;
    --border-color: #e2e8f0;
    --ad-bg: #f1f5f9;
    --border-color: #e2e8f0;
}

.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    margin-right: 8px;
    vertical-align: middle;
}

/* 藍色引導動畫 */
.guidance-active {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
    animation: pulse-primary 1.5s infinite;
}

@keyframes pulse-primary {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hidden {
    display: none !important;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 800px;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.converter-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.category-section {
    margin-bottom: 25px;
}

.category-section:last-child {
    margin-bottom: 0;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.input-group .unit-symbol {
    color: var(--primary-color);
    font-weight: 700;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    background: var(--card-bg);
    color: var(--text-primary);
    font-family: 'Inter', monospace;
}

.input-wrapper input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Quick Fill Buttons */
.quick-fill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.quick-btn {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
    font-weight: 500;
}

.quick-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(16, 185, 129, 0.05);
}

/* Ad placeholder styling */
.ad-placeholder {
    width: 100%;
    background-color: var(--ad-bg);
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.top-ad { height: 90px; }
.bottom-ad { height: 250px; }

.info-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.info-section h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.info-content {
    color: var(--text-secondary);
}

.info-content p {
    margin-bottom: 10px;
}

.info-content ul, .info-content ol {
    margin-left: 20px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.info-content li {
    margin-bottom: 8px;
}

/* Knowledge Cards */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 5px;
}

.knowledge-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.knowledge-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.1);
    border-color: var(--primary-color);
}

.knowledge-header {
    margin-bottom: 8px;
}

.knowledge-symbol {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Inter', monospace;
    background: rgba(16, 185, 129, 0.08);
    padding: 3px 10px;
    border-radius: 6px;
}

.knowledge-field {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    margin-top: 10px;
}

.knowledge-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .converter-card { padding: 20px; }
    .info-section { padding: 20px; }
    h1 { font-size: 1.8rem; }
}
