/* Edge AI Track Record Page - Enhanced UI/UX Design */
/* Following UI/UX Guidelines: Ma (space), Wa (harmony), Calm Technology */

/* Hero Section - Simplified and Spacious */
.track-record-hero {
    background: linear-gradient(135deg, #F8F9FA 0%, #FFFFFF 100%);
    position: relative;
    overflow: hidden;
    padding: 3rem 0;
}

.track-record-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

/* Logo Styling */
.hero-logo-wrapper {
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-logo-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

/* Enhanced Filter Bar - Horizontal Layout */
.filter-bar {
    background: #FFFFFF;
    border: 1px solid #DEE2E6;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-bar:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.filter-icon {
    color: #6C757D;
    font-size: 1.125rem;
    transition: color 0.2s ease;
}

.filter-group:hover .filter-icon {
    color: #10B981;
}

.filter-select {
    background: #F8F9FA;
    border: 1px solid #DEE2E6;
    color: #212529;
    border-radius: 8px;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236C757D' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
}

.filter-select:hover {
    border-color: #10B981;
    background-color: #FFFFFF;
}

.filter-select:focus {
    outline: none;
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    background-color: #FFFFFF;
}

/* Segmented Control for Season Type */
.segmented-control {
    display: inline-flex;
    background: #F8F9FA;
    border-radius: 8px;
    padding: 0.25rem;
    gap: 0.25rem;
}

.segment-option {
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6C757D;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.segment-option:hover {
    color: #212529;
}

.segment-option.active {
    background: #FFFFFF;
    color: #10B981;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Filter Actions */
.filter-actions {
    margin-left: auto;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-update {
    background: #10B981;
    color: white;
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-update:hover {
    background: #0B956C;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.2);
}

.btn-export {
    background: transparent;
    color: #6C757D;
    border: 1px solid #DEE2E6;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-export:hover {
    color: #10B981;
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.05);
}

/* Performance Metrics - Enhanced Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.metric-card {
    background: #FFFFFF;
    border: 1px solid #DEE2E6;
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10B981 0%, #0B956C 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.metric-card:hover::before {
    opacity: 1;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.metric-title {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.metric-icon {
    width: 40px;
    height: 40px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10B981;
    font-size: 1.25rem;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #212529;
    line-height: 1;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.metric-value:hover {
    transform: scale(1.05);
}

.metric-label {
    font-size: 0.875rem;
    color: #6C757D;
    font-weight: 500;
}

.metric-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.trend-positive {
    color: #10B981;
    background: rgba(16, 185, 129, 0.1);
}

.trend-negative {
    color: #DC3545;
    background: rgba(220, 53, 69, 0.1);
}

/* Progress Bars - Smooth and Modern */
.metric-progress {
    margin-top: 1.5rem;
}

.progress {
    height: 8px;
    background: #F8F9FA;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    background: linear-gradient(90deg, #10B981 0%, #0B956C 100%);
    height: 100%;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Game Results Section */
.results-section {
    background: #FFFFFF;
    border: 1px solid #DEE2E6;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #DEE2E6;
}

.results-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.results-count {
    font-size: 0.875rem;
    color: #6C757D;
    font-weight: 500;
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #F8F9FA 25%, #E9ECEF 50%, #F8F9FA 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    height: 200px;
    margin-bottom: 1rem;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .track-record-hero {
        padding: 2rem 0;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .filter-actions {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
        flex-direction: column;
    }
    
    .btn-update,
    .btn-export {
        width: 100%;
        justify-content: center;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .metric-value {
        font-size: 2rem;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .track-record-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

[data-theme="dark"] .filter-bar,
[data-theme="dark"] .metric-card,
[data-theme="dark"] .results-section {
    background: #2d2d2d;
    border-color: #404040;
}

[data-theme="dark"] .filter-select,
[data-theme="dark"] .segmented-control {
    background: #1a1a1a;
    border-color: #404040;
    color: #e0e0e0;
}

[data-theme="dark"] .metric-title,
[data-theme="dark"] .metric-value,
[data-theme="dark"] .results-title {
    color: #e0e0e0;
}

[data-theme="dark"] .metric-label,
[data-theme="dark"] .filter-icon,
[data-theme="dark"] .results-count {
    color: #999;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

/* Micro-interactions */
.interactive-element {
    cursor: pointer;
    transition: all 0.2s ease;
}

.interactive-element:active {
    transform: scale(0.98);
}

/* Tooltips */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.tooltip-content {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #212529;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-bottom: 0.5rem;
}

.tooltip-wrapper:hover .tooltip-content {
    opacity: 1;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #212529 transparent transparent transparent;
}