* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', Arial, sans-serif;
}

body {
    /* Initial gradient background for webpage */
    background: linear-gradient(135deg, #f8f9fa, #dfe3e6);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px 0;
    transition: background 0.5s ease;
}

/* Gradient backgrounds for each theme */
body.bg-ceviche {
    background: linear-gradient(135deg, #b8e8f5, #4ec5e6);
}

body.bg-5vines {
    background: linear-gradient(135deg, #fefae0, #7b8b58);
}

body.bg-crispys {
    background: linear-gradient(135deg, #fefae0, #d48e4e);
}

/* Phone frame container */
.phone-frame-container {
    position: relative;
    width: 380px; /* Slightly wider than app to accommodate frame */
    height: 780px; /* Taller to fit phone frame */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Phone frame image */
.phone-frame {
    position: absolute;
    top: -10px;
    left: -205px;
    width: 790px;
    height: 800px;
    pointer-events: none;
    z-index: 2000;
}

.app-container {
    width: 340px; /* Narrower, more phone-like */
    height: 740px; /* Taller, more phone-like */
    background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 30px -8px rgba(0,0,0,0.2);
    position: relative;
    z-index: 10;
}

/* Theme Colors for Each Restaurant */
.theme-ceviche {
    --primary: #AAC7E0;
    --secondary: #c4dcf0;
    --accent: #b8e8f5;
    --background: #e0f7fc;
    --text: #333333;
    --header-bg: linear-gradient(135deg, #4ec5e6 0%, #4da3d4 100%);
    --content-bg: linear-gradient(180deg, #eef9fd 0%, #daf5fa 100%);
    --nav-bg: linear-gradient(180deg, #4ec5e6 0%, #c4dcf0 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: #4ec5e6;
}

/* 5 Vines - Wine bar with elegant styling */
.theme-5vines {
    --primary: #7b8b58;
    --secondary: #5d7038;
    --accent: #fefae0;
    --background: #e5cb9e;
    --text: #333333;
    --header-bg: linear-gradient(135deg, #7b8b58 0%, #5d7038 100%);
    --content-bg: linear-gradient(180deg, #fefae0 0%, #e5cb9e 100%);
    --nav-bg: linear-gradient(180deg, #5d7038 0%, #7b8b58 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: #7b8b58;
}

/* Crispys - Bold and playful styling */
.theme-crispys {
    --primary: #d48e4e;
    --secondary: #e5b783;
    --accent: #fefae0;
    --background: #8b9c68;
    --text: #333333;
    --header-bg: linear-gradient(135deg, #d48e4e 0%, #b6723f 100%);
    --content-bg: linear-gradient(180deg, #fefae0 0%, #e5b783 100%);
    --nav-bg: linear-gradient(180deg, #b6723f 0%, #d48e4e 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: #d48e4e;
}

/* Intro Animation - Simplified */
.intro-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: 24px;
    animation: fadeOut 2s ease-out forwards;
    animation-delay: 1.5s;
}

.intro-logo {
    width: 160px;
    animation: introLogoAnimation 1.5s ease-out;
}

/* Header and Animation Keyframes - Simplified */
@keyframes introLogoAnimation {
    0% { 
        transform: scale(0.9); 
        opacity: 0;
    }
    100% { 
        transform: scale(1); 
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Header Styles */
.app-header {
    background: var(--header-bg, linear-gradient(135deg, #5a5a5a 0%, #3d3d3d 100%));
    padding: 16px;
    text-align: center;
    border-radius: 24px 24px 0 0;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    color: white;
    transition: all 0.3s ease;
}

/* 5 Vines specific header */
.theme-5vines .app-header {
    background: var(--header-bg);
    border-bottom: 2px solid #fefae0;
}

/* Crispys specific header */
.theme-crispys .app-header {
    background: var(--header-bg);
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    padding-bottom: 25px;
}

.header-logo {
    width: 100px;
    margin: 8px auto;
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

/* Restaurant Grid - Adjusted for taller height */
.restaurant-grid {
    padding: 15px;
    height: calc(740px - 120px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    overflow-y: auto;
    background: var(--content-bg, linear-gradient(180deg, #bcced7 0%, #a3b8c2 100%));
    transition: background 0.3s ease;
}

.restaurant-card {
    position: relative;
    width: 200px; /* Slightly smaller to fit narrower phone */
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s ease;
    background: var(--card-bg);
    opacity: 0;
    transform: translateY(20px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    margin: 12px 0;
    border-left: 3px solid var(--card-border);
}

/* 5 Vines specific card */
.theme-5vines .restaurant-card,
.theme-5vines .menu-item,
.theme-5vines .info-card,
.theme-5vines .restaurant-hero {
    border-radius: 8px;
    border-left: none;
    border-bottom: 3px solid var(--card-border);
}

/* Crispys specific card */
.theme-crispys .restaurant-card,
.theme-crispys .menu-item,
.theme-crispys .info-card,
.theme-crispys .restaurant-hero {
    border-radius: 20px;
    border-left: none;
    border-top: 3px solid var(--card-border);
}

.restaurant-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.6) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.restaurant-card:hover::before {
    opacity: 1;
}

.restaurant-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.restaurant-card:hover .restaurant-logo {
    transform: scale(1.05);
}

.restaurant-name-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px;
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.restaurant-card:hover .restaurant-name-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation Bar */
.nav-bar {
    background: var(--nav-bg, linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%));
    padding: 12px;
    display: flex;
    justify-content: space-around;
    border-radius: 0 0 24px 24px;
    position: absolute;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    transition: background 0.3s ease;
}

/* 5 Vines specific navbar */
.theme-5vines .nav-bar {
    border-top: 2px solid #fefae0;
}

/* Crispys specific navbar */
.theme-crispys .nav-bar {
    clip-path: polygon(0 20%, 100% 0, 100% 100%, 0 100%);
    padding-top: 25px;
}

.nav-icon {
    font-size: 24px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
    border: none;
    position: relative;
    padding: 8px 12px;
    border-radius: 10px;
}

.theme-5vines .nav-icon {
    border-radius: 5px;
}

.theme-crispys .nav-icon {
    border-radius: 15px;
}

.nav-icon:hover {
    color: var(--accent);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.nav-icon.active {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

/* Restaurant Content - Adjusted for taller height */
.restaurant-content {
    padding: 15px;
    height: calc(740px - 130px);
    overflow-y: auto;
    background: var(--content-bg);
    transition: background 0.3s ease;
}

/* Menu Items */
.menu-item {
    background: var(--card-bg);
    padding: 18px;
    margin: 15px 0;
    border-radius: 16px;
    transition: all 0.3s ease;
    opacity: 0;
    animation: slideIn 0.4s ease forwards;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 15px;
    align-items: center;
    border-left: 3px solid var(--card-border);
}

/* 5 Vines menu styling */
.theme-5vines .menu-item {
    background: #fdfcf5;
    padding: 15px;
}

/* Crispys menu styling */
.theme-crispys .menu-item {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 20px;
}

.theme-crispys .menu-item-content {
    text-align: center;
}

.menu-item-image {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Crispys menu image */
.theme-crispys .menu-item-image {
    width: 130px;
    height: 130px;
    border-radius: 15px;
    margin: 0 auto 10px auto;
}

.menu-item:hover .menu-item-image {
    transform: scale(1.03);
}

.menu-item-content h3 {
    color: var(--primary);
    margin-bottom: 6px;
}

.menu-item-content .price {
    color: var(--secondary);
    font-weight: 600;
    margin-top: 6px;
}

/* Restaurant Hero */
.restaurant-hero {
    position: relative;
    height: 180px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

/* 5 Vines hero */
.theme-5vines .restaurant-hero {
    height: 180px;
}

/* Crispys hero */
.theme-crispys .restaurant-hero {
    height: 200px;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 15px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
    color: white;
}

/* 5 Vines hero overlay */
.theme-5vines .hero-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(93,112,56,0.85) 100%);
}

/* Crispys hero overlay */
.theme-crispys .hero-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(182,114,63,0.85) 100%);
    text-align: center;
}

.hero-title {
    font-size: 1.8rem;
    margin-bottom: 6px;
    font-weight: 600;
}

/* 5 Vines title */
.theme-5vines .hero-title {
    font-family: Georgia, serif;
    font-style: italic;
}

/* Crispys title */
.theme-crispys .hero-title {
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 2rem;
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* Info Cards */
.info-card {
    background: var(--card-bg);
    padding: 18px;
    margin-bottom: 18px;
    border-radius: 16px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    transform: translateY(10px);
    opacity: 0;
    animation: slideUp 0.4s ease forwards;
    border-left: 3px solid var(--card-border);
    transition: all 0.3s ease;
}

/* 5 Vines info card */
.theme-5vines .info-card h3 {
    font-family: Georgia, serif;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

/* Crispys info card */
.theme-crispys .info-card h3 {
    font-family: 'Trebuchet MS', sans-serif;
    text-align: center;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.info-card h3 {
    color: var(--primary);
    margin-bottom: 12px;
}

/* Food Gallery */
.food-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

/* Crispys gallery */
.theme-crispys .food-gallery {
    grid-template-columns: 1fr;
    gap: 15px;
}

.gallery-image {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    transition: all 0.3s ease;
}

/* 5 Vines gallery images */
.theme-5vines .gallery-image {
    border-radius: 8px;
}

/* Crispys gallery images */
.theme-crispys .gallery-image {
    height: 180px;
    border-radius: 15px;
}

.gallery-image:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 15px rgba(0,0,0,0.12);
}

/* Reviews */
.review-card {
    background: #f8f8f8;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

/* 5 Vines reviews */
.theme-5vines .review-card {
    background: #f7f5eb;
    border-radius: 8px;
    border-left: 2px solid var(--primary);
}

/* Crispys reviews */
.theme-crispys .review-card {
    background: #faf6eb;
    border-radius: 15px;
    text-align: center;
}

.review-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

/* Crispys reviewer info */
.theme-crispys .reviewer-info {
    justify-content: center;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

/* Crispys avatar */
.theme-crispys .reviewer-avatar {
    width: 50px;
    height: 50px;
}

.reviewer-name {
    font-weight: 600;
    color: var(--primary);
}

.reviewer-date {
    font-size: 0.85rem;
    color: #666;
}

/* Reservation Form */
.reservation-form {
    background: white;
    padding: 18px;
    border-radius: 16px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

/* 5 Vines form */
.theme-5vines .reservation-form {
    background: #fefae0;
    border-radius: 8px;
    border-bottom: 2px solid var(--primary);
}

/* Crispys form */
.theme-crispys .reservation-form {
    border-radius: 20px;
    border-top: 3px solid var(--primary);
}

.form-group {
    margin-bottom: 15px;
}

/* Crispys form group */
.theme-crispys .form-group {
    text-align: center;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--primary);
}

/* 5 Vines label */
.theme-5vines .form-group label {
    font-family: Georgia, serif;
}

/* Crispys label */
.theme-crispys .form-group label {
    font-family: 'Trebuchet MS', sans-serif;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

/* 5 Vines inputs */
.theme-5vines .form-group input,
.theme-5vines .form-group textarea {
    border-radius: 5px;
    background: white;
}

/* Crispys inputs */
.theme-crispys .form-group input,
.theme-crispys .form-group textarea {
    border-radius: 15px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 5 Vines button */
.theme-5vines .submit-btn {
    border-radius: 5px;
}

/* Crispys button */
.theme-crispys .submit-btn {
    border-radius: 15px;
}

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

/* Animations - Simplified */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Back Button */
.back-btn {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
    z-index: 100;
}

/* 5 Vines back button */
.theme-5vines .back-btn {
    border-radius: 5px;
}

/* Crispys back button */
.theme-crispys .back-btn {
    border-radius: 15px;
    width: 40px;
    height: 40px;
}

.back-btn:hover {
    transform: translateY(-50%) scale(1.05);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.back-btn::before {
    content: '←';
    position: relative;
    left: -1px;
}

/* Confirmation Page */
.confirmation-page {
    display: none;
    height: 100%;
    padding: 25px;
    text-align: center;
    background: white;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-radius: 24px;
}

.confirmation-page.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeScale 0.3s ease;
}

.confirmation-icon {
    font-size: 50px;
    color: var(--primary);
    margin-bottom: 15px;
    animation: scaleConfirm 0.4s ease;
}

@keyframes scaleConfirm {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

.confirmation-detail {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 250px;
    margin: 8px 0;
    padding: 8px;
    background: #f8f8f8;
    border-radius: 8px;
}

/* 5 Vines confirmation */
.theme-5vines .confirmation-detail {
    border-radius: 5px;
    background: #f7f5eb;
    border-left: 2px solid var(--primary);
}

/* Crispys confirmation */
.theme-crispys .confirmation-detail {
    border-radius: 15px;
    background: #faf6eb;
}

/* Page Transitions */
.page {
    display: none;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page.active {
    display: block;
    opacity: 1;
    animation: fadeScale 0.3s ease;
}

@keyframes fadeScale {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

#restaurantName {
    color: white; 
}

/* 5 Vines restaurant name */
.theme-5vines #restaurantName {
    font-family: Georgia, serif;
    font-style: italic;
}

/* Crispys restaurant name */
.theme-crispys #restaurantName {
    font-family: 'Trebuchet MS', sans-serif;
}

.nav-text {
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin-top: 5px;
}

/* Scrollbar customization for phone feel */
.restaurant-grid::-webkit-scrollbar,
.restaurant-content::-webkit-scrollbar {
    width: 4px;
}

.restaurant-grid::-webkit-scrollbar-track,
.restaurant-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.restaurant-grid::-webkit-scrollbar-thumb,
.restaurant-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}