:root {
    --primary-color: #d4a574;
    --primary-dark: #b8956a;
    --secondary-color: #f5f0eb;
    --text-color: #2c2c2c;
    --text-light: #666;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --border-radius: 16px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #f5f0eb 0%, #e8e0d5 100%);
    min-height: 100vh;
    color: var(--text-color);
    padding: 20px 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-light);
    font-size: 16px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 3px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.3);
}

.product-card.voted {
    opacity: 0.6;
    pointer-events: none;
}

.product-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: #f8f8f8;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
    line-height: 1.4;
    min-height: 44px;
}

.product-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-link {
    display: inline-block;
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    background: var(--secondary-color);
    border-radius: 8px;
    transition: var(--transition);
}

.product-link:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-vote {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 15px;
}

.btn-vote:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(212, 165, 116, 0.4);
}

.btn-vote:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 20px;
}

.btn-primary:hover {
    transform: scale(1.02);
}

.btn-reset {
    padding: 12px 24px;
    background: var(--secondary-color);
    color: var(--text-color);
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 20px;
}

.btn-reset:hover {
    background: #e0d5c8;
}

.thank-you {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.thank-you-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.thank-you h2 {
    font-size: 28px;
    color: var(--text-color);
    margin-bottom: 10px;
}

.thank-you p {
    color: var(--text-light);
    font-size: 16px;
}

.results-section {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.results-section h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--text-color);
}

.result-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 12px;
    background: var(--secondary-color);
    border-radius: 12px;
}

.result-rank {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 40px;
}

.result-info {
    flex: 1;
    margin-left: 15px;
}

.result-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.result-bar-container {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.result-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.result-votes {
    font-size: 14px;
    color: var(--text-light);
}

.winner-badge {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 10px;
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 24px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-image {
        height: 240px;
    }
    
    .thank-you-icon {
        font-size: 48px;
    }
}
