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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #f43f5e;
    --success: #10b981;
    --warning: #f59e0b;
    --background: #0f0f1a;
    --surface: #1a1a2e;
    --surface-light: #252542;
    --text: #ffffff;
    --text-muted: #9ca3af;
    --border: #374151;
    --gradient: linear-gradient(135deg, #6366f1, #f43f5e);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.location-picker {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--surface);
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.location-picker:hover {
    background: var(--surface-light);
}

.dropdown-arrow {
    font-size: 10px;
    color: var(--text-muted);
}

.notifications-btn {
    position: relative;
    background: var(--surface);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.notifications-btn:hover {
    background: var(--surface-light);
    transform: scale(1.05);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--secondary);
    color: white;
    font-size: 10px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero */
.hero {
    padding: 32px 20px 24px;
    text-align: center;
}

.hero h1 {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.5;
}

/* Search */
.search-container {
    display: flex;
    gap: 8px;
    padding: 0 20px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--text);
    transition: border-color 0.2s;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-btn {
    background: var(--primary);
    border: none;
    width: 52px;
    border-radius: 12px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

/* Categories */
.categories-scroll {
    overflow-x: auto;
    padding: 0 20px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.categories {
    display: flex;
    gap: 8px;
    padding-bottom: 4px;
}

.category-pill {
    flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.category-pill:hover {
    background: var(--surface-light);
}

.category-pill.active {
    background: var(--primary);
    border-color: var(--primary);
}

/* Time Filter */
.time-filter {
    display: flex;
    gap: 8px;
    padding: 0 20px;
    margin-bottom: 24px;
}

.time-pill {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.time-pill:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.time-pill.active {
    background: var(--surface-light);
    color: var(--text);
    border-color: var(--primary);
}

/* Slots Section */
.slots-section {
    padding: 0 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* Slots Grid */
.slots-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Slot Card */
.slot-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border);
}

.slot-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.slot-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.slot-provider {
    display: flex;
    gap: 12px;
    align-items: center;
}

.provider-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.provider-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.provider-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.slot-discount {
    background: rgba(244, 63, 94, 0.15);
    color: var(--secondary);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
}

.slot-details {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
}

.slot-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-muted);
}

.slot-detail-icon {
    font-size: 16px;
}

.slot-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slot-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-original {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.price-current {
    font-size: 22px;
    font-weight: 700;
    color: var(--success);
}

.book-btn {
    background: var(--gradient);
    border: none;
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.book-btn:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

/* Rating */
.rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.rating-star {
    color: #fbbf24;
}

.rating-count {
    color: var(--text-muted);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--surface);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    border-radius: 24px 24px 0 0;
    padding: 24px;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    overflow-y: auto;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--surface-light);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--border);
}

.modal-content {
    position: relative;
}

.modal-provider {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.modal-avatar {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.modal-provider-info h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.modal-provider-info p {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.modal-details {
    background: var(--background);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.modal-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.modal-detail-row:last-child {
    border-bottom: none;
}

.modal-detail-label {
    color: var(--text-muted);
}

.modal-detail-value {
    font-weight: 600;
}

.modal-pricing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-price-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-original {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.modal-current {
    font-size: 28px;
    font-weight: 800;
    color: var(--success);
}

.modal-savings {
    font-size: 13px;
    color: var(--secondary);
    font-weight: 600;
}

.modal-book-btn {
    width: 100%;
    background: var(--gradient);
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 700;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.modal-book-btn:hover {
    transform: scale(1.01);
    opacity: 0.95;
}

/* Success Modal */
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.success-overlay.active {
    opacity: 1;
    visibility: visible;
}

.success-modal {
    background: var(--surface);
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    max-width: 320px;
    transform: scale(0.8);
    transition: transform 0.3s ease-out;
}

.success-overlay.active .success-modal {
    transform: scale(1);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    margin: 0 auto 24px;
    animation: successPop 0.5s ease-out;
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.success-modal h2 {
    font-size: 24px;
    margin-bottom: 12px;
}

.success-modal p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Notification Banner */
.notification-banner {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    width: calc(100% - 40px);
    max-width: 440px;
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-out;
}

.notification-banner.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.notification-content {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.notification-icon {
    font-size: 24px;
}

.notification-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notification-text strong {
    font-size: 15px;
}

.notification-text span {
    font-size: 13px;
    color: var(--text-muted);
}

.notification-actions {
    display: flex;
    gap: 8px;
}

/* Buttons */
.btn {
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text-muted);
}

.btn-secondary:hover {
    color: var(--text);
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 20px;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 16px;
    transition: color 0.2s;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    font-size: 22px;
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 380px) {
    .hero h1 {
        font-size: 26px;
    }
    
    .slot-details {
        flex-direction: column;
        gap: 8px;
    }
}

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

.slot-card {
    animation: fadeIn 0.4s ease-out;
}

.slot-card:nth-child(2) { animation-delay: 0.1s; }
.slot-card:nth-child(3) { animation-delay: 0.2s; }
.slot-card:nth-child(4) { animation-delay: 0.3s; }
.slot-card:nth-child(5) { animation-delay: 0.4s; }
