/* ============================================
   HOOYGA MOBILE-FIRST APP EXPERIENCE
   Platform-Adaptive Design for iOS & Android
   "Hoteelka Kasta, Halkan"
   Version: 2.0 - Mobile Dedicated
   ============================================ */

/* ============================================
   PLATFORM DETECTION CSS CUSTOM PROPERTIES
============================================ */
:root {
    /* Safe Areas */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    
    /* Mobile Layout */
    --mobile-header-height: 56px;
    --mobile-nav-height: 60px;
    --touch-target-min: 48px;
    --mobile-spacing: 16px;
    --mobile-radius: 16px;
    
    /* Platform Colors - Default (will be overridden by JS) */
    --platform-accent: #C9A962;
    --platform-bg: #08080A;
    --platform-surface: rgba(255, 255, 255, 0.06);
    --platform-text: #ffffff;
    --platform-text-secondary: rgba(255, 255, 255, 0.7);
    
    /* iOS Specific */
    --ios-blue: #007AFF;
    --ios-gray: #8E8E93;
    --ios-separator: rgba(255, 255, 255, 0.1);
    
    /* Android/Material Specific */
    --android-primary: #C9A962;
    --android-surface: #1E1E1E;
    --android-elevation-1: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --android-elevation-2: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}

/* ============================================
   MOBILE-ONLY BASE STYLES
============================================ */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    overscroll-behavior-y: contain;
    font-size: 16px; /* Prevent iOS zoom on input focus */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hide scrollbar but allow scroll */
body::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Touch-friendly targets */
button, a, input, select, textarea, .touchable {
    min-height: var(--touch-target-min);
    touch-action: manipulation;
}

/* Disable text selection on interactive elements */
button, .btn, .nav-link, .search-tab {
    -webkit-user-select: none;
    user-select: none;
}

/* ============================================
   PLATFORM-SPECIFIC BODY CLASSES
   Added via JavaScript based on user agent
============================================ */

/* iOS Platform Styles */
body.platform-ios {
    /* iOS uses SF Pro font family */
    font-family: -apple-system, 'SF Pro Text', 'SF Pro Display', system-ui, sans-serif;
}

body.platform-ios .mobile-header {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(8, 8, 10, 0.75);
}

body.platform-ios .mobile-card {
    border-radius: 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

body.platform-ios .btn-primary {
    border-radius: 12px;
}

body.platform-ios .form-input {
    border-radius: 10px;
    padding: 14px 16px;
}

/* Android Platform Styles */
body.platform-android {
    font-family: 'Roboto', 'Google Sans', system-ui, sans-serif;
}

body.platform-android .mobile-header {
    background: var(--android-surface);
    box-shadow: var(--android-elevation-1);
}

body.platform-android .mobile-card {
    border-radius: 16px;
    box-shadow: var(--android-elevation-2);
}

body.platform-android .btn-primary {
    border-radius: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

body.platform-android .form-input {
    border-radius: 4px;
    border-bottom: 2px solid var(--platform-accent);
    border-top: none;
    border-left: none;
    border-right: none;
    background: transparent;
}

/* ============================================
   MOBILE APP SHELL - Always Mobile Layout
============================================ */

/* Force mobile layout on all screens for this mobile-dedicated version */
.mobile-app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    background: var(--platform-bg);
}

/* ============================================
   MOBILE HEADER / APP BAR
============================================ */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--mobile-header-height) + var(--safe-top));
    padding-top: var(--safe-top);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: var(--mobile-spacing);
    padding-right: var(--mobile-spacing);
    z-index: 1000;
    background: rgba(8, 8, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-header-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--platform-accent);
    letter-spacing: -0.02em;
}

.mobile-header-subtitle {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--platform-accent);
    opacity: 0.8;
    text-transform: uppercase;
}

.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--platform-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-header-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.15);
}

.mobile-header-btn svg {
    width: 22px;
    height: 22px;
}

/* ============================================
   MOBILE MAIN CONTENT
============================================ */
.mobile-main {
    flex: 1;
    padding-top: calc(var(--mobile-header-height) + var(--safe-top));
    padding-bottom: calc(var(--mobile-nav-height) + var(--safe-bottom) + 20px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   MOBILE HERO SECTION
============================================ */
.mobile-hero {
    padding: 24px var(--mobile-spacing);
    text-align: center;
    background: linear-gradient(180deg, rgba(201, 169, 98, 0.1) 0%, transparent 100%);
}

.mobile-hero-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
}

.mobile-hero-logo svg {
    width: 100%;
    height: 100%;
}

.mobile-hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--platform-accent);
    margin-bottom: 4px;
}

.mobile-hero-tagline {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    color: var(--platform-accent);
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 8px;
}

.mobile-hero-subtitle {
    font-size: 1rem;
    color: var(--platform-text);
    font-weight: 500;
}

.mobile-hero-desc {
    font-size: 0.8rem;
    color: var(--platform-text-secondary);
    margin-top: 4px;
}

/* ============================================
   MOBILE SEARCH CARD
============================================ */
.mobile-search-card {
    margin: 16px var(--mobile-spacing);
    padding: 20px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--mobile-radius);
    border: 1px solid rgba(201, 169, 98, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Search Tabs */
.mobile-search-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.mobile-search-tabs::-webkit-scrollbar {
    display: none;
}

.mobile-search-tab {
    flex: 1;
    min-width: max-content;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--platform-text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-search-tab svg {
    width: 16px;
    height: 16px;
}

.mobile-search-tab.active {
    background: rgba(201, 169, 98, 0.15);
    border-color: var(--platform-accent);
    color: var(--platform-accent);
}

.mobile-search-tab:active {
    transform: scale(0.98);
}

/* Form Fields */
.mobile-form-group {
    margin-bottom: 16px;
}

.mobile-form-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--platform-text-secondary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.mobile-form-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: var(--platform-text);
    font-size: 1rem;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.mobile-form-input:focus {
    outline: none;
    border-color: var(--platform-accent);
    background: rgba(201, 169, 98, 0.08);
}

.mobile-form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Date Picker Row */
.mobile-date-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.mobile-date-field {
    position: relative;
}

.mobile-date-input {
    width: 100%;
    padding: 14px 16px;
    padding-right: 44px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: var(--platform-text);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-date-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--platform-accent);
    pointer-events: none;
}

/* Guests Control */
.mobile-guests-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
}

.mobile-guests-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(201, 169, 98, 0.2);
    border: none;
    color: var(--platform-accent);
    font-size: 1.5rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-guests-btn:active {
    transform: scale(0.95);
    background: rgba(201, 169, 98, 0.35);
}

.mobile-guests-count {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--platform-text);
}

.mobile-guests-label {
    font-size: 0.8rem;
    color: var(--platform-text-secondary);
}

/* Search Button */
.mobile-search-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #C9A962 0%, #D4BC7A 50%, #C9A962 100%);
    border: none;
    border-radius: 14px;
    color: #08080A;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.mobile-search-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.mobile-search-btn svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   MOBILE CALENDAR - Full Screen Sheet
============================================ */
.mobile-calendar-sheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--platform-bg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.mobile-calendar-sheet.active {
    transform: translateY(0);
}

/* iOS Style Calendar Sheet */
body.platform-ios .mobile-calendar-sheet {
    border-radius: 20px 20px 0 0;
    top: auto;
    height: 85vh;
    background: rgba(28, 28, 30, 0.98);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

/* Android Style Calendar Sheet */
body.platform-android .mobile-calendar-sheet {
    border-radius: 28px 28px 0 0;
    top: auto;
    height: 90vh;
    background: #1C1C1E;
}

.mobile-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    padding-top: calc(16px + var(--safe-top));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-calendar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--platform-text);
}

.mobile-calendar-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--platform-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-calendar-close svg {
    width: 18px;
    height: 18px;
}

/* Handle bar for iOS */
body.platform-ios .mobile-calendar-sheet::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2.5px;
}

.mobile-calendar-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
}

/* Calendar Month Navigation */
.mobile-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.mobile-calendar-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--platform-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-calendar-nav-btn:active {
    background: rgba(255, 255, 255, 0.15);
}

.mobile-calendar-nav-btn svg {
    width: 20px;
    height: 20px;
}

.mobile-calendar-month-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--platform-text);
}

/* Weekday Headers */
.mobile-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 12px;
}

.mobile-calendar-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--platform-text-secondary);
    padding: 8px 0;
}

/* Calendar Days Grid */
.mobile-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.mobile-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--platform-text);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.mobile-calendar-day:active:not(.disabled) {
    transform: scale(0.92);
}

.mobile-calendar-day.today {
    color: var(--platform-accent);
    font-weight: 700;
}

.mobile-calendar-day.today::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--platform-accent);
}

.mobile-calendar-day.selected {
    background: var(--platform-accent);
    color: #08080A;
}

.mobile-calendar-day.range-start {
    background: var(--platform-accent);
    color: #08080A;
    border-radius: 50% 0 0 50%;
}

.mobile-calendar-day.range-end {
    background: var(--platform-accent);
    color: #08080A;
    border-radius: 0 50% 50% 0;
}

.mobile-calendar-day.in-range {
    background: rgba(201, 169, 98, 0.2);
    border-radius: 0;
}

.mobile-calendar-day.disabled,
.mobile-calendar-day.past {
    color: rgba(255, 255, 255, 0.25);
    cursor: not-allowed;
}

.mobile-calendar-day.empty {
    visibility: hidden;
}

/* Calendar Footer */
.mobile-calendar-footer {
    padding: 16px 20px;
    padding-bottom: calc(16px + var(--safe-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
}

.mobile-calendar-footer-btn {
    flex: 1;
    padding: 16px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-calendar-footer-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--platform-text);
}

.mobile-calendar-footer-btn.primary {
    background: var(--platform-accent);
    border: none;
    color: #08080A;
}

.mobile-calendar-footer-btn:active {
    transform: scale(0.98);
}

/* ============================================
   MOBILE QUICK STATS
============================================ */
.mobile-stats {
    display: flex;
    justify-content: space-around;
    padding: 20px var(--mobile-spacing);
    margin-top: 8px;
}

.mobile-stat {
    text-align: center;
}

.mobile-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--platform-accent);
}

.mobile-stat-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--platform-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* ============================================
   MOBILE SECTIONS
============================================ */
.mobile-section {
    padding: 32px var(--mobile-spacing);
}

.mobile-section-header {
    text-align: center;
    margin-bottom: 24px;
}

.mobile-section-badge {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--platform-accent);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.mobile-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--platform-text);
}

/* ============================================
   MOBILE EXPERIENCE CARDS
============================================ */
.mobile-experience-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-experience-card {
    padding: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--mobile-radius);
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-experience-card:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.08);
}

.mobile-experience-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(201, 169, 98, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-experience-icon svg {
    width: 24px;
    height: 24px;
    color: var(--platform-accent);
}

.mobile-experience-content {
    flex: 1;
}

.mobile-experience-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--platform-text);
    margin-bottom: 4px;
}

.mobile-experience-text {
    font-size: 0.85rem;
    color: var(--platform-text-secondary);
    line-height: 1.4;
}

.mobile-experience-arrow {
    width: 20px;
    height: 20px;
    color: var(--platform-text-secondary);
}

/* ============================================
   MOBILE BOTTOM NAVIGATION (App-like)
============================================ */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--mobile-nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: rgba(8, 8, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 0;
    color: var(--platform-text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-nav-item.active {
    color: var(--platform-accent);
}

.mobile-nav-item:active {
    transform: scale(0.95);
}

.mobile-nav-icon {
    width: 24px;
    height: 24px;
}

.mobile-nav-label {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ============================================
   MOBILE HOTEL CARDS
============================================ */
.mobile-hotels-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 var(--mobile-spacing);
    padding-bottom: 8px;
}

.mobile-hotels-scroll::-webkit-scrollbar {
    display: none;
}

.mobile-hotel-card {
    flex-shrink: 0;
    width: 280px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--mobile-radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-hotel-image {
    height: 160px;
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.2) 0%, rgba(201, 169, 98, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-hotel-image svg {
    width: 48px;
    height: 48px;
    color: var(--platform-accent);
    opacity: 0.5;
}

.mobile-hotel-info {
    padding: 16px;
}

.mobile-hotel-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--platform-text);
    margin-bottom: 4px;
}

.mobile-hotel-location {
    font-size: 0.8rem;
    color: var(--platform-text-secondary);
    margin-bottom: 12px;
}

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

.mobile-hotel-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--platform-accent);
}

.mobile-hotel-price {
    font-size: 0.85rem;
    color: var(--platform-text-secondary);
}

.mobile-hotel-price strong {
    font-size: 1.1rem;
    color: var(--platform-text);
}

/* ============================================
   MOBILE OVERLAY / BACKDROP
============================================ */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================
   PLATFORM-SPECIFIC ANIMATIONS
============================================ */
body.platform-ios .mobile-calendar-sheet {
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

body.platform-android .mobile-calendar-sheet {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Haptic-style feedback for iOS */
body.platform-ios .mobile-search-btn:active,
body.platform-ios .mobile-calendar-day:active:not(.disabled) {
    animation: ios-haptic 0.1s ease;
}

@keyframes ios-haptic {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.97); }
}

/* Material ripple for Android */
body.platform-android .mobile-search-btn,
body.platform-android .mobile-calendar-day {
    position: relative;
    overflow: hidden;
}

body.platform-android .mobile-search-btn::after,
body.platform-android .mobile-calendar-day::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.3s, height 0.3s, opacity 0.3s;
}

body.platform-android .mobile-search-btn:active::after,
body.platform-android .mobile-calendar-day:active::after {
    width: 200%;
    height: 200%;
    opacity: 1;
    transition: 0s;
}

/* ============================================
   LIGHT MODE SUPPORT
============================================ */
@media (prefers-color-scheme: light) {
    :root {
        --platform-bg: #F8F6F2;
        --platform-surface: rgba(61, 43, 31, 0.06);
        --platform-text: #3d2b1f;
        --platform-text-secondary: rgba(61, 43, 31, 0.65);
        --platform-accent: #8b6914;
    }
    
    .mobile-header {
        background: rgba(248, 246, 242, 0.95);
        border-bottom-color: rgba(61, 43, 31, 0.1);
    }
    
    .mobile-bottom-nav {
        background: rgba(248, 246, 242, 0.95);
        border-top-color: rgba(61, 43, 31, 0.1);
    }
    
    .mobile-search-card {
        background: rgba(255, 255, 255, 0.9);
        border-color: rgba(139, 105, 20, 0.2);
    }
    
    .mobile-form-input {
        background: rgba(61, 43, 31, 0.04);
        border-color: rgba(61, 43, 31, 0.15);
        color: var(--platform-text);
    }
    
    /* Calendar Light Mode - Full Coverage */
    .mobile-calendar-sheet {
        background: #FFFFFF !important;
    }
    
    body.platform-ios .mobile-calendar-sheet {
        background: rgba(255, 255, 255, 0.98) !important;
    }
    
    body.platform-android .mobile-calendar-sheet {
        background: #FFFFFF !important;
    }
    
    .mobile-calendar-header {
        background: #F8F6F2;
        border-bottom-color: rgba(61, 43, 31, 0.1);
    }
    
    .mobile-calendar-title {
        color: #3d2b1f;
    }
    
    .mobile-calendar-close {
        background: rgba(61, 43, 31, 0.08);
        color: #3d2b1f;
    }
    
    .mobile-calendar-content {
        background: #FFFFFF;
    }
    
    .mobile-calendar-nav-btn {
        background: rgba(61, 43, 31, 0.06);
        color: #3d2b1f;
    }
    
    .mobile-calendar-nav-btn:active {
        background: rgba(61, 43, 31, 0.12);
    }
    
    .mobile-calendar-month-title {
        color: #3d2b1f;
    }
    
    .mobile-calendar-weekday {
        color: rgba(61, 43, 31, 0.6);
    }
    
    .mobile-calendar-day {
        color: #3d2b1f;
    }
    
    .mobile-calendar-day.today {
        color: #8b6914;
    }
    
    .mobile-calendar-day.today::after {
        background: #8b6914;
    }
    
    .mobile-calendar-day.selected {
        background: #8b6914;
        color: #FFFFFF;
    }
    
    .mobile-calendar-day.range-start,
    .mobile-calendar-day.range-end {
        background: #8b6914;
        color: #FFFFFF;
    }
    
    .mobile-calendar-day.in-range {
        background: rgba(139, 105, 20, 0.15);
    }
    
    .mobile-calendar-day.disabled,
    .mobile-calendar-day.past {
        color: rgba(61, 43, 31, 0.25);
    }
    
    .mobile-calendar-footer {
        background: #F8F6F2;
        border-top-color: rgba(61, 43, 31, 0.1);
    }
    
    .mobile-calendar-footer-btn.secondary {
        background: rgba(61, 43, 31, 0.06);
        border-color: rgba(61, 43, 31, 0.15);
        color: #3d2b1f;
    }
    
    .mobile-calendar-footer-btn.primary {
        background: #8b6914;
        color: #FFFFFF;
    }
    
    /* Handle bar for iOS in light mode */
    body.platform-ios .mobile-calendar-sheet::before {
        background: rgba(61, 43, 31, 0.2);
    }
}

/* ============================================
   DESKTOP FALLBACK - REDIRECT TO MOBILE VIEW
============================================ */
@media (min-width: 769px) {
    /* For desktop, we can still use the mobile layout or show a "Use mobile" message */
    .mobile-app-container {
        max-width: 430px;
        margin: 0 auto;
        box-shadow: 0 0 60px rgba(0, 0, 0, 0.3);
        min-height: 100vh;
    }
    
    .mobile-header,
    .mobile-bottom-nav {
        max-width: 430px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ============================================
   LOADING & SKELETON STATES
============================================ */
.mobile-skeleton {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.04) 25%, 
        rgba(255, 255, 255, 0.08) 50%, 
        rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   INSTALL PROMPT (PWA)
============================================ */
.mobile-install-banner {
    position: fixed;
    bottom: calc(var(--mobile-nav-height) + var(--safe-bottom) + 16px);
    left: var(--mobile-spacing);
    right: var(--mobile-spacing);
    padding: 16px;
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.95) 0%, rgba(180, 150, 80, 0.95) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(200%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

.mobile-install-banner.show {
    transform: translateY(0);
}

.mobile-install-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(8, 8, 10, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-install-icon svg {
    width: 24px;
    height: 24px;
    color: #08080A;
}

.mobile-install-content {
    flex: 1;
}

.mobile-install-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #08080A;
}

.mobile-install-text {
    font-size: 0.75rem;
    color: rgba(8, 8, 10, 0.7);
}

.mobile-install-btn {
    padding: 10px 16px;
    background: #08080A;
    border: none;
    border-radius: 10px;
    color: var(--platform-accent);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.mobile-install-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #08080A;
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-install-close svg {
    width: 14px;
    height: 14px;
}
/* ============================================
   LIGHT THEME SUPPORT
============================================ */
body.light-theme {
    --platform-bg: #F8F6F2;
    --platform-surface: rgba(0, 0, 0, 0.04);
    --platform-text: #1a1a1a;
    --platform-text-secondary: rgba(0, 0, 0, 0.6);
    background: #F8F6F2;
}

body.light-theme .mobile-app-container {
    background: #F8F6F2;
}

/* HEADER ALWAYS STAYS DARK */
body.light-theme .mobile-header {
    background: rgba(8, 8, 10, 0.95) !important;
    color: #fff !important;
}

body.light-theme .mobile-header-title,
body.light-theme .mobile-header-subtitle {
    color: #fff !important;
}

body.light-theme .mobile-header-btn {
    color: #fff !important;
}

body.light-theme .mobile-header-btn svg {
    stroke: #fff !important;
}

/* Light theme main content */
body.light-theme .mobile-main {
    background: #F8F6F2;
}

body.light-theme .mobile-hero {
    background: linear-gradient(180deg, #08080A 0%, #1a1a1a 50%, #F8F6F2 100%);
}

body.light-theme .mobile-search-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .mobile-search-tab {
    color: rgba(0, 0, 0, 0.5);
}

body.light-theme .mobile-search-tab.active {
    color: var(--platform-accent);
}

body.light-theme .mobile-search-row {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .mobile-search-input {
    color: #1a1a1a;
}

body.light-theme .mobile-search-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

body.light-theme .mobile-search-icon {
    color: rgba(0, 0, 0, 0.4);
}

body.light-theme .mobile-search-btn {
    background: #1a1a1a;
    color: var(--platform-accent);
}

body.light-theme .mobile-section-title {
    color: #1a1a1a;
}

body.light-theme .mobile-section-badge {
    color: var(--platform-accent);
}

body.light-theme .mobile-experience-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .mobile-experience-title {
    color: #1a1a1a;
}

body.light-theme .mobile-experience-text {
    color: rgba(0, 0, 0, 0.6);
}

body.light-theme .mobile-experience-icon {
    background: rgba(201, 169, 98, 0.1);
    color: var(--platform-accent);
}

/* Light theme bottom nav */
body.light-theme .mobile-bottom-nav {
    background: #ffffff;
    border-top-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .mobile-nav-label {
    color: rgba(0, 0, 0, 0.5);
}

body.light-theme .mobile-nav-icon {
    stroke: rgba(0, 0, 0, 0.5);
}

body.light-theme .mobile-nav-item.active .mobile-nav-label {
    color: var(--platform-accent);
}

body.light-theme .mobile-nav-item.active .mobile-nav-icon {
    stroke: var(--platform-accent);
}

/* Light theme calendar */
body.light-theme .mobile-calendar-sheet {
    background: #ffffff;
}

body.light-theme .mobile-calendar-header {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .mobile-calendar-title {
    color: #1a1a1a;
}

body.light-theme .mobile-calendar-close {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}

body.light-theme .mobile-calendar-day {
    color: #1a1a1a;
}

body.light-theme .mobile-calendar-day.disabled,
body.light-theme .mobile-calendar-day.past {
    color: rgba(0, 0, 0, 0.25);
}

body.light-theme .mobile-calendar-weekday {
    color: rgba(0, 0, 0, 0.5);
}

body.light-theme .mobile-calendar-month-title {
    color: #1a1a1a;
}

body.light-theme .mobile-calendar-nav-btn {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}

body.light-theme .mobile-calendar-footer {
    border-top-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .mobile-calendar-footer-btn.secondary {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}

body.light-theme .mobile-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* ============================================
   iOS - HIDE XISAAB (PROFILE) FROM BOTTOM NAV
============================================ */
body.platform-ios .mobile-nav-item:last-child {
    display: none !important;
}

/* Adjust nav spacing when 3 items on iOS */
body.platform-ios .mobile-bottom-nav {
    justify-content: space-around;
}