/* Palm Springs Mid-Century Color Palette */
:root {
    --terracotta: #C17767;
    --terracotta-light: #D4927F;
    --sage: #9CAF88;
    --sage-dark: #7A8F6D;
    --cream: #F5F1E8;
    --cream-dark: #E8E0D0;
    --charcoal: #2C2C2C;
    --charcoal-light: #4A4A4A;
    --shadow: rgba(44, 44, 44, 0.15);
    --shadow-dark: rgba(44, 44, 44, 0.25);
}

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

body {
    font-family: 'Josefin Sans', sans-serif;
    background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
    color: var(--charcoal);
    min-height: 100vh;
    padding-top: 140px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-light) 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 4px 20px var(--shadow-dark);
    z-index: 100;
}

.header-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.95;
}

.progress-indicator {
    margin-top: 12px;
    font-size: 14px;
    opacity: 0.9;
}

/* Home Cards */
.home-list {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.home-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-card:active {
    transform: scale(0.98);
}

.home-card.visited {
    opacity: 0.7;
    position: relative;
}

.home-card.visited::after {
    content: '✓ Visited';
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--sage);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--sage) 0%, var(--sage-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

.card-content {
    padding: 16px;
}

.card-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--charcoal);
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    color: var(--charcoal-light);
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

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

.btn-navigate:active {
    background: var(--sage-dark);
}

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

.btn-arrived:active {
    background: var(--terracotta-light);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 200;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--cream);
    width: 100%;
    max-width: 600px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    margin: 20px 0;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.modal-close:active {
    background: rgba(0, 0, 0, 0.8);
}

/* Slideshow */
.slideshow-container {
    position: relative;
    width: 100%;
    background: var(--charcoal);
}

#slideshow-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.slideshow-nav {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--charcoal);
    transition: all 0.2s ease;
}

.nav-btn:active {
    background: white;
    transform: scale(0.95);
}

.photo-counter {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
}

/* Modal Info */
.modal-info {
    padding: 24px;
}

.modal-info h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--charcoal);
}

.modal-architect {
    font-size: 16px;
    color: var(--terracotta);
    font-weight: 600;
    margin-bottom: 16px;
}

.modal-caption {
    font-size: 15px;
    line-height: 1.6;
    color: var(--charcoal-light);
}

/* Audio Player */
.audio-player {
    background: var(--charcoal);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.play-btn {
    background: var(--terracotta);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.play-btn:active {
    background: var(--terracotta-light);
    transform: scale(0.95);
}

.play-btn svg {
    width: 24px;
    height: 24px;
}

.progress-container {
    flex: 1;
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
}

.progress-bar {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: var(--terracotta);
    width: 0%;
    border-radius: 2px;
    pointer-events: none;
}

.progress-slider {
    width: 100%;
    height: 40px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
}

.progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

.progress-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.time-display {
    color: white;
    font-size: 13px;
    min-width: 40px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Modal Actions */
.modal-actions {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--cream);
}

.nav-link-btn,
.next-stop-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.nav-link-btn {
    background: var(--sage);
    color: white;
}

.nav-link-btn:active {
    background: var(--sage-dark);
}

.next-stop-btn {
    background: var(--terracotta);
    color: white;
}

.next-stop-btn:active {
    background: var(--terracotta-light);
}

.next-stop-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.home-card {
    animation: fadeIn 0.4s ease forwards;
}

.home-card:nth-child(1) { animation-delay: 0.1s; }
.home-card:nth-child(2) { animation-delay: 0.2s; }
.home-card:nth-child(3) { animation-delay: 0.3s; }

/* Mobile optimizations */
@media (max-width: 480px) {
    body {
        padding-top: 130px;
    }
    
    .header {
        padding: 16px;
    }
    
    .header-content h1 {
        font-size: 28px;
    }
    
    .home-list {
        padding: 16px;
    }
    
    .card-thumbnail {
        height: 180px;
    }
    
    .modal.active {
        padding: 10px;
    }
    
    .modal-content {
        margin: 10px 0;
    }
    
    #slideshow-image {
        height: 250px;
    }
    
    .modal-info {
        padding: 20px;
    }
    
    .modal-info h2 {
        font-size: 24px;
    }
}

/* Prevent text selection on buttons for better mobile UX */
button, .btn {
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}
