* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e5d4a6 0%, #dbc488 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

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;
}

.search-container {
    margin-bottom: 30px;
}

.search-box {
    position: relative;
}

.error-message {
    margin-top: 15px;
    padding: 12px 20px;
    background-color: rgba(255, 255, 255, 0.95);
    color: #e74c3c;
    border-radius: 15px;
    text-align: center;
    font-size: 0.95em;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s, transform 0.3s;
}

.error-message.hidden {
    display: none;
}

.error-message.show {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

#searchInput {
    width: 100%;
    padding: 18px 20px;
    font-size: 1.1em;
    border: none;
    border-radius: 50px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    outline: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

#searchInput:focus {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.autocomplete-list.show {
    display: block;
}

.autocomplete-item {
    padding: 15px 20px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: #f5f5f5;
}

.autocomplete-item:first-child {
    border-radius: 20px 20px 0 0;
}

.autocomplete-item:last-child {
    border-radius: 0 0 20px 20px;
}

.autocomplete-item.single {
    border-radius: 20px;
}

.result {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.5s, transform 0.5s;
}

.result.show {
    opacity: 1;
    transform: scale(1);
}

.result.hidden {
    display: none;
}

.table-card {
    background: white;
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.guest-name {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 30px;
    font-weight: 600;
}

.table-number-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.label {
    font-size: 1.2em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.table-number {
    font-size: 5em;
    font-weight: bold;
    color: #d4af37;
    animation: bounce 0.8s ease-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Responsive */
@media (max-width: 600px) {
    h1 {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }

    #searchInput {
        padding: 15px 18px;
        font-size: 1em;
    }

    .table-card {
        padding: 30px 20px;
    }

    .guest-name {
        font-size: 1.3em;
    }

    .table-number {
        font-size: 4em;
    }

    .autocomplete-item {
        padding: 12px 18px;
    }
}

@media (max-width: 400px) {
    h1 {
        font-size: 1.8em;
    }

    .table-number {
        font-size: 3.5em;
    }
}

/* Scrollbar styling for autocomplete */
.autocomplete-list::-webkit-scrollbar {
    width: 8px;
}

.autocomplete-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.autocomplete-list::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 10px;
}

.autocomplete-list::-webkit-scrollbar-thumb:hover {
    background: #b8941e;
}

/* Confetti animation */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 12px;
    height: 12px;
    opacity: 0;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        opacity: 1;
        transform: translateY(100vh) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) rotate(720deg);
    }
}
