.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

.trade-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 15px;
}

.trade-title h2 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.trade-title p {
    margin: 5px 0 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Search Form */
.search-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.search-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    justify-content: center;
}

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

.input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.search-form input {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    color: var(--text-color);
    border-radius: 8px;
    width: 200px;
    transition: border-color 0.2s;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-search {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    height: 40px;
}

.btn-search:hover {
    background: #2980b9;
}

/* List Cards */
.selection-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.selection-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.list-item {
    padding: 12px 15px;
    background: var(--bg-light);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.list-item:hover {
    background: var(--bg-card);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Detail View */
.detail-header {
    margin-bottom: 25px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 15px;
}

.detail-header h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

/* Filter UI */
.filter-section {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.filter-title {
    font-weight: 700;
    margin-bottom: 15px;
    display: block;
    color: var(--secondary-color);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill-checkbox {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.2s;
    user-select: none;
}

.pill-checkbox input {
    display: none;
}

.pill-checkbox:has(input:checked) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Stats Card */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    display: block;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
}

.stat-value.max { color: #e74c3c; }
.stat-value.min { color: #27ae60; }

/* Chart */
.chart-container {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
    height: 500px;
}

/* Table */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.pagination-controls button {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-controls button:hover:not(:disabled) {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-controls button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-controls .page-info {
    font-size: 0.85rem;
    color: var(--text-color);
    min-width: 50px;
    text-align: center;
}

.unit-toggle {
    display: flex;
    gap: 10px;
    background: var(--bg-light);
    padding: 5px;
    border-radius: 8px;
}

.unit-toggle label {
    padding: 4px 12px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.unit-toggle input { display: none; }
.unit-toggle label:has(input:checked) {
    background: var(--bg-card);
    color: var(--text-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: 600;
}

.trade-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.trade-table th {
    background: var(--bg-light);
    padding: 15px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.trade-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    text-align: center;
    color: var(--text-color);
}

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

.trade-table tr:hover td {
    background-color: rgba(52, 152, 219, 0.05);
}

.highlight-max { background-color: rgba(231, 76, 60, 0.1) !important; }
.highlight-max td:nth-child(2) { color: #e74c3c; font-weight: 700 !important; }
.highlight-min { background-color: rgba(39, 174, 96, 0.1) !important; }
.highlight-min td:nth-child(2) { color: #27ae60; font-weight: 700 !important; }

/* 미래 예측 섹션 */
.prediction-section {
    margin-bottom: 30px;
    display: none;
}
.prediction-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}
.prediction-title::before {
    content: '🚀';
}
.prediction-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 15px;
}
.prediction-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
}
.prediction-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.prediction-card .prob-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: block;
}
.prediction-card .prob-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
}
.prediction-card .prob-bar-bg {
    height: 6px;
    background: var(--bg-light);
    border-radius: 3px;
    margin-top: 15px;
    position: relative;
}
.prediction-card .prob-bar-fill {
    height: 100%;
    border-radius: 3px;
    position: absolute;
    left: 0;
    top: 0;
    transition: width 1s ease-out;
}
.high-card .prob-bar-fill { background: linear-gradient(90deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%); }
.rise-card .prob-bar-fill { background: linear-gradient(90deg, #a1c4fd 0%, #c2e9fb 100%); }
.fall-card .prob-bar-fill { background: linear-gradient(90deg, #84fab0 0%, #8fd3f4 100%); }

.high-card .prob-value { color: #e74c3c; }
.rise-card .prob-value { color: #3498db; }
.fall-card .prob-value { color: #95a5a6; }

.prediction-info {
    background: var(--bg-card);
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px dashed var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.prediction-info h5 {
    margin: 0 0 10px 0;
    color: var(--secondary-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}
.prediction-info ul {
    margin: 0;
    padding-left: 18px;
}
.prediction-info li {
    margin-bottom: 5px;
}
.prediction-info li strong {
    color: var(--text-color);
}
/* Naver Map Link */
.list-item-wrap { 
    display: flex; 
    gap: 8px; 
    align-items: center; 
    overflow: hidden;
}
.list-item-wrap .list-item { 
    flex: 1; 
    min-width: 0;
    white-space: normal;
    word-break: break-all;
}
.btn-map { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 40px; 
    height: 42px; 
    flex-shrink: 0;
    background: var(--bg-light); 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    color: #2db400; 
    text-decoration: none; 
    transition: all 0.2s; 
}
.btn-map:hover { background: #2db400; color: white; border-color: #2db400; transform: translateY(-2px); }
