:root {
    --primary: #2c3e50;
    --accent: #2980b9;
    --bg: #ecf0f1;
    --card: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Background Image Setup */
    background-image: url('../images/bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    
    /* Dark overlay for contrast */
    background-color: rgba(0,0,0,0.4);
    background-blend-mode: overlay;
    
    color: var(--primary);
    margin: 0;
    
    /* Stack elements vertically */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

/* Logo Styling */
.logo-wrapper {
    text-align: center;
    margin-bottom: 20px;
}

.poll-logo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--accent);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.poll-container {
    background: var(--card);
    width: 100%;
    max-width: 600px;
    padding: 20px; /* Adjusted for mobile space[cite: 1] */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    box-sizing: border-box; /* Prevents overflow[cite: 1] */
}

.step { display: none; }
.step.active { display: block; animation: fadeIn 0.4s ease-in; }

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

input[type="number"] {
    width: 100%;
    padding: 12px;
    margin: 15px 0;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
}

button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

button:hover { background: #1c5980; }
button.exit-btn { background: #e74c3c; margin-top: 20px;}

.error-msg { 
    color: #e74c3c; 
    font-size: 14px; 
    margin-bottom: 10px; 
    min-height: 20px;
    white-space: pre-line; /* Handles line breaks in error messages[cite: 1] */
}

/* Options Grid */
.options-grid {
    display: grid;
    /* Adjusted to 140px to stack better on narrow phones[cite: 1] */
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px; /* Reduced gap for space[cite: 1] */
    margin: 20px 0;
}

.option-card {
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.option-card:hover { border-color: var(--accent); background: #f8f9fa; }
.option-card.selected { border-color: var(--accent); background: #ebf5fb; border-width: 3px; }

.option-card img {
    width: 150px;
    height: 150px;
    max-width: 180px;
    max-height: 180px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Mobile specific image shrinking[cite: 1] */
@media (max-width: 400px) {
    .option-card img {
        width: 100px;
        height: 100px;
    }
}

.option-card p { margin: 0; font-weight: 500; font-size: 14px; }

/* Footer Styling */
.site-footer {
    margin-top: 30px;
    padding: 20px;
    background: transparent;
    color: #ffffff;
    text-align: center;
    width: 100%;
    max-width: 600px;
    font-size: 14px;
}

.site-footer a {
    color: #ffffff;
    text-decoration: underline;
    font-weight: bold;
}

.site-footer a:hover {
    color: var(--accent);
}

/* Progress Bars */
.result-item { margin-bottom: 15px; }
.bar-wrap { background: #eee; border-radius: 6px; overflow: hidden; height: 20px; margin-top: 5px;}
.bar-fill { background: var(--accent); height: 100%; width: 0%; transition: width 1s ease-in-out; }