/* ==========================================
   Records Modal (기록 조회)
   ========================================== */
.records-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.records-modal-content {
    background: var(--bg-primary);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.records-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary);
}

.records-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.records-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.records-modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.records-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.records-list {
    padding: 0;
}

.record-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-primary);
    gap: 12px;
}

.record-item:last-child {
    border-bottom: none;
}

.record-rank {
    width: 28px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-align: center;
}

.record-rank.top-3 {
    color: var(--accent-primary);
}

.record-name {
    flex: 1;
    font-size: 15px;
    color: var(--text-primary);
}

.record-course-type {
    font-size: 12px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.record-course-type.short {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.record-course-type.medium {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.record-course-type.long {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.record-course-type.ultra {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.record-course-type.custom {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.record-time {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.records-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

.records-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-primary);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: records-spin 0.8s linear infinite;
}

@keyframes records-spin {
    to {
        transform: rotate(360deg);
    }
}

.records-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .records-modal-content {
        max-height: 90vh;
        border-radius: 12px;
    }

    .record-item {
        padding: 12px 16px;
    }

    .records-modal-header {
        padding: 16px;
    }
}
