:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --text-color: #333;
    --border-radius: 8px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

header h2 {
    color: #7f8c8d;
    font-weight: 400;
    font-size: 1.2rem;
}

.question-container {
    background: var(--card-bg);
    max-width: 95%;
    margin: 0 auto 30px;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.question-container h3 {
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 10px;
    margin-top: 0;
    color: var(--primary-color);
}

.sortable-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    padding: 20px;
    background: #fafafa;
    border: 2px dashed #ddd;
    border-radius: var(--border-radius);
    min-height: 200px;
    justify-content: flex-start;
    cursor: grab;
    overflow-x: auto;
    scrollbar-width: thin;
}

.image-item {
    flex: 0 0 auto;
    width: calc(16.66% - 15px);
    min-width: 150px;
    max-width: 400px;
    background: white;
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 4px;
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
}

.image-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #eee;
    border-radius: 2px;
    pointer-events: none;
}

.image-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.sortable-ghost {
    opacity: 0.4;
    background: var(--accent-color);
}

.rating-container {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.stars {
    display: flex;
    gap: 10px;
}

.stars input {
    display: none;
}

.stars label {
    display: inline-block;
    padding: 8px 15px;
    background: #eee;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.stars input:checked + label {
    background: var(--accent-color);
    color: white;
}

.submit-section {
    text-align: center;
    margin: 50px 0;
}

.submit-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.submit-btn:hover {
    background-color: #2ecc71;
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Results page specific */
.stats-container {
    max-width: 1000px;
    margin: 0 auto;
}

.result-card {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
}

.chart-bar-container {
    background: #eee;
    height: 25px;
    border-radius: 12.5px;
    margin: 10px 0;
    overflow: hidden;
    position: relative;
}

.chart-bar {
    height: 100%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    padding-left: 10px;
    color: white;
    font-size: 0.8rem;
    transition: width 1s ease-out;
}

@media (max-width: 600px) {
    .image-item {
        width: 45%;
    }
    .sortable-container {
        gap: 10px;
    }
}
