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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.screen {
    display: block;
}

.screen.hidden {
    display: none;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

h3 {
    margin: 20px 0 15px 0;
    color: #34495e;
    font-size: 18px;
    font-weight: 500;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

input[type="text"], 
input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
}

.btn-primary, .btn-secondary {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px 0;
}

.btn-primary {
    background-color: #e74c3c;
    color: white;
}

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

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
    transform: translateY(-2px);
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e1e8ed;
    transition: all 0.3s ease;
}

.item:hover {
    border-color: #3498db;
    transform: translateY(-2px);
}

.item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.item label {
    margin: 0;
    cursor: pointer;
}

.salad-item, .drink-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e1e8ed;
    margin-bottom: 10px;
}

.counter {
    display: flex;
    align-items: center;
    gap: 15px;
}

.counter-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background-color: #3498db;
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.counter-btn:hover {
    background-color: #2980b9;
}

.count {
    font-size: 18px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.guest-counter-section {
    text-align: center;
    margin-bottom: 30px;
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e1e8ed;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.guest-counter-section label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
}

.guest-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.guest-counter .counter-btn {
    width: 50px;
    height: 50px;
    font-size: 24px;
    font-weight: bold;
    background-color: #e74c3c;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.guest-counter .counter-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.guest-counter .counter-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.guest-count-number {
    font-size: 36px;
    font-weight: bold;
    color: #e74c3c;
    min-width: 60px;
    text-align: center;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 12px;
    border: 2px solid #e1e8ed;
}

#guest-names-container {
    margin: 20px 0;
}

/* More options section */
.more-options-section {
    margin: 20px 0;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    background: #f8f9fa;
}

.more-options-toggle {
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: color 0.2s ease;
}

.more-options-toggle:hover {
    color: #333;
}

.toggle-arrow {
    transition: transform 0.2s ease;
}

.more-options-toggle.expanded .toggle-arrow {
    transform: rotate(180deg);
}

.more-options-content {
    padding: 0 16px 16px;
    border-top: 1px solid #e1e8ed;
}

.more-options-content.hidden {
    display: none;
}

.option-item {
    margin-bottom: 16px;
    padding-top: 12px;
}

.option-item:last-child {
    margin-bottom: 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.light-eaters-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 12px;
    padding: 16px 0;
}

.light-eaters-counter .counter-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e74c3c;
    background: white;
    color: #e74c3c;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.light-eaters-counter .counter-btn:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231,76,60,0.2);
}

.light-eaters-counter .count-number {
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
    min-width: 40px;
    text-align: center;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #e1e8ed;
}

/* Additional info styles for summary and shopping list */
.additional-info {
    margin-top: 10px;
    padding: 8px 12px;
    background: #f0f8ff;
    border-left: 3px solid #3498db;
    border-radius: 4px;
}

.additional-info p {
    margin: 4px 0;
}

.meat-info-notes {
    margin: 10px 0;
    padding: 8px 12px;
    background: #fff8dc;
    border-left: 3px solid #f39c12;
    border-radius: 4px;
}

.meat-info-notes p {
    margin: 4px 0;
}

.guest-input {
    margin-bottom: 10px;
}

.guest-input input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
}

#shopping-list {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.shopping-category {
    margin-bottom: 20px;
}

.shopping-category h4 {
    color: #e74c3c;
    margin-bottom: 10px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shopping-category ul {
    list-style: none;
    padding-left: 0;
}

.shopping-category li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.shopping-category li:last-child {
    border-bottom: none;
}

.meat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.meat-item:last-child {
    border-bottom: none;
}

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

.meat-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.meat-quantity {
    color: #e74c3c;
    font-weight: bold;
    font-size: 14px;
    margin-top: 2px;
}

.meat-controls {
    display: flex;
    gap: 8px;
}

.meat-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 60px;
}

.meat-btn:hover {
    background-color: #2980b9;
}

.meat-total {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    color: #2c3e50;
    font-size: 18px;
}

.assignment-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid #e1e8ed;
}

.assignment-item h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.assignment-item select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
}

#summary-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.summary-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e8ed;
}

.summary-section:last-child {
    border-bottom: none;
}

.summary-section h4 {
    color: #e74c3c;
    margin-bottom: 10px;
    font-size: 16px;
}

.share-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.share-section p {
    color: #555;
    margin-bottom: 20px;
}

.share-section .btn-primary {
    margin-bottom: 10px;
    background-color: #25D366;
    font-size: 16px;
}

.share-section .btn-primary:hover {
    background-color: #128C7E;
}

.share-section .btn-secondary {
    background-color: #6c757d;
}

.token-display {
    background: white;
    border: 2px dashed #3498db;
    border-radius: 8px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin: 15px 0;
    letter-spacing: 2px;
    word-break: break-all;
}


.info-box {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.info-box p {
    margin: 5px 0;
    color: #1565c0;
    font-size: 14px;
}

.info-box strong {
    color: #0d47a1;
}

#user-list {
    margin-bottom: 20px;
}

.user-option {
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.user-option:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
    transform: translateY(-2px);
}

.user-option.selected {
    border-color: #e74c3c;
    background-color: #ffe6e6;
}

.expense-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid #e1e8ed;
}

.expense-item h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.expense-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.expense-input input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.expense-input span {
    font-weight: bold;
    color: #555;
}

#calculations-result {
    background: #e8f5e8;
    border: 2px solid #27ae60;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.debt-item {
    padding: 10px 0;
    border-bottom: 1px solid #d5e6d5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.debt-item:last-child {
    border-bottom: none;
}

.debt-amount {
    font-weight: bold;
}

.debt-amount.positive {
    color: #27ae60;
}

.debt-amount.negative {
    color: #e74c3c;
}

.assigned-info {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 10px;
    font-style: italic;
}

.guest-assignment-info {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.guest-assignment-info h3 {
    color: #1565c0;
    margin-bottom: 10px;
}

.guest-assignment-info p {
    color: #1976d2;
    margin: 5px 0;
}

.no-assignments {
    background: #fff3e0;
    border: 1px solid #ffb74d;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.no-assignments h3 {
    color: #e65100;
    margin-bottom: 10px;
}

.no-assignments p {
    color: #ef6c00;
    margin: 5px 0;
}

.payment-instruction {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    margin: 5px 0;
    border-radius: 6px;
    padding: 12px 15px;
}

.payment-instruction:last-child {
    border-bottom: none;
}

.payment-text {
    font-weight: 600;
    color: #2c3e50;
}

.payment-amount {
    font-weight: bold;
    color: #e74c3c;
    font-size: 16px;
}

.debt-item.creditor {
    background: #e8f5e8;
    border-left: 4px solid #27ae60;
}

.debt-item.debtor {
    background: #ffeaea;
    border-left: 4px solid #e74c3c;
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    .selection-grid {
        grid-template-columns: 1fr;
    }
    
    .salad-item, .drink-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .counter {
        justify-content: center;
    }
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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