/* Spin Challenge Styles */

:root {
    --spin-primary: #667eea;
    --spin-secondary: #764ba2;
    --spin-success: #10b981;
    --spin-warning: #f59e0b;
    --spin-danger: #ef4444;
    --spin-light-gray: #f3f4f6;
    --spin-border: #e5e7eb;
}

/* Header Gradient */
.spin-challenge-header {
    background: linear-gradient(135deg, var(--spin-primary) 0%, var(--spin-secondary) 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.2);
}

.spin-challenge-header h1 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.spin-challenge-header h3 {
    font-weight: 600;
    opacity: 0.95;
}

.spin-challenge-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Summary Cards */
.summary-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    border-color: var(--spin-primary);
}

.summary-value {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--spin-primary), var(--spin-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.summary-label {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Monthly Progress Cards */
.month-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.month-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--spin-light-gray);
}

.month-card.status-complete::before {
    background: var(--spin-success);
}

.month-card.status-in-progress::before {
    background: var(--spin-warning);
}

.month-card.status-incomplete::before {
    background: var(--spin-danger);
}

.month-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Status Icons */
.status-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.status-complete .status-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.status-in-progress .status-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.status-incomplete .status-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.month-card:hover .status-icon {
    transform: scale(1.1);
}

/* Progress Bars */
.progress-bar-custom {
    height: 12px;
    border-radius: 6px;
    background: var(--spin-light-gray);
    overflow: hidden;
    margin-top: 0.5rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    transition: width 0.6s ease;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

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

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

.bg-success { background: linear-gradient(90deg, #10b981, #059669); }
.bg-warning { background: linear-gradient(90deg, #f59e0b, #d97706); }
.bg-info { background: linear-gradient(90deg, #3b82f6, #2563eb); }
.bg-secondary { background: linear-gradient(90deg, #6b7280, #4b5563); }

/* Leaderboard Table */
.leaderboard-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.leaderboard-table thead {
    background: linear-gradient(135deg, var(--spin-primary), var(--spin-secondary));
    color: white;
}

.leaderboard-table th {
    font-weight: 600;
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.leaderboard-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--spin-border);
    transition: background-color 0.2s ease;
}

.leaderboard-table tbody tr:hover {
    background-color: #f9fafb;
}

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

/* Rank Badges */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--spin-primary);
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.4);
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #000;
    box-shadow: 0 4px 8px rgba(192, 192, 192, 0.4);
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #e8a87c);
    color: #fff;
    box-shadow: 0 4px 8px rgba(205, 127, 50, 0.4);
}

/* Highlight Current User */
.highlight-row {
    background: linear-gradient(90deg, #fef3c7, #fde68a) !important;
    font-weight: 600;
}

.highlight-row td {
    border-top: 2px solid var(--spin-warning);
    border-bottom: 2px solid var(--spin-warning);
}

.highlight-row td:first-child {
    border-left: 2px solid var(--spin-warning);
}

.highlight-row td:last-child {
    border-right: 2px solid var(--spin-warning);
}

/* Section Headers */
section h2 {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--spin-primary), var(--spin-secondary));
    border-radius: 2px;
}

section h2 i {
    margin-right: 0.5rem;
    color: var(--spin-primary);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .summary-value {
        font-size: 2rem;
    }
    
    .month-card {
        padding: 1rem;
    }
    
    .status-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Tooltips for Month Cards */
.month-card[data-tooltip] {
    position: relative;
}

.month-card[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 0.875rem;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 8px;
}

.month-card[data-tooltip]:hover::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    margin-bottom: 2px;
}

/* Badges */
.badge {
    padding: 0.35rem 0.65rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 6px;
}

.badge.bg-success {
    background: var(--spin-success) !important;
}

.badge.bg-warning {
    background: var(--spin-warning) !important;
}

.badge.bg-primary {
    background: var(--spin-primary) !important;
}