:root {
    --primary: #FF8A00;
    --primary-hover: #E07900;
    --primary-light: #FFF0E0;
    --bg-color: #F8F9FA;
    --text-main: #212529;
    --text-muted: #6C757D;
    --white: #FFFFFF;
    --border-color: #E9ECEF;
    --input-bg: #F1F3F5;
    --success: #20C997;
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.05);
}

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

body {
    background-color: var(--primary-light);
    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: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
}
.blob-1 {
    width: 400px;
    height: 400px;
    background: #FFB347;
    top: -100px;
    left: -100px;
}
.blob-2 {
    width: 300px;
    height: 300px;
    background: #FFA07A;
    bottom: 50px;
    right: -50px;
}
.blob-3 {
    width: 200px;
    height: 200px;
    background: #FF8A00;
    top: 50%;
    left: 20%;
    opacity: 0.4;
}

/* Container */
.app-container {
    background: var(--white);
    width: 100%;
    max-width: 900px;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    padding: 3rem;
    position: relative;
    z-index: 10;
}

/* Stepper Header */
.stepper-header {
    text-align: center;
    margin-bottom: 3rem;
}
.main-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-main);
}
.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: 40px;
    height: 40px;
    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.3s ease;
}
.step-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}
.step.active .step-circle, .step.completed .step-circle {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(255, 138, 0, 0.3);
}
.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: 25px; /* Offset to align with circles */
    transition: all 0.3s 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(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

/* Step 1 Cards */
.highlight-card {
    background: linear-gradient(135deg, var(--primary), #FFB347);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
}
.highlight-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}
.highlight-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.rule-box {
    background: #FAFAFA;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 16px;
    transition: transform 0.2s ease;
}
.rule-box:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}
.title-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}
.rule-box h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.rule-box ul, .rule-box ol {
    padding-left: 1.2rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
}
.rule-box li {
    margin-bottom: 0.5rem;
}

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

.word-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #CED4DA;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    background-color: #FAFAFA;
    cursor: pointer;
    transition: all 0.2s ease;
}
.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}
.upload-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}
.upload-area span {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.upload-area small {
    color: var(--text-muted);
}
.file-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--input-bg);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
}
.file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}
.file-info i {
    color: var(--primary);
    font-size: 1.2rem;
}
.clear-file {
    cursor: pointer;
    color: #DC3545;
}

/* 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.8rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 138, 0, 0.3);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}
.btn-secondary {
    background-color: var(--input-bg);
    color: var(--text-main);
}
.btn-secondary:hover {
    background-color: #E2E6EA;
}

/* Step 3 Success */
.step-success {
    text-align: center;
    padding: 2rem 0;
}
.success-icon {
    font-size: 5rem;
    color: var(--success);
    margin-bottom: 1.5rem;
}
.step-success h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}
.step-success p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}
.status-badge {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: #FAFAFA;
    border-radius: 50px;
    font-weight: 600;
    border: 1px solid var(--border-color);
}
.badge-waiting {
    color: var(--primary);
}
.mt-4 {
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .flex-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    .app-container {
        padding: 2rem 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    .stepper-header {
        margin-bottom: 2rem;
    }
    .step-label {
        font-size: 0.75rem;
        text-align: center;
        max-width: 60px;
    }
    .step-line {
        margin: 0 5px;
        margin-bottom: 25px;
    }
}

/* Countdown Styles - New Top Position */
.countdown-container.main-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: #FFF9F2;
    border-radius: 20px;
    border: 1px dashed var(--primary);
    text-align: center;
}

.countdown-label {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 2px;
    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: 80px;
}

.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.7rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 0.5rem;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .timer-unit span:first-child {
        font-size: 2.2rem;
    }
    .timer-unit {
        min-width: 60px;
    }
    .countdown-timer-group {
        gap: 0.8rem;
    }
    .countdown-container.main-countdown {
        padding: 1.5rem 1rem;
    }
}
