* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #2c3e50;
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.card {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.qr-section {
    text-align: center;
}

#qr-reader {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px;
    border: 2px dashed #3498db;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

#video {
    width: 100%;
    height: 300px;
    background: #000;
}

#scan-region {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 2px solid #e74c3c;
    border-radius: 10px;
}

.table-info {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background-color: #ecf0f1;
    border-radius: 8px;
    display: none;
}

.table-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #e74c3c;
    margin: 10px 0;
}

.call-waiter-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: none;
    margin: 20px auto;
    box-shadow: 0 4px 6px rgba(231, 76, 60, 0.3);
}

.call-waiter-btn:hover {
    background-color: #c0392b;
    transform: scale(1.05);
}

.call-waiter-btn:active {
    transform: scale(0.98);
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background-color: #2ecc71;
    color: white;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.waiter-section {
    display: none;
}

.waiter-notification {
    background-color: #f39c12;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(243, 156, 18, 0); }
    100% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0); }
}

.notification-list {
    list-style-type: none;
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    background-color: #ecf0f1;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.notification-time {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 5px;
}

.clear-btn {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.clear-btn:hover {
    background-color: #7f8c8d;
}

.mode-toggle {
    text-align: center;
    margin: 20px 0;
}

.toggle-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 10px;
}

.toggle-btn.active {
    background-color: #2980b9;
}

.install-prompt {
    background-color: #3498db;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    display: none;
}

.install-btn {
    background-color: #2c3e50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.qr-generator {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-input-group {
    display: flex;
    margin-bottom: 20px;
    width: 100%;
    max-width: 400px;
}

.qr-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.generate-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.generate-btn:hover {
    background-color: #2980b9;
}

.qr-code-container {
    margin: 20px 0;
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 1px solid #ddd;
}

#qrcode {
    display: inline-block;
    padding: 10px;
    background: white;
}

.download-btn {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.download-btn:hover {
    background-color: #27ae60;
}

.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.table-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.table-card:hover {
    transform: translateY(-5px);
}

.table-card h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.table-qr {
    width: 100%;
    max-width: 150px;
    margin: 0 auto 10px;
}

.camera-controls {
    margin: 10px 0;
}

.camera-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 5px;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 15px;
    }
    
    .tables-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    #video {
        height: 250px;
    }
    
    #scan-region {
        width: 150px;
        height: 150px;
    }
}