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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    min-height: 100vh;
    padding: 20px;
}

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

header {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 600;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.controls {
    padding: 20px 30px;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
}

#searchInput {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

#searchInput:focus {
    outline: none;
    border-color: #e74c3c;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 30px;
    right: 30px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 4px;
    display: none;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

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

.autocomplete-item:hover {
    background-color: #f8f9fa;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

#searchBtn {
    background: #e74c3c;
    color: white;
}

#searchBtn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

#currentLocationBtn {
    background: #27ae60;
    color: white;
}

#currentLocationBtn:hover {
    background: #219a52;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

#surpriseMeBtn {
    background: #9b59b6;
    color: white;
}

#surpriseMeBtn:hover {
    background: #8e44ad;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
}

.quick-filters {
    padding: 10px 30px 20px;
    background: #f8f9fa;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-bottom: 1px solid #e0e0e0;
}

.filter-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

.filter-btn.active {
    background: #e74c3c;
    border-color: #e74c3c;
    color: white;
}

.main-content {
    display: flex;
    gap: 20px;
    padding: 20px 30px;
}

#map {
    flex: 1;
    height: 600px;
    border-radius: 8px;
}

.places-panel {
    width: 350px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 10px;
}

.panel-header h2 {
    color: #333;
    font-size: 1.5em;
}

.pick-random-btn {
    padding: 8px 16px;
    background: #f39c12;
    color: white;
    font-size: 14px;
}

.pick-random-btn:hover {
    background: #e67e22;
}

.places-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.place-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.place-item.active {
    border: 2px solid #e74c3c;
    background: #fdf2f1;
}

.place-item.winner {
    border: 3px solid #f39c12;
    background: #fef9e7;
    animation: pulse 1s ease-in-out 3;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.place-item h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.1em;
}

.place-item .address {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.place-item .meta {
    margin-bottom: 8px;
    font-size: 0.95em;
}

.place-item .rating {
    color: #f39c12;
    font-weight: 600;
}

.place-item .price {
    color: #27ae60;
    font-weight: 600;
}

.place-item .hours {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.place-item .hours-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.place-item .hours-list {
    font-size: 0.85em;
    color: #666;
}

.place-item .hours-list div {
    margin-bottom: 3px;
}

.place-item .hours-status {
    font-weight: 600;
    margin-top: 5px;
    font-size: 0.9em;
}

.place-item .hours-status.open {
    color: #27ae60;
}

.place-item .hours-status.closed {
    color: #e74c3c;
}

.place-item .walking-distance {
    color: #e74c3c;
    font-weight: 600;
    margin-top: 8px;
    font-size: 0.9em;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-content h2 {
    color: #e74c3c;
    font-size: 2em;
    margin-bottom: 20px;
}

#winnerDetails {
    text-align: left;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

#winnerDetails h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: #333;
}

#winnerDetails p {
    color: #666;
    margin: 5px 0;
}

.modal-content button {
    margin: 10px;
}

#closeModalBtn {
    background: #27ae60;
    color: white;
}

#rerollBtn {
    background: #95a5a6;
    color: white;
}

.info {
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#status {
    color: #666;
    font-size: 14px;
}

.version {
    color: #999;
    font-size: 12px;
}

@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
    }

    .places-panel {
        width: 100%;
        max-height: 400px;
    }
}

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

    .controls {
        flex-direction: column;
    }

    #searchInput {
        width: 100%;
    }

    button {
        width: 100%;
    }

    #map {
        height: 400px;
    }

    .quick-filters {
        justify-content: center;
    }
}
