/* 검색 */
.search-filter-area {
    padding: 16px 0 0;
}

.search-box {
    max-width: 480px;
    margin: 0 auto;
}

.search-count {
    text-align: center;
    padding: 8px 0 0;
}

/* 탭 토글 */
.open-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
    gap: 0;
    background: linear-gradient(135deg, #e0fd53, #c8e019);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 24px;
}

.open-toggle .toggle-btn {
    flex: 1;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.open-toggle .toggle-btn:first-child {
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.open-toggle .toggle-btn.active {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}

.open-toggle .toggle-btn:hover:not(.active) {
    background: rgba(0, 0, 0, 0.08);
    color: #1a1a1a;
}

/* 탭 콘텐츠 */
.open-tab {
    display: none;
}

.open-tab.active {
    display: block;
}

/* 통계 탭 내 stats-section 상단 여백 제거 */
#tab-stats .stats-section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* 연도 필터 스타일 */
.year-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
}

.year-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 8px;
}

.year-select {
    padding: 10px 16px;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    min-width: 150px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.year-select:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.year-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(49,130,246,0.1);
}

/* option 스타일 */
.year-select option {
    padding: 8px 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* 워크아웃 컨테이너 */
.workouts-container {
    max-width: 1200px;
    margin: 0 auto;
}

.workout-year {
    margin-bottom: 48px;
}

.workout-year.hidden {
    display: none;
}

.year-title {
    font-size: 28px;
    font-weight: bold;
    color: var(--accent-primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-primary);
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.year-sponsor {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    letter-spacing: 0.5px;
}

/* 워크아웃 그리드 */
.workout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* 워크아웃 카드 */
.workout-card {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}


.workout-card:hover {
    box-shadow: 0 4px 16px rgba(224, 253, 83, 0.2);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

/* 워크아웃 헤더 */
.workout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.workout-number {
    font-size: 20px;
    font-weight: bold;
    color: var(--accent-primary);
}

.workout-type {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 워크아웃 내용 */
.workout-content {
    line-height: 1.6;
}

.workout-content p {
    margin-bottom: 12px;
}

.workout-content p:last-child {
    margin-bottom: 0;
}

.workout-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* 페이지 설명 */
.description {
    text-align: center;
    margin-bottom: 32px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.description p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .open-toggle {
        max-width: 260px;
        margin-bottom: 20px;
    }
    .open-toggle .toggle-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .year-filter {
        flex-direction: column;
        gap: 8px;
        padding: 16px 0;
    }
    
    .year-label {
        font-size: 14px;
        margin-right: 0;
        margin-bottom: 4px;
    }
    
    .year-select {
        min-width: 200px;
        font-size: 14px;
        padding: 8px 12px;
        padding-right: 36px;
    }
    
    .workout-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .workout-card {
        padding: 20px;
    }
    
    .year-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .workout-year {
        margin-bottom: 32px;
    }
}

@media (max-width: 480px) {
    .open-toggle {
        max-width: 220px;
        margin-bottom: 16px;
    }
    .open-toggle .toggle-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .year-filter {
        gap: 6px;
        padding: 12px 0;
    }
    
    .year-label {
        font-size: 13px;
    }
    
    .year-select {
        min-width: 180px;
        font-size: 13px;
        padding: 6px 10px;
        padding-right: 32px;
        background-size: 14px;
        background-position: right 10px center;
    }
    
    .workout-card {
        padding: 16px;
    }
    
    .workout-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .workout-number {
        font-size: 18px;
    }
    
    .year-title {
        font-size: 20px;
        margin-bottom: 16px;
    }
    
    .description {
        padding: 16px;
        margin-bottom: 24px;
    }
    
    .description p {
        font-size: 14px;
    }
}

/* 동작 통계 */
.stats-section {
    max-width: 1200px;
    margin: 48px auto 0;
    padding-top: 48px;
    border-top: 2px solid var(--border-light);
}

.stats-title {
    font-size: 28px;
    font-weight: bold;
    color: var(--accent-primary);
    margin-bottom: 8px;
}

.stats-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bar-label {
    width: 120px;
    flex-shrink: 0;
    text-align: right;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-track {
    flex: 1;
    height: 28px;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    min-width: 28px;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 0;
}

.bar-fill.animated {
    /* width set by JS */
}

/* 카테고리 색상 */
.bar-fill[data-cat="cardio"]     { background: #e53935; }
.bar-fill[data-cat="barbell"]    { background: #1e88e5; }
.bar-fill[data-cat="gymnastics"] { background: #43a047; }
.bar-fill[data-cat="dumbbell"]   { background: #fb8c00; }
.bar-fill[data-cat="body"]       { background: #8e24aa; }
.bar-fill[data-cat="other"]      { background: #546e7a; }

/* 범례 */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.legend-dot[data-cat="cardio"]     { background: #e53935; }
.legend-dot[data-cat="barbell"]    { background: #1e88e5; }
.legend-dot[data-cat="gymnastics"] { background: #43a047; }
.legend-dot[data-cat="dumbbell"]   { background: #fb8c00; }
.legend-dot[data-cat="body"]       { background: #8e24aa; }
.legend-dot[data-cat="other"]      { background: #546e7a; }

/* 리핏 워크아웃 */
.repeat-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.repeat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.repeat-badge {
    display: inline-block;
    width: fit-content;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 3px 10px;
    border-radius: 12px;
}

.repeat-badge.exact {
    color: #e0fd53;
    background: rgba(224, 253, 83, 0.1);
}

.repeat-badge.similar {
    color: #53c8fd;
    background: rgba(83, 200, 253, 0.1);
}

.repeat-workouts {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.repeat-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .repeat-list {
        grid-template-columns: 1fr;
    }

    .bar-label {
        width: 100px;
        font-size: 12px;
    }
    .bar-fill {
        font-size: 11px;
    }
    .stats-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .bar-label {
        width: 80px;
        font-size: 11px;
    }
    .bar-track {
        height: 24px;
    }
    .bar-fill {
        font-size: 10px;
        padding-right: 6px;
    }
    .stats-title {
        font-size: 20px;
    }
}

/* 애니메이션 */
.workout-card {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 필터 적용 시 부드러운 전환 */
.workout-year {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.workout-year.hidden {
    opacity: 0;
    transform: translateY(-10px);
} 