/* WS Assessment Pro — Competition / Hackathon CSS */

/* ── Competition Card Grid ──────────────────────────────────────── */
.wsac-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 8px 0;
}

.wsac-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.wsac-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.12); }

.wsac-card-banner {
    height: 140px;
    background: linear-gradient(135deg, #1e3a5f 0%, #1a56db 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wsac-card-banner img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.wsac-card-banner-icon { font-size: 48px; z-index: 1; }

.wsac-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.wsac-card-title { font-size: 17px; font-weight: 700; margin: 0 0 8px; line-height: 1.3; }
.wsac-card-meta  { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.wsac-card-desc  { font-size: 13px; color: #6b7280; line-height: 1.6; flex: 1; margin-bottom: 16px; }
.wsac-card-footer{ margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ── Phase / Type Badges ────────────────────────────────────────── */
.wsac-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 99px;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
}
.wsac-badge-live       { background: #dcfce7; color: #166534; }
.wsac-badge-upcoming   { background: #dbeafe; color: #1e40af; }
.wsac-badge-ended      { background: #f3f4f6; color: #6b7280; }
.wsac-badge-hackathon  { background: #f3e8ff; color: #6b21a8; }
.wsac-badge-competition{ background: #fef9c3; color: #854d0e; }
.wsac-badge-quiz_contest{ background: #e0f2fe; color: #075985; }

/* Live pulse animation */
.wsac-badge-live::before { content: '●'; animation: wsac-pulse 1.5s infinite; margin-right: 2px; }
@keyframes wsac-pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ── Competition Detail Page ────────────────────────────────────── */
.wsac-detail-wrap { max-width: 960px; margin: 0 auto; padding: 24px 16px; }

.wsac-hero {
    border-radius: 16px; overflow: hidden; margin-bottom: 28px;
    background: linear-gradient(135deg, #1e3a5f 0%, #1a56db 60%, #3b82f6 100%);
    color: #fff; position: relative;
}
.wsac-hero-inner { padding: 40px 40px 32px; position: relative; z-index: 1; }
.wsac-hero img.banner { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .25; }
.wsac-hero h1  { font-size: 30px; font-weight: 800; margin: 0 0 12px; }
.wsac-hero-meta{ display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; font-size: 14px; opacity: .9; }
.wsac-hero-meta span { display: flex; align-items: center; gap: 5px; }
@media(max-width:600px){ .wsac-hero-inner{padding:24px 20px;} .wsac-hero h1{font-size:22px;} }

.wsac-tabs { display: flex; gap: 0; border-bottom: 2px solid #e5e7eb; margin-bottom: 24px; }
.wsac-tab  { padding: 10px 20px; font-weight: 600; font-size: 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; color: #6b7280; transition: all .15s; background: none; border-top: none; border-left: none; border-right: none; }
.wsac-tab.active { color: #1a56db; border-bottom-color: #1a56db; }
.wsac-tab-panel { display: none; }
.wsac-tab-panel.active { display: block; animation: wsa-fadeIn .2s; }

/* ── Countdown Timer ────────────────────────────────────────────── */
.wsac-countdown {
    display: flex; gap: 12px; margin: 20px 0;
    flex-wrap: wrap;
}
.wsac-countdown-unit {
    background: rgba(255,255,255,.15); backdrop-filter: blur(4px);
    border-radius: 10px; padding: 12px 16px; text-align: center; min-width: 70px;
    border: 1px solid rgba(255,255,255,.2);
}
.wsac-countdown-num   { font-size: 32px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.wsac-countdown-label { font-size: 11px; opacity: .8; text-transform: uppercase; letter-spacing: .5px; margin-top: 4px; }
.wsac-countdown.dark .wsac-countdown-unit { background: #f9fafb; border-color: #e5e7eb; }
.wsac-countdown.dark .wsac-countdown-num  { color: #1a56db; }
.wsac-countdown.dark .wsac-countdown-label{ color: #6b7280; }

/* ── Register Form ──────────────────────────────────────────────── */
.wsac-register-box {
    background: #fff; border-radius: 12px; padding: 28px 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08); margin-bottom: 24px;
}
.wsac-register-box h3 { margin: 0 0 16px; font-size: 18px; font-weight: 700; }
.wsac-register-success {
    text-align: center; padding: 32px 24px;
    background: linear-gradient(135deg,#ecfdf5,#d1fae5);
    border-radius: 12px; border: 1px solid #6ee7b7;
}
.wsac-register-success .icon { font-size: 56px; margin-bottom: 12px; }
.wsac-register-success h3 { color: #065f46; margin: 0 0 8px; }
.wsac-register-success p  { color: #047857; margin: 0 0 16px; font-size: 15px; }

/* ── Competition Leaderboard ────────────────────────────────────── */
.wsac-leaderboard-header {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.wsac-lb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wsac-lb-table th { text-align: left; padding: 12px 14px; border-bottom: 2px solid #e5e7eb; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #9ca3af; }
.wsac-lb-table td { padding: 13px 14px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.wsac-lb-table tr:hover td { background: #f9fafb; }
.wsac-lb-table tr:first-child td { background: #fffbeb; }

.wsac-rank-medal { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.wsac-medal-1 { background: linear-gradient(135deg,#fbbf24,#f59e0b); color: #fff; box-shadow: 0 2px 8px rgba(251,191,36,.4); }
.wsac-medal-2 { background: linear-gradient(135deg,#9ca3af,#6b7280); color: #fff; }
.wsac-medal-3 { background: linear-gradient(135deg,#f97316,#ea580c); color: #fff; }
.wsac-medal-n { background: #f3f4f6; color: #9ca3af; }

.wsac-lb-refresh { font-size: 12px; color: #9ca3af; }
.wsac-lb-live-dot { display: inline-block; width: 8px; height: 8px; background: #22c55e; border-radius: 50%; animation: wsac-pulse 1.5s infinite; margin-right: 4px; }

/* ── Prize Cards ────────────────────────────────────────────────── */
.wsac-prizes { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0; }
.wsac-prize-card {
    flex: 1; min-width: 160px; border-radius: 10px; padding: 20px 16px;
    text-align: center; border: 2px solid transparent;
}
.wsac-prize-1 { background: linear-gradient(135deg,#fffbeb,#fef3c7); border-color: #fbbf24; }
.wsac-prize-2 { background: linear-gradient(135deg,#f9fafb,#f3f4f6); border-color: #9ca3af; }
.wsac-prize-3 { background: linear-gradient(135deg,#fff7ed,#fed7aa); border-color: #f97316; }
.wsac-prize-card .trophy { font-size: 32px; margin-bottom: 8px; }
.wsac-prize-card .label  { font-weight: 700; font-size: 13px; color: #374151; }
.wsac-prize-card .amount { font-size: 22px; font-weight: 800; margin-top: 4px; color: #111827; }

/* ── Stats row ──────────────────────────────────────────────────── */
.wsac-stats { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0; }
.wsac-stat  { flex: 1; min-width: 120px; background: #f9fafb; border-radius: 10px; padding: 16px; text-align: center; }
.wsac-stat-num { font-size: 26px; font-weight: 800; color: #1a56db; }
.wsac-stat-lbl { font-size: 12px; color: #6b7280; margin-top: 4px; text-transform: uppercase; letter-spacing: .4px; }

/* ── Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .wsac-grid { grid-template-columns: 1fr; }
    .wsac-prizes { flex-direction: column; }
    .wsac-countdown-num { font-size: 24px; }
    .wsac-countdown-unit { min-width: 55px; padding: 10px 12px; }
}
