/* ==================== VARIABLES & RESET ==================== */
:root {
    /* Tema Light Mode Bersih */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    
    --border-light: #e2e8f0;
    --border-strong: #cbd5e1;
    --hover-bg: #f1f5f9;
    
    --color-danger: #ef4444;
    --color-danger-bg: #fee2e2;
    --color-success: #10b981;
    --color-success-bg: #d1fae5;
    
    /* System Font Stack (No Online CSS) */
    --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.2s ease-in-out;
    --container-max: 800px; /* Lebar lebih kecil untuk fokus ke konten polling */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-body);
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#app {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 80px; /* Offset for fixed header */
}

/* ==================== TYPOGRAPHY & LAYOUT ==================== */
h1, h2, h3, h4, .font-heading {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.section-padding {
    padding: 40px 0;
}

/* ==================== ANIMATIONS ==================== */
.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
    width: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50vh;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
    100% { transform: rotate(360deg); }
}

/* ==================== HEADER & NAVIGATION ==================== */
#site-header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-color);
}

/* ==================== BUTTONS & FORMS ==================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-color);
    color: #ffffff;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

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

.btn-google {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    justify-content: center;
}

.btn-google:hover {
    background: var(--hover-bg);
}

input, select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--bg-card);
    color: var(--text-main);
    transition: var(--transition);
    outline: none;
}

input:focus, select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input[readonly] {
    background: var(--hover-bg);
    cursor: not-allowed;
    color: var(--text-muted);
}

/* ==================== CARDS & POLLING UI ==================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.poll-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-card);
    position: relative;
    overflow: hidden;
}

.poll-option:hover {
    border-color: var(--accent-color);
    background: var(--hover-bg);
}

.poll-option.selected {
    border-color: var(--accent-color);
    background: rgba(37, 99, 235, 0.05);
}

.poll-result-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(37, 99, 235, 0.1);
    z-index: 0;
    transition: width 0.5s ease-out;
}

.poll-option-text, .poll-percentage {
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* ==================== UTILITIES ==================== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.w-full { width: 100%; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* ==================== FOOTER ==================== */
#site-footer {
    padding: 24px 0;
    text-align: center;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
    color: var(--text-muted);
    font-size: 0.9rem;
}
