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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

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

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.status-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-icon {
    font-size: 2em;
}

.status-text {
    flex: 1;
}

.status-text strong {
    display: block;
    margin-bottom: 5px;
}

#nfcStatusText {
    color: #666;
}

#nfcStatusText.active {
    color: #4CAF50;
    font-weight: bold;
}

#nfcStatusText.error {
    color: #f44336;
    font-weight: bold;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 15px;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.tab-btn:hover {
    background: rgba(255,255,255,0.3);
}

.tab-btn.active {
    background: white;
    color: #667eea;
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.action-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.action-card h2, .action-card h3 {
    color: #333;
    margin-bottom: 15px;
}

.action-card p {
    color: #666;
    margin-bottom: 20px;
}

.btn {
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-success {
    background: #4CAF50;
    color: white;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-large {
    width: 100%;
    padding: 20px;
    font-size: 1.2em;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.9em;
}

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

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.result-box {
    margin-top: 20px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 10px;
    border-left: 4px solid #4CAF50;
}

#guestInfo {
    margin-top: 10px;
}

.guest-detail {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
}

.guest-detail:last-child {
    border-bottom: none;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.price-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.price-tab-btn {
    background: #e0e0e0;
    border: none;
    padding: 15px;
    border-radius: 10px 10px 0 0;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.price-tab-btn:hover {
    background: #d0d0d0;
}

.price-tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.subcategory-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.subcategory-btn-new {
    background: #ffeb3b;
    border: 3px solid #00bcd4;
    padding: 15px 10px;
    border-radius: 10px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.subcategory-btn-new:hover {
    background: #fdd835;
    transform: scale(1.05);
}

.subcategory-btn-new.active {
    background: #4CAF50;
    color: white;
    border-color: #2E7D32;
}

.items-list-container {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    min-height: 200px;
}

.item-card {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.item-card-name {
    font-size: 1.1em;
    font-weight: bold;
}

.item-card-price {
    color: #667eea;
    font-size: 1.2em;
    font-weight: bold;
    margin-right: 15px;
}

.menu-item {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.menu-item:hover {
    background: #e0e0e0;
    transform: scale(1.05);
}

.menu-item.selected {
    border-color: #4CAF50;
    background: #e8f5e9;
}

.menu-item-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.menu-item-price {
    color: #667eea;
    font-size: 1.1em;
}

#currentBill {
    margin-bottom: 20px;
}

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

.bill-item-name {
    flex: 1;
}

.bill-item-quantity {
    color: #666;
    margin: 0 15px;
}

.bill-item-price {
    font-weight: bold;
    color: #667eea;
}

.bill-item-remove {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    margin-left: 10px;
}

.bill-total {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    font-size: 1.3em;
    font-weight: bold;
    border-top: 2px solid #333;
    margin-top: 10px;
}

.guests-list {
    margin-top: 20px;
}

.guest-card {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guest-card-info h4 {
    margin-bottom: 5px;
}

.guest-card-info p {
    color: #666;
    font-size: 0.9em;
    margin: 0;
}

.guest-card-actions {
    display: flex;
    gap: 10px;
}

.guest-card-actions button {
    padding: 8px 15px;
    font-size: 0.9em;
}

.menu-list {
    margin-top: 20px;
}

.menu-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
    margin-bottom: 10px;
}

.menu-list-item-info h4 {
    margin-bottom: 5px;
}

.menu-list-item-info p {
    color: #666;
    font-size: 0.9em;
    margin: 0;
}

.menu-list-item-price {
    font-size: 1.2em;
    font-weight: bold;
    color: #667eea;
    margin-right: 15px;
}

.menu-list-item button {
    padding: 8px 15px;
    font-size: 0.9em;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-content h2 {
    margin-bottom: 20px;
}

.modal-content p {
    color: #666;
    margin-bottom: 20px;
}

.modal-content input,
.modal-content select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.modal-content input:focus,
.modal-content select:focus {
    outline: none;
    border-color: #667eea;
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-state-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 2em;
    }

    .tabs {
        flex-direction: column;
    }

    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .guest-card {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .menu-list-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .price-tabs {
        grid-template-columns: 1fr;
    }
    
    .subcategory-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}
