/* Advanced CSS for Restaurant Recommender */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* use the supplied Austin background image */
    background-image: url('./austin3.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    /* fallback color */
    background-color: #0b1220;
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

/* dark overlay to improve contrast/readability */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.45);
    pointer-events: none;
    z-index: 0;
}

/* Landing Page Styles */
.landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* let the body background show through */
    background: transparent;
    z-index: 1000; /* above the overlay */
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                opacity 0.8s ease;
}

.landing-page.slide-out {
    transform: translateX(-100%);
    opacity: 0;
}

.landing-content {
    text-align: center;
    max-width: 600px;
    padding: 40px;
    animation: fadeInUp 1s ease-out;
}

.landing-title {
    font-size: 4rem;
    margin-bottom: 20px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out;
}

.landing-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 50px;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.landing-location {
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.location-cta {
    padding: 20px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--accent-color);
    color: white;
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.location-cta:hover {
    background: #d97706;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 40px rgba(245, 158, 11, 0.5);
}

.location-cta.granted {
    background: #10b981;
    animation: pulse 2s infinite;
}

.location-hint {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-top: 10px;
}

.landing-search {
    animation: fadeInUp 1s ease-out 0.6s both;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
}

#landing-search-input {
    flex: 1;
    min-width: 250px;
    padding: 20px 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

#landing-search-input:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 8px 40px rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

#landing-search-input::placeholder {
    color: var(--text-secondary);
}

.lucky-cta {
    padding: 20px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    white-space: nowrap;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.lucky-cta:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.6);
}

.lucky-cta:active {
    transform: translateY(-1px) scale(0.98);
}

/* Main App - Initially Hidden */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                opacity 0.8s ease;
    /* ensure main app content sits above the overlay */
    position: relative;
    z-index: 1;
}

.container.slide-in {
    opacity: 1;
    transform: translateX(0);
}

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

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.search-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    animation: slideInFromTop 0.8s ease-out;
}

.search-box {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

#search-input {
    flex: 1;
    min-width: 300px;
    padding: 15px 20px;
    border: 2px solid transparent;
    border-radius: 50px;
    font-size: 1.1rem;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2);
}

button {
    padding: 15px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#search-btn {
    background: var(--primary-color);
    color: white;
}

#search-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

/* Example Queries Section */
.example-queries {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.example-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.example-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.example-btn {
    padding: 10px 16px;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    background: white;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.example-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

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

#location-btn {
    background: var(--accent-color);
    color: white;
}

#location-btn:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.filters {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.filter-group select {
    padding: 10px 15px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.tab-btn {
    background: var(--card-bg);
    color: var(--text-secondary);
    margin: 0 5px;
    border-radius: 10px 10px 0 0;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.tab-content {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    animation: fadeIn 0.5s ease-out;
}

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

#map {
    height: 600px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#results-list {
    max-height: 600px;
    overflow-y: auto;
}

.restaurant-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.restaurant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.restaurant-card h3 {
    color: var(--primary-color);
    margin: 0;
    flex: 1;
}

.website-btn {
    display: inline-block;
    padding: 10px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.website-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

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

.restaurant-card p {
    margin-bottom: 5px;
    color: var(--text-secondary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 40px rgba(16, 185, 129, 0.6);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .landing-title {
        font-size: 2.5rem;
    }
    
    .landing-subtitle {
        font-size: 1.1rem;
    }
    
    .landing-content {
        padding: 20px;
    }
    
    .search-box {
        flex-direction: column;
        align-items: stretch;
    }

    #search-input {
        min-width: auto;
    }

    header h1 {
        font-size: 2rem;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        margin: 5px 0;
        border-radius: 10px;
    }
}