@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #059669;       
    --primary-hover: #047857; 
    --primary-light: #d1fae5;
    --danger: #ef4444;        
    --danger-light: #fee2e2;
    --dark: #0f172a;          
    --muted: #64748b;         
    --bg-main: #f8fafc;       
    --bg-card: #ffffff;       
    --border: #e2e8f0;        
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background-color: var(--bg-card);
    padding: 30px 0;
    text-align: center;
    border-top: 5px solid var(--primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    position: relative;
    z-index: 10;
}

.main-header h1 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.main-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 5px;
}

.web-link {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    background: var(--primary-light);
    padding: 4px 12px;
    border-radius: 20px;
}

/* Hero & Countdown */
.hero-section {
    padding: 40px 0 90px 0;
    text-align: center;
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: white;
}

.hero-section h3 {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.9);
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.time-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 15px 20px;
    border-radius: 16px;
    min-width: 90px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.time-box span {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
}

.time-box small {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* Form Layout */
.form-section {
    margin-top: -50px;
    padding-bottom: 60px;
    position: relative;
    z-index: 20;
}

.form-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.08);
}

.divider-title {
    text-align: center;
    position: relative;
    margin: 40px 0 25px;
}

.divider-title::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 1px;
    background: var(--border);
    z-index: 1;
}

.divider-title span {
    background: var(--bg-card);
    padding: 0 15px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
}

/* Pertanyaan & Radio Buttons */
.question-group {
    background: var(--bg-main);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.question-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.q-title {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.radio-group {
    display: flex;
    gap: 10px;
}

.radio-btn {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.radio-btn input {
    position: absolute;
    opacity: 0;
}

.radio-btn span {
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    color: var(--muted);
    font-weight: 600;
    transition: all 0.2s ease;
}

.radio-btn input:checked + span {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-hover);
}

.radio-btn.btn-no input:checked + span {
    background: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
}

/* Kotak Alasan Subuh */
.alasan-box {
    margin-top: 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.alasan-box.show {
    max-height: 100px;
    opacity: 1;
}

.alasan-box input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--danger);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    background: #fff;
}

.alasan-box input:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--danger-light);
}

/* ODOJ Bulat */
.odoj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 10px;
}

.odoj-btn {
    position: relative;
    cursor: pointer;
}

.odoj-btn input {
    position: absolute;
    opacity: 0;
}

.odoj-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 45px;
    width: 100%;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.odoj-btn:hover span {
    border-color: #cbd5e1;
}

.odoj-btn input:checked + span {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.3);
}

/* Tombol Update */
.btn-update {
    width: 100%;
    padding: 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 30px;
    transition: 0.3s;
    box-shadow: 0 10px 20px -5px rgba(5, 150, 105, 0.4);
}

.btn-update:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Hasil & Warning */
.result-area {
    display: none;
    margin-top: 40px;
    text-align: center;
    padding: 30px;
    background: var(--primary-light);
    border-radius: 16px;
    border: 2px dashed #a7f3d0;
}

.score-display {
    background: white;
    width: 120px;
    height: 120px;
    margin: 15px auto;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 4px solid var(--primary);
    box-shadow: 0 10px 20px rgba(5, 150, 105, 0.2);
}

.score-display span {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

#feedbackText {
    font-weight: 600;
    color: var(--primary-hover);
    margin-bottom: 15px;
}

.warning-text {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 12px;
    text-align: left;
    font-size: 0.9rem;
    color: #92400e;
    border-radius: 0 8px 8px 0;
    display: none;
}

/* Kotak Peraturan */
.rules-card {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 25px;
    border-radius: 16px;
    margin-top: 30px;
}

.rules-card h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e40af;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.rules-card ul {
    list-style: none;
}

.rules-card li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.6;
}

.rules-card li::before {
    content: "•";
    color: #3b82f6;
    font-weight: bold;
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: -2px;
}

footer {
    text-align: center;
    padding: 20px;
    color: var(--muted);
    font-size: 0.85rem;
}