/* Stats Page Specific Styles - Works with main site theme system */

/* Breadcrumb Navigation */
.breadcrumb {
    margin: 20px 0;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #e94560;
    text-decoration: underline;
}

.breadcrumb span {
    color: #b8b8b8;
    font-weight: 500;
}

/* Stats Header */
.stats-header {
    text-align: center;
    padding: 40px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    margin: 20px 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #667eea, #e94560, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-header p {
    font-size: 1.2rem;
    color: #b8b8b8;
    max-width: 600px;
    margin: 0 auto;
}

/* Stats Navigation */
.stats-navigation {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.nav-btn.active {
    background: linear-gradient(45deg, #667eea, #e94560);
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Content Sections */
.content-section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.content-section.active {
    display: block;
}

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

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.section-header p {
    font-size: 1.1rem;
    color: #b8b8b8;
}

/* Chart Container */
.chart-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    min-height: 400px;
}

.chart-container canvas {
    max-width: 100%;
    height: auto !important;
    background: transparent !important;
}

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

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: rgba(102, 126, 234, 0.3);
}

.stat-card h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    padding-bottom: 10px;
}

.stat-card.large {
    grid-column: span 2;
}

.stat-card:has(#currentCycle) {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(233, 69, 96, 0.1) 100%);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.stat-card:has(#currentCycle) h3 {
    color: #667eea;
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* Cycles Container */
.cycles-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cycle-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    border-left: 4px solid #667eea;
}

.cycle-item.bull {
    border-left-color: #4ecdc4;
}

.cycle-item.bear {
    border-left-color: #e94560;
}

.cycle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.cycle-name {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffffff;
}

.cycle-duration {
    color: #b8b8b8;
    font-size: 0.9rem;
}

.cycle-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.phase-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.phase-label {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.phase-data {
    color: #ffffff;
    font-size: 0.9rem;
}

/* Timeframe Selector */
.timeframe-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
}

.timeframe-selector label {
    font-weight: 500;
    color: #b8b8b8;
}

.timeframe-selector select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

.timeframe-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Candle Stats Grid */
.candle-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

/* Weekday Statistics Grid */
.weekday-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

/* Cycle Selector */
.cycle-selector {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cycle-selector label {
    color: #667eea;
    font-weight: bold;
    margin-right: 10px;
}

.cycle-selector select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
}

.cycle-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

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

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

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

/* Data Display Styles */
.data-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.data-label {
    color: #b8b8b8;
    font-size: 0.9rem;
}

.data-value {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
}

.data-value.positive {
    color: #4ecdc4;
}

.data-value.negative {
    color: #e94560;
}

.data-value.neutral {
    color: #667eea;
}

/* Chart Explanation Styles */
.chart-explanation {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
}

.chart-explanation h4 {
    color: #667eea;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.chart-explanation p {
    color: #b8b8b8;
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Halvings Section Styles */
.halvings-container {
    margin-bottom: 30px;
}

.halvings-summary {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.halvings-summary h3 {
    color: #ffd700;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.halvings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.halving-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.halving-card:hover {
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.1);
}

.halving-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.halving-header h4 {
    color: #ffd700;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.halving-date {
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
}

.halving-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-item .label {
    color: #b8b8b8;
    font-size: 0.9rem;
}

.detail-item .value {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-header h1 {
        font-size: 2rem;
    }
    
    .stats-header p {
        font-size: 1rem;
    }
    
    .stats-navigation {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .stats-grid,
    .candle-stats-grid,
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .stat-card.large {
        grid-column: span 1;
    }
    
    .chart-container {
        padding: 20px;
        min-height: 300px;
    }
    
    .cycle-details {
        grid-template-columns: 1fr;
    }
    
    .halvings-grid {
        grid-template-columns: 1fr;
    }
    
    .halving-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
