:root {
    --primary: #0D9488;         /* teal-600 */
    --primary-hover: #0F766E;   /* teal-700 */
    --primary-light: #F0FDFA;   /* teal-50 */
    --primary-glow: rgba(13, 148, 136, 0.25);
    --secondary: #6366F1;       /* indigo accent */
    --bg-color: #F8FFFE;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --white: #FFFFFF;
    --border-color: #E2E8F0;
    --input-bg: #F1F5F9;
    --success: #10B981;
    --shadow-soft: 0 10px 40px rgba(13, 148, 136, 0.08);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding: 2rem 1rem;
}

/* ─── Background Blobs ─────────────────────────── */
.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.55;
    pointer-events: none;
}
.blob-1 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, #5EEAD4, #0D9488);
    top: -120px;
    left: -100px;
}
.blob-2 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, #818CF8, #6366F1);
    bottom: 60px;
    right: -60px;
}
.blob-3 {
    width: 220px;
    height: 220px;
    background: #CCFBF1;
    top: 50%;
    left: 25%;
    opacity: 0.45;
}

/* ─── Container ────────────────────────────────── */
.app-container {
    background: var(--white);
    width: 100%;
    max-width: 920px;
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
    padding: 3rem;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(13, 148, 136, 0.1);
}

/* ─── Stepper Header ──────────────────────────── */
.stepper-header {
    text-align: center;
    margin-bottom: 3rem;
}
.main-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--text-main);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}
.step-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--border-color);
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.step-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s ease;
}
.step.active .step-circle,
.step.completed .step-circle {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 16px var(--primary-glow);
    transform: scale(1.08);
}
.step.active .step-label,
.step.completed .step-label {
    color: var(--primary);
}
.step-line {
    flex-grow: 1;
    height: 2px;
    background-color: var(--border-color);
    margin: 0 15px;
    margin-bottom: 28px;
    border-radius: 2px;
    transition: all 0.4s ease;
}
.step-line.completed {
    background-color: var(--primary);
}

/* ─── Form Steps ─────────────────────────────── */
.form-step {
    display: none;
    animation: fadeIn 0.4s ease-out;
}
.form-step.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.step-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

/* ─── Step 1 — Lomba Info Row (Plain) ─────────── */
.lomba-info-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
}
.lomba-info-item {
    flex: 1;
    padding: 0 1rem;
}
.lomba-info-item p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}
.lomba-sub {
    font-size: 0.82rem !important;
    color: var(--text-muted) !important;
}
.lomba-divider {
    width: 1px;
    background: var(--border-color);
    margin: 0 0.5rem;
    flex-shrink: 0;
}
.lomba-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.25rem 0.8rem;
    border-radius: 50px;
    margin-bottom: 0.6rem;
    letter-spacing: 0.02em;
}
.lomba-badge.opini  { background: var(--primary-light); color: var(--primary); border: 1px solid #CCFBF1; }
.lomba-badge.cerpen { background: #EEF2FF; color: #6366F1; border: 1px solid #C7D2FE; }

/* ─── Step 1 — Rules Layout (big left + stack right) ── */
.rules-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
    margin-top: 0;
    align-items: start;
}
.rules-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.rule-box-main {
    height: 100%;
}
.rule-box-sm {
    padding: 1.1rem 1.2rem;
}
.rule-box-sm .title-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.rule-box-sm h4 {
    font-size: 0.92rem;
    margin-bottom: 0.5rem;
}
.rule-box-sm ul {
    font-size: 0.83rem;
}

.rule-box {
    background: #FAFCFC;
    border: 1px solid var(--border-color);
    padding: 1.4rem;
    border-radius: 18px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.rule-box:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px var(--primary-glow);
}
.title-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
    display: block;
}
.rule-box h4 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}
.rule-box ul,
.rule-box ol {
    padding-left: 1.2rem;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-muted);
}
.rule-box li {
    margin-bottom: 0.4rem;
}

/* ─── Step 2 — Form Inputs ──────────────────────── */
.flex-row {
    display: flex;
    gap: 3rem;
}
.col-half {
    flex: 1;
    min-width: 0;
}
.form-group {
    margin-bottom: 1.4rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
}
input[type="text"],
input[type="checkbox"],
select,
textarea {
    width: 100%;
    background-color: var(--input-bg);
    border: 1.5px solid transparent;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    font-size: 0.93rem;
    color: var(--text-main);
    transition: all 0.2s ease;
    font-family: inherit;
}
input[type="checkbox"] {
    width: auto;
    padding: 0;
    accent-color: var(--primary);
    cursor: pointer;
}
textarea {
    resize: vertical;
    min-height: 100px;
}
input[type="text"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* ─── Upload Area ───────────────────────────────── */
.upload-area {
    border: 2px dashed #CBD5E1;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    background-color: #F8FAFC;
    cursor: pointer;
    transition: all 0.25s ease;
}
.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background-color: var(--primary-light);
    box-shadow: 0 0 0 4px var(--primary-light);
}
.upload-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
    display: block;
}
.upload-area span {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}
.upload-area small {
    color: var(--text-muted);
    font-size: 0.82rem;
}
.file-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-light);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(13, 148, 136, 0.2);
    margin-top: 0.5rem;
}
.file-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}
.file-info i {
    color: var(--primary);
    font-size: 1.3rem;
}
.clear-file {
    cursor: pointer;
    color: #EF4444;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}
.clear-file:hover {
    transform: scale(1.3);
}

/* ─── Buttons ──────────────────────────────────── */
.action-buttons {
    display: flex;
    margin-top: 2rem;
}
.action-buttons.right         { justify-content: flex-end; }
.action-buttons.space-between { justify-content: space-between; }
.action-buttons.center        { justify-content: center; }

.btn {
    padding: 0.85rem 2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.01em;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #0F766E);
    color: var(--white);
    box-shadow: 0 4px 18px var(--primary-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--primary-glow);
}
.btn-secondary {
    background-color: var(--input-bg);
    color: var(--text-main);
}
.btn-secondary:hover {
    background-color: #E2E8F0;
    transform: translateY(-1px);
}

/* ─── Step 3 — Success ─────────────────────────── */
.step-success {
    text-align: center;
    padding: 2.5rem 0;
}
.success-icon {
    font-size: 5.5rem;
    color: var(--success);
    margin-bottom: 1.5rem;
    display: block;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
@keyframes popIn {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.step-success h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-main);
}
.step-success p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
    font-size: 1rem;
}
.status-badge {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-light);
    border-radius: 50px;
    font-weight: 700;
    border: 1px solid rgba(13, 148, 136, 0.25);
    font-size: 0.9rem;
    color: var(--text-muted);
}
.badge-waiting {
    color: var(--primary);
}
.mt-4 {
    margin-top: 2rem;
}

/* ─── Countdown ─────────────────────────────────── */
.countdown-container.main-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #F0FDFA, #CCFBF1);
    border-radius: 22px;
    border: 1px dashed rgba(13, 148, 136, 0.35);
    text-align: center;
}

.countdown-label {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.countdown-timer-group {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 78px;
}

.timer-unit span:first-child {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.unit-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 0.5rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
    .flex-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    .app-container {
        padding: 1.75rem 1.25rem;
        border-radius: 20px;
    }
    .stepper-header {
        margin-bottom: 2rem;
    }
    .step-label {
        font-size: 0.72rem;
        text-align: center;
        max-width: 60px;
    }
    .step-line {
        margin: 0 6px;
        margin-bottom: 28px;
    }
    .timer-unit span:first-child {
        font-size: 2.2rem;
    }
    .timer-unit {
        min-width: 60px;
    }
    .countdown-timer-group {
        gap: 0.75rem;
    }
    .countdown-container.main-countdown {
        padding: 1.5rem 1rem;
    }
    .lomba-info-row {
        flex-direction: column;
        gap: 1rem;
    }
    .lomba-divider {
        width: 100%;
        height: 1px;
        margin: 0;
    }
    .lomba-info-item {
        padding: 0;
    }
    .rules-layout {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 480px) {
    .rules-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Public Kwitansi Section ─── */
.public-kwitansi-card {
    background: linear-gradient(to bottom, #ffffff, #fafafa);
    border: 1px solid rgba(13, 148, 136, 0.15);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.public-kwitansi-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.public-kwitansi-header h4 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.public-kwitansi-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.5;
}

.public-kwitansi-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.public-kwitansi-actions .btn {
    padding: 0.7rem 1.4rem;
    font-size: 0.85rem;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: none;
}

.public-kwitansi-actions .btn-copy {
    background: #10B981;
    color: #fff;
}
.public-kwitansi-actions .btn-copy:hover {
    background: #0D9668;
    transform: translateY(-1px);
}

.public-kwitansi-actions .btn-download {
    background: #0EA5E9;
    color: #fff;
}
.public-kwitansi-actions .btn-download:hover {
    background: #0284C7;
    transform: translateY(-1px);
}

.public-kwitansi-actions .btn-print {
    background: var(--primary);
    color: #fff;
}
.public-kwitansi-actions .btn-print:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.public-iframe-wrapper {
    width: 100%;
    overflow-x: auto;
    background: #F1F5F9;
    border-radius: 14px;
    padding: 1.5rem 0.5rem;
    display: flex;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.public-iframe-wrapper iframe {
    width: 212mm;
    height: 150mm;
    border: none;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
    border-radius: 10px;
    display: block;
}

/* Responsive adjust for mobile */
@media (max-width: 768px) {
    .public-kwitansi-card {
        padding: 1.25rem;
        margin: 1.5rem 0;
        border-radius: 16px;
    }
    .public-kwitansi-actions {
        justify-content: center;
        width: 100%;
    }
    .public-kwitansi-actions .btn {
        flex-grow: 1;
        justify-content: center;
    }
    .public-iframe-wrapper {
        padding: 1rem 0.25rem;
    }
}
