/* ==============================================
   CG THUMKA VOTING — voting.css
   Theme: Light & Clean
   Colors: #ffffff bg, #f5f5f5 cards, #111 text,
           #ffa800 accent, #acacac secondary
   ============================================== */

#cgthumka-app * { box-sizing: border-box; }

/* PAGE BACKGROUND */
#cgthumka-app {
    background: #f0f0f0;
    min-height: 100vh;
    padding: 10px 0 50px;
}

.cgt-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #111111;
}

/* ---- HEADER ---------------------------------------------- */
.cgt-header {
    text-align: center;
    padding: 36px 24px;
    background: #ffffff;
    border-radius: 16px;
    margin-bottom: 28px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    position: relative;
    overflow: hidden;
}
.cgt-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffa800, #ffcc55, #ffa800);
}
.cgt-header-badge {
    display: inline-block;
    background: #ffa800;
    color: #000;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.cgt-site-title {
    font-size: clamp(24px, 6vw, 42px);
    margin: 0 0 4px;
    color: #111111;
    font-weight: 800;
    letter-spacing: 1px;
}
.cgt-site-subtitle {
    font-size: clamp(12px, 2.5vw, 16px);
    color: #888;
    font-weight: 400;
    margin: 0 0 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
}
.cgt-tagline {
    color: #555;
    font-size: 14px;
    margin-bottom: 0;
}

/* STATS ROW */
.cgt-stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 20px auto 0;
    max-width: 420px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}
.cgt-stat { flex: 1; padding: 14px 10px; text-align: center; }
.cgt-stat-num {
    display: block;
    font-size: 22px; font-weight: 800;
    color: #ffa800; line-height: 1.1;
}
.cgt-stat-label {
    display: block; font-size: 11px;
    color: #888; text-transform: uppercase;
    letter-spacing: 0.8px; margin-top: 3px;
}
.cgt-stat-divider { width: 1px; height: 40px; background: #e0e0e0; flex-shrink: 0; }

/* USER BAR */
.cgt-user-bar {
    background: #fff8e8;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #ffd87a;
    margin-top: 16px;
    font-size: 14px;
    color: #333;
}
.cgt-user-bar p { margin: 3px 0; }
.cgt-logout-btn {
    background: #fff;
    color: #c0392b;
    border: 1px solid #c0392b;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    transition: all 0.2s;
}
.cgt-logout-btn:hover { background: #c0392b; color: #fff; }

/* ---- ABOUT SECTION --------------------------------------- */
.cgt-about { margin-bottom: 28px; }
.cgt-about-inner {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #ffa800;
    border-radius: 12px;
    padding: 22px 26px;
}
.cgt-about-text {
    color: #555;
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
}
.cgt-about-text em { color: #888; font-style: normal; font-size: 13px; }

/* ---- JUDGES SECTION -------------------------------------- */
.cgt-judges-section { margin-bottom: 32px; }
.cgt-section-title {
    font-size: 20px; font-weight: 800;
    color: #111; margin: 0 0 16px;
}
.cgt-judges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.cgt-judge-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.cgt-judge-card:hover {
    border-color: #ffa800;
    box-shadow: 0 4px 20px rgba(255,168,0,0.15);
    transform: translateY(-3px);
}
.cgt-judge-card.cgt-judge-master {
    border-color: #ffa800;
    border-width: 2px;
    background: linear-gradient(160deg, #fffbf0, #fff);
}
.cgt-judge-badge {
    display: inline-block;
    background: #ffa800;
    color: #000;
    font-size: 10px; font-weight: 800;
    letter-spacing: 1px; text-transform: uppercase;
    padding: 3px 10px; border-radius: 20px;
    margin-bottom: 12px;
}
.cgt-judge-avatar {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: #f5f5f5;
    border: 2px solid #ffa800;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; font-weight: 800;
    color: #ffa800; margin: 0 auto 10px;
}
.cgt-judge-master .cgt-judge-avatar { width: 70px; height: 70px; font-size: 20px; }
.cgt-judge-name { font-size: 16px; font-weight: 800; color: #111; margin-bottom: 2px; }
.cgt-judge-master .cgt-judge-name { color: #c77d00; }
.cgt-judge-title { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.cgt-judge-desc  { font-size: 12px; color: #777; line-height: 1.6; margin: 0; }

/* VOTE SECTION HEADER */
.cgt-vote-section-header { margin-bottom: 18px; }
.cgt-vote-section-sub { font-size: 13px; color: #888; margin: -10px 0 0; }

/* ---- FILTERS --------------------------------------------- */
.cgt-filters {
    display: flex; gap: 10px;
    margin-bottom: 24px; flex-wrap: wrap; justify-content: center;
}
.cgt-filter {
    padding: 9px 22px;
    background: #fff;
    border: 2px solid #ddd;
    color: #555;
    border-radius: 30px;
    cursor: pointer; transition: all 0.2s;
    font-weight: 700; font-size: 14px;
}
.cgt-filter.active, .cgt-filter:hover {
    background: #ffa800;
    color: #000;
    border-color: #ffa800;
    box-shadow: 0 2px 12px rgba(255,168,0,0.35);
    transform: translateY(-1px);
}

/* LOADING */
.cgt-loading { text-align: center; padding: 40px; color: #888; font-size: 16px; }

/* ---- GRID ------------------------------------------------ */
.cgt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
@media (max-width: 600px) { .cgt-grid { grid-template-columns: 1fr 1fr; gap: 12px; } }
@media (max-width: 400px) { .cgt-grid { grid-template-columns: 1fr; } }

/* ---- CANDIDATE CARD -------------------------------------- */
.cgt-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    animation: cgtSlideIn 0.4s ease forwards;
    opacity: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
@keyframes cgtSlideIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cgt-card:hover {
    border-color: #ffa800;
    box-shadow: 0 6px 24px rgba(255,168,0,0.2);
    transform: translateY(-4px);
}
.cgt-card-img {
    width: 100%; height: auto;
    display: block; object-fit: cover;
    border-bottom: 3px solid #ffa800;
}
.cgt-card-body { padding: 16px; }
.cgt-card-name {
    font-size: 19px; font-weight: 800;
    color: #111; margin: 0 0 4px;
}
.cgt-card-location { font-size: 12px; color: #888; margin-bottom: 8px; }
.cgt-card-id {
    background: #fff8e8;
    padding: 5px 10px; border-radius: 5px;
    font-size: 12px; color: #c77d00;
    margin-bottom: 8px; font-weight: 700;
    border-left: 3px solid #ffa800;
}
.cgt-card-type {
    display: inline-block;
    padding: 3px 10px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 11px; color: #555;
    margin-bottom: 10px;
    text-transform: uppercase; font-weight: 700;
    letter-spacing: 0.5px;
}
.cgt-vote-count { font-size: 14px; color: #ffa800; font-weight: 700; margin-bottom: 8px; }
.cgt-vote-bar {
    background: #f0f0f0;
    height: 6px; border-radius: 3px;
    margin-bottom: 12px; overflow: hidden;
}
.cgt-vote-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffa800, #ffcc55);
    transition: width 0.5s ease; border-radius: 3px;
}

/* CARD ACTIONS */
.cgt-card-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.cgt-learn-btn {
    flex: 1 1 40%; padding: 9px 6px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #444; font-weight: 600;
    border-radius: 8px; cursor: pointer;
    transition: all 0.2s; font-size: 12px;
    text-align: center;
}
.cgt-learn-btn:hover { background: #eee; border-color: #bbb; color: #111; }

.cgt-share-card-btn {
    flex: 1 1 40%; padding: 9px 6px;
    background: #fff8e8;
    border: 1px solid #ffa800;
    color: #c77d00; font-weight: 700;
    border-radius: 8px; cursor: pointer;
    transition: all 0.2s; font-size: 12px;
    text-align: center; text-transform: uppercase;
}
.cgt-share-card-btn:hover { background: #ffa800; color: #000; }

.cgt-vote-btn {
    flex: 1 1 100%; padding: 11px;
    background: #ffa800;
    border: none; color: #000;
    font-weight: 800; border-radius: 8px;
    cursor: pointer; transition: all 0.2s;
    font-size: 13px; text-transform: uppercase;
    letter-spacing: 0.5px; margin-top: 2px;
    box-shadow: 0 2px 8px rgba(255,168,0,0.3);
}
.cgt-vote-btn:hover:not(:disabled) {
    background: #ff9500;
    box-shadow: 0 4px 16px rgba(255,168,0,0.5);
    transform: translateY(-1px);
}
.cgt-vote-btn:disabled {
    background: #e0e0e0; color: #999;
    cursor: not-allowed; box-shadow: none;
}

/* Highlighted card */
.cgt-card-highlighted {
    border-color: #ffa800 !important; border-width: 2px !important;
    box-shadow: 0 0 0 3px rgba(255,168,0,0.25), 0 6px 24px rgba(255,168,0,0.2) !important;
    animation: cgtPulseHL 1.8s ease-in-out 3 !important;
}
@keyframes cgtPulseHL {
    0%,100% { box-shadow: 0 0 0 3px rgba(255,168,0,0.25); }
    50%      { box-shadow: 0 0 0 6px rgba(255,168,0,0.5); }
}

/* ---- MODALS ---------------------------------------------- */
.cgt-modal {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99999; align-items: center;
    justify-content: center; padding: 15px;
}
.cgt-modal.active { display: flex; }
.cgt-modal-content {
    background: #ffffff;
    padding: 32px; border-radius: 16px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 16px 60px rgba(0,0,0,0.18);
    max-width: 500px; width: 100%;
    position: relative; max-height: 90vh;
    overflow-y: auto;
    animation: cgtSlideIn 0.3s ease;
}
.cgt-close-btn {
    position: absolute; top: 12px; right: 16px;
    background: none; border: none;
    color: #999; font-size: 26px;
    cursor: pointer; line-height: 1;
    transition: color 0.2s, transform 0.2s;
}
.cgt-close-btn:hover { color: #ffa800; transform: scale(1.2); }
.cgt-modal-title {
    color: #111; margin: 0 0 16px;
    font-size: 20px; font-weight: 800;
}

/* STEP PROGRESS */
.cgt-steps { display: flex; gap: 8px; margin-bottom: 24px; }
.cgt-step  { flex: 1; height: 4px; background: #eee; border-radius: 2px; transition: background 0.3s; }
.cgt-step.active { background: #ffa800; }

/* FORM */
.cgt-form-group { margin-bottom: 16px; }
.cgt-form-group label {
    display: block; margin-bottom: 6px;
    color: #444; font-weight: 600; font-size: 13px;
    text-transform: uppercase; letter-spacing: 0.4px;
}
.cgt-form-group input,
.cgt-form-group select {
    width: 100%; padding: 11px 13px;
    border: 1px solid #ddd; border-radius: 8px;
    background: #fafafa;
    color: #111; font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.cgt-form-group input::placeholder { color: #bbb; }
.cgt-form-group input:focus,
.cgt-form-group select:focus {
    outline: none; border-color: #ffa800;
    box-shadow: 0 0 0 3px rgba(255,168,0,0.15);
    background: #fff;
}
.cgt-form-group select option { background: #fff; color: #111; }
.cgt-form-group small { display: block; margin-top: 5px; color: #999; font-size: 11px; }
.cgt-mobile-confirm {
    background: #fff8e8;
    padding: 11px 13px; border-radius: 8px;
    border: 1px solid #ffd87a; font-size: 14px;
    margin-bottom: 16px; color: #c77d00; font-weight: 600;
}

/* BUTTONS */
.cgt-btn {
    display: block; width: 100%; padding: 12px;
    border: none; border-radius: 8px;
    font-size: 14px; font-weight: 700;
    cursor: pointer; transition: all 0.2s;
    text-transform: uppercase; letter-spacing: 0.8px;
    margin-bottom: 10px;
}
.cgt-btn-primary { background: #ffa800; color: #000; box-shadow: 0 2px 10px rgba(255,168,0,0.3); }
.cgt-btn-primary:hover { background: #ff9500; box-shadow: 0 4px 16px rgba(255,168,0,0.45); transform: translateY(-1px); }
.cgt-btn-secondary { background: #f5f5f5; color: #555; border: 1px solid #ddd; }
.cgt-btn-secondary:hover { background: #eee; color: #111; border-color: #bbb; }
.cgt-btn-share {
    background: #fff8e8; color: #c77d00;
    border: 2px solid #ffa800; width: 100%; padding: 11px;
    border-radius: 8px; cursor: pointer;
    font-size: 13px; font-weight: 700;
    text-transform: uppercase; transition: all 0.2s;
}
.cgt-btn-share:hover { background: #ffa800; color: #000; }

/* OTP INPUTS */
.cgt-otp-row { display: flex; gap: 8px; margin-bottom: 16px; justify-content: center; }
.cgt-otp-digit {
    width: 46px; height: 50px;
    border: 1px solid #ddd !important;
    border-radius: 8px; text-align: center;
    font-size: 22px; font-weight: 700;
    color: #ffa800; background: #fafafa !important;
    padding: 0 !important; transition: border-color 0.2s;
}
.cgt-otp-digit:focus {
    border-color: #ffa800 !important;
    box-shadow: 0 0 0 3px rgba(255,168,0,0.15) !important;
    outline: none;
}
.cgt-timer { text-align: center; color: #888; font-size: 13px; margin-bottom: 12px; }
.cgt-info  { text-align: center; color: #555; font-size: 14px; margin-bottom: 16px; }

/* ALERTS */
.cgt-error, .cgt-success {
    padding: 12px; border-radius: 8px;
    font-size: 13px; text-align: center; margin-bottom: 14px;
}
.cgt-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #b91c1c; }
.cgt-success { background: #f0fdf4; border: 1px solid #86efac; color: #15803d; }

/* DETAILS MODAL */
.cgt-details-header { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.cgt-details-img {
    width: 100px; height: 128px;
    border-radius: 10px; border: 2px solid #ffa800;
    object-fit: cover; flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.cgt-details-name { font-size: 20px; font-weight: 800; color: #111; margin-bottom: 5px; }
.cgt-details-id   { color: #c77d00; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.cgt-details-location { color: #888; font-size: 13px; margin-bottom: 5px; }
.cgt-details-type {
    display: inline-block; padding: 3px 10px;
    border: 1px solid #ddd; border-radius: 20px;
    color: #555; font-size: 11px; font-weight: 700;
    text-transform: uppercase; background: #f5f5f5;
}
.cgt-details-briefing {
    background: #fafafa; border: 1px solid #eee;
    border-left: 3px solid #ffa800;
    padding: 14px; border-radius: 8px;
    line-height: 1.7; color: #555;
    font-size: 13px; margin-bottom: 14px;
}
.cgt-details-votes {
    display: flex; justify-content: space-between; align-items: center;
    background: #fff8e8; padding: 14px; border-radius: 10px;
    border: 1px solid #ffd87a; margin-bottom: 14px;
}
.cgt-details-vote-num  { font-size: 34px; font-weight: 800; color: #ffa800; }
.cgt-details-vote-label { color: #888; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }

/* SHARE MODAL */
.cgt-share-modal-content { max-width: 420px; }
.cgt-share-header {
    display: flex; gap: 14px; align-items: center;
    margin-bottom: 18px; background: #fafafa;
    border: 1px solid #eee; border-radius: 10px; padding: 12px;
}
.cgt-share-thumb {
    width: 54px; height: 66px;
    border-radius: 8px; object-fit: cover;
    border: 2px solid #ffa800; flex-shrink: 0;
}
.cgt-share-name { font-size: 16px; font-weight: 800; color: #111; margin-bottom: 2px; }
.cgt-share-id   { font-size: 12px; color: #c77d00; font-weight: 700; margin-bottom: 2px; }
.cgt-share-loc  { font-size: 12px; color: #888; }

/* QR Section */
.cgt-qr-section {
    text-align: center; background: #fafafa;
    border: 1px solid #eee; border-radius: 12px;
    padding: 20px; margin-bottom: 14px;
}
.cgt-qr-label {
    font-size: 13px; font-weight: 700;
    color: #333; margin: 0 0 12px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.cgt-qr-wrap {
    display: inline-block; background: #fff;
    padding: 10px; border-radius: 10px;
    border: 2px solid #ffa800; margin-bottom: 10px;
    box-shadow: 0 4px 16px rgba(255,168,0,0.15);
}
.cgt-qr-img { display: block; border-radius: 6px; width: 180px; height: 180px; }
.cgt-qr-hint { font-size: 12px; color: #888; margin: 0; line-height: 1.5; }

/* URL copy */
.cgt-share-url-row { display: flex; gap: 8px; margin-bottom: 6px; }
.cgt-share-url-input {
    flex: 1; padding: 10px 12px;
    background: #f5f5f5; border: 1px solid #ddd;
    border-radius: 8px; color: #555;
    font-size: 12px; font-family: monospace;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cgt-copy-btn {
    padding: 10px 14px; background: #ffa800;
    border: none; border-radius: 8px;
    color: #000; font-weight: 800; font-size: 12px;
    cursor: pointer; white-space: nowrap;
    transition: background 0.2s; text-transform: uppercase;
}
.cgt-copy-btn:hover { background: #ff9500; }
.cgt-copy-feedback { font-size: 13px; color: #15803d; text-align: center; margin-bottom: 12px; font-weight: 600; }

/* Share buttons */
.cgt-share-btns { display: flex; gap: 10px; margin-top: 12px; }
.cgt-share-wa {
    flex: 1; padding: 12px; background: #25D366;
    border: none; border-radius: 8px; color: #fff;
    font-weight: 800; font-size: 13px; cursor: pointer;
    text-decoration: none; display: flex; align-items: center;
    justify-content: center; gap: 7px;
    transition: background 0.2s; text-transform: uppercase;
}
.cgt-share-wa:hover { background: #1ebe5d; color: #fff; }
.cgt-share-native {
    flex: 1; padding: 12px; background: #f5f5f5;
    border: 1px solid #ddd; border-radius: 8px;
    color: #444; font-weight: 700; font-size: 13px;
    cursor: pointer; transition: all 0.2s; text-transform: uppercase;
}
.cgt-share-native:hover { border-color: #ffa800; color: #c77d00; background: #fff8e8; }

/* SCROLLBAR */
.cgt-modal-content::-webkit-scrollbar { width: 5px; }
.cgt-modal-content::-webkit-scrollbar-track { background: #f5f5f5; }
.cgt-modal-content::-webkit-scrollbar-thumb { background: #ffa800; border-radius: 3px; }

/* UTILITY */
.hidden { display: none !important; }

@media (max-width: 480px) {
    .cgt-details-header { flex-direction: column; align-items: center; text-align: center; }
    .cgt-details-img    { width: 100%; height: 180px; }
    .cgt-judges-grid    { grid-template-columns: 1fr 1fr; }
    .cgt-about-inner    { padding: 16px; }
    .cgt-stats-row      { max-width: 100%; }
    .cgt-qr-img         { width: 150px; height: 150px; }
    .cgt-modal-content  { padding: 22px 18px; }
}
