/* =========================================
   CHALLENGE SİSTEMİ CSS
   ========================================= */

/* Sayfa Layout - Kayma düzeltmesi */
.challenge-sayfa-row {
    overflow-x: hidden;
    margin-left: 0;
    margin-right: 0;
}

.challenge-icerik-kolon,
.challenge-sidebar-kolon {
    padding-left: 12px;
    padding-right: 12px;
}

/* Ana Sayfa Header */
.challenge-header-card {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 25px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
}

.challenge-header-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 250px;
    height: 250px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.challenge-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.challenge-header-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.challenge-header-text h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #fff;
}

.challenge-header-text p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    color: rgba(255,255,255,0.9);
}

/* Challenge Kartı */
.challenge-card {
    background: var(--renkbeyaz, #fff);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #f3f3f3;
}

.challenge-card:hover {
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

.challenge-card-image {
    height: 140px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    position: relative;
    overflow: hidden;
}

.challenge-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.challenge-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
}

.challenge-card-badge.aktif {
    background: #22c55e;
    color: #fff;
}

.challenge-card-badge.yaklasan {
    background: #f59e0b;
    color: #fff;
}

.challenge-card-badge.bitti {
    background: #64748b;
    color: #fff;
}

.challenge-card-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.challenge-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--renkyazi, #1e293b);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.challenge-card-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 12px 0;
    flex: 1;
    line-height: 1.5;
}

.challenge-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.challenge-card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.challenge-card-meta span i {
    font-size: 11px;
    color: #6366f1;
}

.challenge-card-countdown {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 14px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 12px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.countdown-label {
    font-size: 10px;
    color: #92400e;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 45px;
    background: rgba(255,255,255,0.6);
    padding: 8px 6px;
    border-radius: 8px;
}

.countdown-value {
    font-size: 18px;
    font-weight: 700;
    color: #92400e;
    line-height: 1;
}

.countdown-unit {
    font-size: 9px;
    color: #b45309;
    text-transform: uppercase;
    margin-top: 3px;
    font-weight: 500;
}

.countdown-separator {
    font-size: 16px;
    font-weight: 700;
    color: #b45309;
    align-self: center;
    margin-top: -8px;
}

.challenge-card-action {
    margin-top: auto;
}

.btn-challenge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-challenge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
    color: #fff;
}

.btn-challenge.secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-challenge.secondary:hover {
    background: #e2e8f0;
    box-shadow: none;
    transform: none;
}

/* Section Headers */
.challenge-section {
    margin-bottom: 30px;
    background-color: #fff;
    padding: 20px;
    border-radius: 20px;
}

.challenge-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(99, 102, 241, 0.1);
}

.challenge-section-header h2 {
    font-size: 17px;
    font-weight: 600;
    color: var(--renkyazi, #1e293b);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.challenge-section-header h2 i {
    color: #6366f1;
    font-size: 16px;
}

.challenge-section-header a {
    font-size: 13px;
    color: #6366f1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    transition: all 0.2s;
}

.challenge-section-header a:hover {
    color: #4f46e5;
}

/* Empty State */
.challenge-empty {
    text-align: center;
    padding: 40px 20px;
    background: var(--renkbeyaz, #f8fafc);
    border-radius: 12px;
    border: 1px dashed #e2e8f0;
}

.challenge-empty-icon {
    font-size: 40px;
    color: #cbd5e1;
    margin-bottom: 12px;
}

.challenge-empty h3 {
    font-size: 15px;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

/* Lider Tablosu */
.leaderboard-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.leaderboard-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.leaderboard-header i {
    font-size: 24px;
    color: #f59e0b;
}

.leaderboard-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.leaderboard-item:hover {
    background: #f8fafc;
}

.leaderboard-item.top-1 {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.leaderboard-item.top-2 {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.leaderboard-item.top-3 {
    background: linear-gradient(135deg, #fef2e8 0%, #fed7aa 100%);
}

.leaderboard-rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
}

.leaderboard-item.top-1 .leaderboard-rank {
    background: #f59e0b;
    color: #fff;
}

.leaderboard-item.top-2 .leaderboard-rank {
    background: #94a3b8;
    color: #fff;
}

.leaderboard-item.top-3 .leaderboard-rank {
    background: #f97316;
    color: #fff;
}

.leaderboard-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    overflow: hidden;
}

.leaderboard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.leaderboard-stats {
    font-size: 12px;
    color: #64748b;
}

.leaderboard-score {
    font-size: 16px;
    font-weight: 700;
    color: #6366f1;
}


/* Sonuç Ekranı */
.result-container {
    text-align: center;
    padding: 48px;
}

.result-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #fff;
    margin: 0 auto 24px;
}

.result-title {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
}

.result-subtitle {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 32px;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.result-stat {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
}

.result-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
}

.result-stat-label {
    font-size: 13px;
    color: #64748b;
}

.result-rank {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 16px;
    margin-bottom: 32px;
}

.result-rank-number {
    font-size: 36px;
    font-weight: 800;
    color: #92400e;
}

.result-rank-text {
    font-size: 14px;
    color: #b45309;
    text-align: left;
}

/* Sidebar Widget */
.challenge-widget {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 12px;
    padding: 18px;
    color: #fff;
    margin-bottom: 15px;
}

/* Sidebar Card - Challenge Özel */
.challenge-sidebar-kolon .sidebar-card {
    background: var(--renkbeyaz, #fff);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.challenge-sidebar-kolon .sidebar-card-header {

}

.challenge-sidebar-kolon .sidebar-card-header i {
    color: #6366f1;
    font-size: 16px;
}

.challenge-sidebar-kolon .sidebar-card-body {
    padding: 14px 16px;
}

.challenge-widget-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.challenge-widget-header i {
    font-size: 24px;
}

.challenge-widget-header span {
    font-size: 16px;
    font-weight: 700;
}

.challenge-widget-countdown {
    background: rgba(255,255,255,0.15);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 16px;
}

.challenge-widget-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #fff;
    color: #6366f1;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.challenge-widget-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    color: #6366f1;
}

/* =========================================
   CHALLENGE SIDEBAR STİLLERİ
   ========================================= */

/* Sayfa Layout */
.challenge-sayfa-row {
    overflow-x: hidden;
}

.challenge-icerik-kolon {
    /* Ana içerik kolonu */
}

.challenge-sidebar-kolon {
    /* Sidebar kolonu - üst boşluk yok */
    padding-top: 0;
}

.challenge-sidebar-sticky {
    position: sticky;
    top: 80px;
}

/* Sidebar Card */
.challenge-sidebar-kolon .sidebar-card {
    margin-bottom: 16px;
}

/* Mini Leaderboard */
.challenge-leaderboard-mini {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-mini-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.leaderboard-mini-item:hover {
    background: #f1f5f9;
}

.leaderboard-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.leaderboard-rank.top-1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
}

.leaderboard-rank.top-2 {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #fff;
}

.leaderboard-rank.top-3 {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #fff;
}

.leaderboard-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-score {
    font-size: 12px;
    font-weight: 600;
    color: #6366f1;
}

/* Mini İstatistikler */
.challenge-stats-mini {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 8px;
    justify-content: space-between;
    align-items: center;
}

.stat-mini-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 4px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    text-align: center;
    min-width: 0;
}

.stat-mini-item i {
    font-size: 18px;
    color: #6366f1;
    margin-bottom: 6px;
}

.stat-mini-item .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.stat-mini-item .stat-label {
    font-size: 9px;
    color: #64748b;
    text-transform: uppercase;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Kurallar Listesi */
.challenge-rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.challenge-rules-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    font-size: 13px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

.challenge-rules-list li:last-child {
    border-bottom: none;
}

.challenge-rules-list li i {
    color: #22c55e;
    font-size: 12px;
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 1199px) {
    .challenge-stats-mini {
        gap: 8px;
    }

    .stat-mini-item {
        padding: 12px 6px;
    }

    .stat-mini-item .stat-value {
        font-size: 16px;
    }

    .stat-mini-item .stat-label {
        font-size: 9px;
    }
}

@media (max-width: 991px) {
    .challenge-sidebar-sticky {
        position: relative;
        top: auto;
        margin-top: 24px;
    }

    .challenge-stats-mini {
        grid-template-columns: repeat(3, 1fr);
    }

    .challenge-sidebar-kolon {
        order: 2;
    }

    .challenge-icerik-kolon {
        order: 1;
    }
}

@media (max-width: 768px) {
    .challenge-header-card {
        padding: 24px;
    }

    .challenge-header-content {
        flex-direction: column;
        text-align: center;
    }

    .challenge-header-icon {
        width: 64px;
        height: 64px;
        font-size: 28px;
    }

    .challenge-header-text h1 {
        font-size: 22px;
    }

    .result-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .quiz-body {
        padding: 20px;
    }

    .quiz-question {
        font-size: 18px;
    }

    .challenge-stats-mini {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .stat-mini-item {
        padding: 10px 4px;
    }

    .stat-mini-item i {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .stat-mini-item .stat-value {
        font-size: 14px;
    }

    .stat-mini-item .stat-label {
        font-size: 8px;
    }
}

/* Sidebar Cards */
.challenge-sidebar-kolon .sidebar-card {
    margin-bottom: 16px;
}

.challenge-sidebar-kolon .sidebar-card-body {
    padding: 16px;
}
