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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

h1 {
    font-size: 3em;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    color: #666;
}

/* Loading and error states */
.loading,
.error {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.5em;
    color: #666;
}

.error {
    color: #f5576c;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.search-container {
    margin-bottom: 30px;
}

#searchInput {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1em;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    text-align: center;
}

.vote-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.vote-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(245, 87, 108, 0.4);
}

.action-btn:active {
    transform: translateY(-1px);
}

/* Removed layout toggle styles - now always in row layout */

.people-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 20px;
}

.person-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
}

.row-layout .person-card {
    display: flex;
    align-items: center;
    gap: 25px;
}

.person-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.person-image.clickable {
    cursor: pointer;
}

.person-image.clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.person-info {
    text-align: left;
    flex: 1;
}

.person-name {
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.person-occupation {
    font-size: 0.9em;
    color: #667eea;
    font-weight: 500;
    margin-bottom: 15px;
    text-transform: capitalize;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    background: white;
    border-radius: 10px;
    margin-top: 10px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-number.chopped {
    color: #f5576c;
}

.stat-number.not-chopped {
    color: #51cf66;
}

.stat-label {
    display: block;
    font-size: 0.8em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.percentage-display {
    margin-top: 10px;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

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

.percentage-bar {
    height: 100%;
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 4px;
}

.percentage-fill {
    height: 100%;
    transition: width 0.3s ease, background 0.3s ease;
}

.percentage-fill.green {
    background: #51cf66;
}

.percentage-fill.yellow {
    background: #ffd43b;
}

.percentage-fill.red {
    background: #ff6b6b;
}

.no-votes {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 10px;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.2em;
}

.load-more-btn {
    display: block;
    margin: 30px auto;
    padding: 15px 40px;
    font-size: 1.1em;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.load-more-btn:active {
    transform: translateY(-1px);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    display: flex;
    gap: 30px;
    padding: 40px;
}

.modal-image {
    width: 300px;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    flex-shrink: 0;
}

.modal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-info h2 {
    font-size: 2em;
    color: #333;
    margin-bottom: 5px;
}

.modal-occupation {
    font-size: 1.1em;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: capitalize;
}

.modal-stats {
    margin-bottom: 30px;
}

.percentage-bar-container {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    margin: 15px 0;
    overflow: hidden;
}

.percentage-bar {
    height: 100%;
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 6px;
}

.percentage-bar.green {
    background: #51cf66;
}

.percentage-bar.yellow {
    background: #ffd43b;
}

.percentage-bar.red {
    background: #ff6b6b;
}

.modal-stats .percentage-display {
    font-size: 2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.modal-vote-counts {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 15px;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.modal-vote-btn {
    flex: 1;
    padding: 18px 30px;
    font-size: 1.2em;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-vote-btn.chopped-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.modal-vote-btn.chopped-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(245, 87, 108, 0.4);
}

.modal-vote-btn.not-chopped-btn {
    background: linear-gradient(135deg, #a8edea 0%, #51cf66 100%);
    color: white;
}

.modal-vote-btn.not-chopped-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(81, 207, 102, 0.4);
}

.modal-vote-btn:active {
    transform: translateY(-1px);
}

.modal-feedback {
    text-align: center;
    margin-top: 15px;
    font-size: 1.1em;
    font-weight: 600;
    min-height: 30px;
}

.modal-feedback.success {
    color: #51cf66;
}

.modal-feedback.error {
    color: #f5576c;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .controls {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }

    .person-card {
        flex-direction: column;
    }

    .person-image {
        width: 100%;
        height: 200px;
    }

    .person-info {
        text-align: center;
    }

    .modal-body {
        flex-direction: column;
        padding: 30px 20px;
    }

    .modal-image {
        width: 100%;
        height: 300px;
    }

    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }

    .modal-buttons {
        flex-direction: column;
    }
}
