/* ShiiineOn Weekender - FIXED CSS FILE */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #000000;
    color: #ffffff;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header - Fixed Navigation for Non-Home Pages */
.app-header {
    background: linear-gradient(135deg, #F9E547 0%, #E4D000 100%);
    padding: 0.75rem;
    box-shadow: 0 4px 20px rgba(249,229,71,0.3);
    border-bottom: 3px solid #000000;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: none;
    height: 60px;
}

/* Back to home button */
.back-home-btn {
    background: #000;
    border: 2px solid #F9E547;
    color: #F9E547;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.back-home-btn:active {
    background: #F9E547;
    color: #000;
    transform: scale(0.98);
}

/* Main Content */
.app-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #000;
    height: calc(100vh - 50px); /* Account for footer */
}

/* CRITICAL FIX: Views must be properly hidden/shown */
.view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none !important; /* Force hidden by default */
    overflow-y: auto;
    padding: 1rem;
    padding-bottom: 80px; /* Increased padding to account for footer and floating button */
    background: #000; /* Ensure each view has a background */
    z-index: 1;
}

/* Active view is visible */
.view.active {
    display: block !important;
    z-index: 10;
}

/* Non-home views need header space */
.view.active:not(#home-view) {
    top: 60px; /* Space for header */
}

/* Home View Specific - FIX FOR LOGO CUTOFF */
#home-view {
    display: none;
    background: #000;
    padding-top: 20px; /* Add padding to prevent logo cutoff */
}

#home-view.active {
    display: flex !important;
    align-items: flex-start; /* Changed from center to flex-start */
    justify-content: center;
    padding-top: 20px; /* Ensure padding at top */
    overflow-y: auto; /* Allow scrolling if needed */
}

.home-container {
    text-align: center;
    padding: 1rem;
    padding-bottom: 80px; /* Extra padding for mobile to ensure stats are visible */
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.home-logo {
    height: 100px;
    margin: 0 auto 1rem;
    display: block;
    object-fit: contain; /* Prevent distortion */
}

.home-title {
    font-size: 1.8rem;
    color: #F9E547;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 900;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.home-subtitle {
    color: #999;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

/* Home Menu Buttons */
.home-menu {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.home-menu-btn {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 10px;
    padding: 0.8rem; /* Slightly reduced padding */
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    width: 100%;
    min-height: 60px; /* Ensure minimum height */
}

.home-menu-btn:active {
    background: #2a2a2a;
    border-color: #F9E547;
    transform: scale(0.98);
}

.menu-icon {
    font-size: 1.8rem; /* Slightly smaller icon */
    min-width: 45px;
    text-align: center;
}

.menu-title {
    font-size: 0.95rem; /* Slightly smaller title */
    font-weight: 800;
    color: #F9E547;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
}

.menu-desc {
    font-size: 0.7rem; /* Slightly smaller description */
    color: #999;
}

/* Home Stats */
.home-stats {
    margin-top: 1rem;
}

.home-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    text-align: center;
}

.stat-box {
    background: #1a1a1a;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #333;
}

.stat-number {
    font-size: 1.3rem;
    font-weight: bold;
    color: #F9E547;
}

.stat-label {
    font-size: 0.65rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

/* Day Selector */
/* Schedule controls container */
.schedule-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem;
    border-radius: 10px;
    flex-wrap: wrap;
}

.day-selector {
    display: flex;
    gap: 0.5rem;
}

/* PDF button styling */
.pdf-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pdf-btn:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-2px);
}

.day-btn {
    flex: 1;
    padding: 0.75rem;
    background: #1a1a1a;
    border: 2px solid #F9E547;
    color: #F9E547;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 700;
    text-transform: uppercase;
}

.day-btn.active {
    background: #F9E547;
    color: #000000;
}

/* Schedule Grid */
.schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Search Box */
.search-box {
    margin-bottom: 1rem;
}

.search-box input {
    width: 100%;
    padding: 0.75rem;
    background: #0a0a0a;
    border: 2px solid #F9E547;
    color: white;
    font-size: 1rem;
    border-radius: 8px;
}

.search-box input:focus {
    outline: none;
    border-color: #F9E547;
    background: #1a1a1a;
}

.search-box input::placeholder {
    color: #666666;
    text-transform: none;
}

/* Bands List */
.bands-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.band-item {
    background: #0a0a0a;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #333333;
    border-radius: 0 8px 8px 0;
}

.band-item:active {
    background: #1a1a1a;
    transform: scale(0.98);
}

.band-item.must-see {
    border-left-color: #FF1744;
    background: linear-gradient(90deg, rgba(255,23,68,0.1) 0%, #0a0a0a 100%);
}

.band-item.interested {
    border-left-color: #F9E547;
    background: linear-gradient(90deg, rgba(249,229,71,0.1) 0%, #0a0a0a 100%);
}

.band-item.seen {
    border-left-color: #4CAF50 !important;
    background: linear-gradient(90deg, rgba(76,175,80,0.1) 0%, #0a0a0a 100%);
}

/* Conflict highlighting */
.band-item.conflict {
    border: 2px solid #FF6B35;
    box-shadow: 0 0 15px rgba(255,107,53,0.4);
    animation: conflictPulse 2s ease-in-out infinite alternate;
}

.performance.conflict {
    border: 2px solid #FF6B35;
    box-shadow: 0 0 10px rgba(255,107,53,0.3);
    animation: conflictPulse 2s ease-in-out infinite alternate;
}

@keyframes conflictPulse {
    from {
        box-shadow: 0 0 10px rgba(255,107,53,0.3);
    }
    to {
        box-shadow: 0 0 20px rgba(255,107,53,0.7);
    }
}

.band-name {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.band-schedule-info {
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.25rem;
}

/* Now Playing */
.current-time {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 900;
    color: #F9E547;
    text-transform: uppercase;
}

/* Schedule Filter */
.schedule-filter {
    margin-bottom: 1rem;
}

.filter-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: #0a0a0a;
    border: 2px solid #333;
    color: #999;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 20px;
}

.filter-btn.active {
    background: #F9E547;
    color: #000;
    border-color: #F9E547;
}

/* Performance items */
.performance {
    background: #0a0a0a;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    border-left: 4px solid #333;
}

.performance.must-see {
    border-left-color: #FF1744;
}

.performance.interested {
    border-left-color: #F9E547;
}

.performance-band {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
}

.modal.show {
    display: block;
}

.modal-content {
    background: #0a0a0a;
    margin: 10% auto;
    padding: 1.5rem;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    border: 2px solid #F9E547;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #F9E547;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Band Details in Modal */
#band-details h2 {
    margin-bottom: 1rem;
    color: #F9E547;
    text-transform: uppercase;
    font-size: 1.3rem;
}

/* Rating System */
.rating-container {
    padding: 1rem;
    background: #1a1a1a;
    border-radius: 8px;
    margin: 1rem 0;
}

.star-container {
    position: relative;
    display: inline-block;
    font-size: 1.8rem;
    width: 1.8rem;
    height: 1.8rem;
    cursor: pointer;
}

/* Seen Container */
.seen-container {
    padding: 1rem;
    background: #1a1a1a;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Action Buttons */
.band-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.action-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.must-see-btn {
    background: #FF1744;
    color: white;
}

.interested-btn {
    background: #F9E547;
    color: #000;
}

.remove-btn {
    background: #333;
    color: #999;
}

/* Share Options */
.share-option-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    background: #1a1a1a;
    border: 2px solid #333;
    color: #fff;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.share-option-btn:hover {
    background: #2a2a2a;
    border-color: #F9E547;
    color: #F9E547;
    transform: translateY(-2px);
}

.share-option-btn:active {
    transform: translateY(0);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: #F9E547;
}

/* Footer Donation Section */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #000;
    border-top: 2px solid #F9E547;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
}

.donation-btn-mobile {
    background: #F9E547;
    color: #000;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Floating help button */
.floating-help-btn {
    position: fixed;
    bottom: 65px;
    right: 15px;
    width: 45px;
    height: 45px;
    background: #F9E547;
    border: 2px solid #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 999;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.floating-help-btn:hover {
    transform: scale(1.1);
    background: #E4D000;
}

.floating-help-btn span {
    color: #000;
    font-weight: bold;
}

/* Help View Styles */
.help-container {
    padding: 1rem;
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.help-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #F9E547 0%, #E4D000 100%);
    border-radius: 12px;
    color: #000;
}

.help-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.help-header p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.help-section {
    background: #1a1a1a;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #F9E547;
}

.help-section h3 {
    color: #F9E547;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-section p {
    color: #fff;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.help-section p:last-child {
    margin-bottom: 0;
}

.help-section strong {
    color: #F9E547;
}

.help-footer {
    text-align: center;
    padding: 2rem 1rem;
    background: #0a0a0a;
    border-radius: 12px;
    border: 2px solid #F9E547;
    margin-top: 2rem;
}

.help-footer p {
    color: #F9E547;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.support-link {
    display: inline-block;
    background: #F9E547;
    color: #000;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.support-link:hover {
    background: #E4D000;
    transform: translateY(-2px);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #F9E547;
}

/* Map Styles */
.map-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.map-controls {
    background: rgba(26, 26, 46, 0.95);
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-bottom: 2px solid #F9E547;
    z-index: 1000;
}

.map-btn {
    background: #F9E547;
    color: #000;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.map-btn:hover {
    background: #E4D000;
    transform: translateY(-1px);
}

.map-btn:active {
    transform: translateY(0);
}

.map-btn:disabled {
    background: #666;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

.transport-btn {
    background: #333;
    color: #ccc;
    border: 1px solid #555;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.transport-btn:hover {
    background: #444;
    color: #fff;
}

.transport-btn.active {
    background: #F9E547;
    color: #000;
    border-color: #F9E547;
    font-weight: 600;
}

#map {
    flex: 1;
    min-height: 400px;
}

.route-info {
    background: rgba(26, 26, 46, 0.95);
    padding: 1rem;
    border-top: 2px solid #F9E547;
    color: #fff;
    max-height: 150px;
    overflow-y: auto;
}

.route-info h3 {
    color: #F9E547;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.route-step {
    padding: 0.25rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #333;
}

.route-step:last-child {
    border-bottom: none;
}

.route-distance {
    color: #F9E547;
    font-weight: 600;
}

/* Custom Leaflet popup styling */
.leaflet-popup-content-wrapper {
    background: #ffffff !important;
    color: #000 !important;
    border-radius: 8px;
    border: 2px solid #F9E547;
}

.leaflet-popup-content {
    margin: 8px 12px;
    line-height: 1.4;
    color: #000 !important;
}

.leaflet-popup-tip {
    background: #ffffff !important;
    border: 1px solid #F9E547;
}

.venue-popup {
    text-align: center;
}

.venue-popup h3 {
    color: #000 !important;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 700;
}

.venue-popup p {
    margin: 0.25rem 0;
    font-size: 0.85rem;
    color: #000 !important;
}

.venue-popup .capacity {
    color: #666 !important;
    font-style: italic;
}

.venue-popup .get-directions-btn {
    background: #F9E547;
    color: #000;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
    cursor: pointer;
    width: 100%;
}

.venue-popup .get-directions-btn:hover {
    background: #E4D000;
}

/* Hide Leaflet Routing Machine directions panel */
.leaflet-routing-container {
    display: none !important;
}

.leaflet-routing-alternatives-container {
    display: none !important;
}

/* Now Playing mobile-friendly redesign */
.now-section-header {
    margin: 1rem 0 0.75rem 0;
    padding: 0 1rem;
}

.now-section-header h3 {
    color: #F9E547;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
    text-align: left;
}

.now-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin: 0 1rem 0.75rem 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.now-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.now-card.current {
    border-left-color: #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15), rgba(32, 201, 151, 0.1));
}

.now-card.next {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(253, 126, 20, 0.1));
}

.now-card.must-see {
    border-right: 3px solid #F9E547;
}

.now-card.interested {
    border-right: 3px solid #17a2b8;
}

.now-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.now-band-name {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
    min-width: 0;
}

.now-venue-badge {
    background: rgba(249, 229, 71, 0.2);
    color: #F9E547;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.now-time {
    color: #bbb;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive adjustments for Now Playing */
@media (max-width: 480px) {
    .now-card {
        margin: 0 0.5rem 0.75rem 0.5rem;
        padding: 0.75rem;
    }

    .now-section-header {
        padding: 0 0.5rem;
    }

    .now-band-name {
        font-size: 1rem;
    }

    .now-venue-badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }

    /* Schedule controls responsive */
    .schedule-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0.5rem;
    }

    .day-selector {
        justify-content: center;
    }

    .pdf-btn {
        align-self: center;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Responsive adjustments for small screens */
@media (max-height: 700px) {
    .home-logo {
        height: 80px;
    }

    .home-title {
        font-size: 1.5rem;
    }

    .home-menu-btn {
        padding: 0.75rem;
    }

    .menu-icon {
        font-size: 1.5rem;
    }

    #map {
        height: calc(100vh - 180px);
    }

    .map-controls {
        padding: 0.75rem;
    }

    .map-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    /* Ensure all content is visible on short screens */
    .view {
        padding-bottom: 100px;
    }

    .home-container {
        padding-bottom: 100px;
    }
}