/* Competition pages — professional light theme (matches mock_test) */

.cp-main {
    padding: 40px 0 80px;
    background: #f8fafc;
}

.cp-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.cp-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1.5px solid #e8edf8;
    color: #374151;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: .25s;
}

.cp-tab:hover,
.cp-tab.active {
    background: #0a0f2c;
    border-color: #0a0f2c;
    color: white;
}

.cp-prize-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fef3c7, #fffbeb);
    border: 1px solid #fde68a;
    color: #b45309;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.cp-prize-tag strong {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    color: #d97706;
}

.cp-card-prizes {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    padding: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
}

.cp-card-prize-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    line-height: 1.3;
}

.cp-card-prize-label {
    color: #374151;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-card-prize-range {
    color: #9ca3af;
    font-size: 10px;
    white-space: nowrap;
}

.cp-card-prize-amt {
    color: #d97706;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .cp-card-prize-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .cp-card-prize-range {
        grid-column: 1;
    }

    .cp-card-prize-amt {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: center;
    }
}

.cp-entry-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 8px;
}

.cp-entry-row strong {
    color: #0a0f2c;
    font-weight: 700;
}

.cp-status-upcoming {
    background: #eef2ff;
    color: #4338ca;
}

.cp-status-completed {
    background: #f3f4f6;
    color: #6b7280;
}

/* Detail page */
.cp-detail-hero {
    background: #0a0f2c;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.cp-detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 36px 0 40px;
}

.cp-detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 50% 80% at 5% 50%, rgba(16, 185, 129, 0.2) 0%, transparent 65%),
        radial-gradient(ellipse 35% 60% at 90% 20%, rgba(245, 158, 11, 0.18) 0%, transparent 60%);
}

.cp-detail-hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 800;
    color: #fff;
    margin: 12px 0 8px;
    line-height: 1.25;
}

.cp-detail-hero p {
    color: #94a3b8;
    font-size: 14px;
    max-width: 640px;
    margin-bottom: 20px;
}

.cp-detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.cp-detail-stat strong {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}

.cp-detail-stat span {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cp-detail-stat.gold strong {
    color: #fbbf24;
}

.cp-detail-body {
    padding: 36px 0 80px;
    background: #f8fafc;
}

.cp-panel {
    background: white;
    border: 1.5px solid #e8edf8;
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 20px;
}

.cp-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.cp-panel-head h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #0a0f2c;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.cp-panel-head h3 .line {
    width: 4px;
    height: 20px;
    border-radius: 2px;
    background: linear-gradient(180deg, #10b981, #f59e0b);
}

.cp-panel-link {
    font-size: 13px;
    font-weight: 600;
    color: #4338ca;
    text-decoration: none;
}

.cp-panel-link:hover {
    color: #059669;
}

.cp-prize-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: .2s;
}

.cp-prize-item:hover {
    border-color: #fde68a;
    background: #fffbeb;
}

.cp-prize-medal {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #fef3c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.cp-prize-item:nth-child(1) .cp-prize-medal { background: #fef3c7; }
.cp-prize-item:nth-child(2) .cp-prize-medal { background: #f3f4f6; }
.cp-prize-item:nth-child(3) .cp-prize-medal { background: #ffedd5; }

.cp-prize-info {
    flex: 1;
    min-width: 0;
}

.cp-prize-info strong {
    display: block;
    font-size: 14px;
    color: #0a0f2c;
    font-weight: 600;
}

.cp-prize-info span {
    font-size: 12px;
    color: #9ca3af;
}

.cp-prize-amt {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #d97706;
    flex-shrink: 0;
}

.cp-rules-list {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cp-rules-list li {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.55;
}

.cp-sidebar-card {
    background: white;
    border: 1.5px solid #e8edf8;
    border-radius: 16px;
    padding: 24px;
    position: sticky;
    top: 90px;
}

.cp-sidebar-price {
    text-align: center;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
}

.cp-sidebar-free {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #059669;
}

.cp-sidebar-fee-label {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}

.cp-sidebar-fee {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: #0a0f2c;
}

.cp-info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f8fafc;
}

.cp-info-row:last-child {
    border-bottom: none;
}

.cp-info-row i {
    color: #4338ca;
    margin-top: 2px;
    flex-shrink: 0;
}

.cp-info-row label {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.cp-info-row strong {
    display: block;
    font-size: 14px;
    color: #0a0f2c;
    font-weight: 600;
}

.cp-info-row small {
    display: block;
    font-size: 12px;
    color: #6b7280;
}

.cp-joined-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #059669;
    font-size: 13px;
    font-weight: 600;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.cp-closed-msg {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    padding: 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.btn-cp-join {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: all .25s;
    text-decoration: none;
    background: linear-gradient(135deg, #4338ca, #6366f1);
    color: white;
}

.btn-cp-join:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(67, 56, 202, 0.35);
    color: white;
}

.btn-cp-join.outline {
    background: white;
    border: 1.5px solid #e8edf8;
    color: #374151;
    box-shadow: none;
}

.btn-cp-join.outline:hover {
    border-color: #4338ca;
    color: #4338ca;
    box-shadow: none;
}

.btn-cp-join.green {
    background: linear-gradient(135deg, #059669, #10b981);
}

.btn-cp-join.green:hover {
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    color: white;
}

/* Leaderboard table */
.cp-lb-card {
    background: white;
    border: 1.5px solid #e8edf8;
    border-radius: 16px;
    overflow: hidden;
}

.cp-lb-table {
    width: 100%;
    border-collapse: collapse;
}

.cp-lb-table thead th {
    background: #f8fafc;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1.5px solid #e8edf8;
}

.cp-lb-table tbody td {
    padding: 14px 16px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

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

.cp-lb-table tbody tr:hover td {
    background: #f8fafc;
}

.cp-lb-table tbody tr.cp-lb-me td {
    background: #eef2ff;
}

.cp-lb-rank {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 15px;
    color: #6b7280;
    width: 60px;
}

.cp-lb-rank.r1 { color: #d97706; }
.cp-lb-rank.r2 { color: #6b7280; }
.cp-lb-rank.r3 { color: #b45309; }

.cp-lb-name {
    font-weight: 600;
    color: #0a0f2c;
}

.cp-lb-you {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    background: #4338ca;
    color: white;
    padding: 2px 7px;
    border-radius: 6px;
    margin-left: 6px;
    text-transform: uppercase;
}

.cp-lb-score {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #059669;
}

.cp-lb-prize {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #d97706;
}

.cp-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 16px;
    margin-bottom: 28px;
    padding: 24px;
    background: white;
    border: 1.5px solid #e8edf8;
    border-radius: 16px;
}

.cp-podium-item {
    flex: 1;
    max-width: 160px;
    text-align: center;
    padding: 16px 12px;
    border-radius: 14px;
    border: 1.5px solid #e8edf8;
    background: #f8fafc;
}

.cp-podium-item.first {
    order: 2;
    background: linear-gradient(180deg, #fffbeb, #fff);
    border-color: #fde68a;
    padding-bottom: 24px;
    transform: translateY(-8px);
}

.cp-podium-item.second { order: 1; }
.cp-podium-item.third { order: 3; }

.cp-podium-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4338ca, #6366f1);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}

.cp-podium-item.first .cp-podium-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #d97706, #f59e0b);
}

.cp-podium-name {
    font-size: 13px;
    font-weight: 600;
    color: #0a0f2c;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-podium-score {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #059669;
}

.cp-my-rank {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: linear-gradient(135deg, #eef2ff, #ecfdf5);
    border: 1.5px solid #c7d2fe;
    border-radius: 14px;
    padding: 14px 20px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #4b5563;
}

.cp-my-rank strong {
    color: #0a0f2c;
    font-family: 'Outfit', sans-serif;
}

.cp-lb-select {
    background: white;
    border: 1.5px solid #e8edf8;
    border-radius: 10px;
    color: #374151;
    padding: 10px 14px;
    font-size: 14px;
    min-width: 260px;
}

.cp-empty {
    text-align: center;
    padding: 48px 24px;
    background: white;
    border: 1.5px solid #e8edf8;
    border-radius: 16px;
}

.cp-empty h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    color: #0a0f2c;
    margin: 12px 0 8px;
}

.cp-empty p {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .cp-podium {
        flex-direction: column;
        align-items: center;
    }

    .cp-podium-item,
    .cp-podium-item.first {
        order: unset;
        max-width: 100%;
        width: 100%;
        transform: none;
    }

    .cp-lb-table thead {
        display: none;
    }

    .cp-lb-table tbody tr {
        display: block;
        padding: 12px 16px;
        border-bottom: 1px solid #f1f5f9;
    }

    .cp-lb-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
        border: none;
    }

    .cp-lb-table tbody td::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 600;
        color: #9ca3af;
        text-transform: uppercase;
    }
}

.cp-detail-banner {
    background: #0a0f2c;
    padding: 0;
}

.cp-banner-img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

@media (max-width: 768px) {
    .cp-banner-img {
        max-height: 180px;
    }

    .cp-detail-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
