/* ==========================================================================
   Summer Breeze 2025 Timetable Styles
   ========================================================================== */

/* ==========================================================================
   CSS Reset & Base Styles
   ========================================================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #000;
    color: #fff;
    line-height: 1.4;
    overflow-x: hidden;
}

/* ==========================================================================
   Color Scheme - Metal Festival Theme
   ========================================================================== */

:root {
    /* Days - Fiery Orange/Red */
    --day-color: #ff6b35;
    --day-color-hover: #ff8c5a;
    --day-color-active: #e55a2b;
    --day-bg: rgba(255, 107, 53, 0.1);
    --day-border: #ff6b35;
    
    /* Stages - Electric Blue */
    --stage-color: #4ecdc4;
    --stage-color-hover: #6dd5ce;
    --stage-color-active: #3bb8b0;
    --stage-bg: rgba(78, 205, 196, 0.1);
    --stage-border: #4ecdc4;
    
    /* Bands - Purple/Violet */
    --band-color: #a855f7;
    --band-color-hover: #c084fc;
    --band-color-active: #9333ea;
    --band-bg: rgba(168, 85, 247, 0.1);
    --band-border: #a855f7;
    
    /* High contrast for daylight visibility */
    --text-high-contrast: #ffffff;
    --text-secondary: #e5e5e5;
    --bg-dark: #0a0a0a;
    --bg-medium: #1a1a1a;
    --bg-light: #2a2a2a;
    
    /* Metal festival accents */
    --accent-red: #ff4444;
    --accent-gold: #ffd700;
    --shadow-glow: 0 0 20px rgba(255, 68, 68, 0.3);
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

/* Header */
.header {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-medium) 100%);
    padding: 1rem;
    border-bottom: 3px solid var(--accent-red);
    box-shadow: var(--shadow-glow);
}

.header h1 {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    color: var(--text-high-contrast);
    text-shadow: 0 0 15px rgba(255, 68, 68, 0.7);
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

/* Status Container */
#status-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 1000;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.status-label {
    font-size: 1rem;
}

.status-value {
    color: var(--text-high-contrast);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Controls Section */
.controls {
    background: var(--bg-medium);
    padding: 1rem;
    border-bottom: 2px solid var(--bg-light);
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

/* Filters Container */
.filters-container {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Search Box */
.search-box {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ff4444;
    border-radius: 8px;
    background: #000;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease;
}

.search-box:focus {
    outline: none;
    border-color: #ff6666;
    box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.2);
}

.search-box::placeholder {
    color: #888;
}

/* Filter Buttons */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    transition: all 0.3s ease;
    flex: 1;
}

.filters.hidden {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-bottom: 0;
}

.filter-btn {
    padding: 0.6rem 1rem; /* Reduced from 0.75rem 1.25rem (20% smaller) */
    border: 2px solid transparent;
    background: var(--bg-dark);
    color: var(--text-high-contrast);
    border-radius: 25px;
    font-size: 0.85rem; /* Reduced from 0.95rem (20% smaller) */
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    min-width: 64px; /* Reduced from 80px (20% smaller) */
    text-align: center;
    /* Remove default focus outline for better mobile experience */
    outline: none;
}

/* Filters Toggle Button */
.filters-toggle {
    background: var(--bg-dark);
    border: 2px solid var(--accent-red);
    color: var(--accent-red);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    outline: none;
}

.filters-toggle:hover {
    background: var(--accent-red);
    color: var(--text-high-contrast);
    transform: scale(1.1);
}

.filters-toggle.rotated {
    transform: rotate(90deg);
}

/* Day filter buttons */
.filter-btn[data-filter="day"] {
    border-color: var(--day-border);
    background: var(--day-bg);
    color: var(--day-color);
}



.filter-btn[data-filter="day"].active {
    background: var(--day-color);
    color: var(--text-high-contrast);
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.6);
    border-color: var(--day-color-active);
    transform: translateY(-2px);
}

/* Stage filter buttons */
.filter-btn[data-filter="stage"] {
    border-color: var(--stage-border);
    background: var(--stage-bg);
    color: var(--stage-color);
}



.filter-btn[data-filter="stage"].active {
    background: var(--stage-color);
    color: var(--text-high-contrast);
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.6);
    border-color: var(--stage-color-active);
    transform: translateY(-2px);
}

/* ==========================================================================
   Filter State Indicators
   ========================================================================== */



/* ==========================================================================
   Filter State Indicators
   ========================================================================== */

/* Visual indicator when no filters are selected */
.filters:has(.filter-btn:not(.active))::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    opacity: 0.6;
}



/* ==========================================================================
   Timetable Layout
   ========================================================================== */

.timetable {
    padding: 1rem;
}

.day-section {
    margin-bottom: 2rem;
}

.day-header {
    background: linear-gradient(135deg, var(--day-color), var(--day-color-hover));
    color: var(--text-high-contrast);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 900;
    font-size: 1.3rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    border: 2px solid var(--day-border);
    letter-spacing: 1px;
}

/* Stage Grid */
.stage-grid {
    display: grid;
    gap: 1rem;
}

.stage-column {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.stage-header {
    background: linear-gradient(135deg, var(--stage-color), var(--stage-color-hover));
    padding: 1rem;
    text-align: center;
    font-weight: 800;
    border-bottom: 3px solid var(--stage-border);
    font-size: 1.1rem;
    color: var(--text-high-contrast);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Time Slots & Shows
   ========================================================================== */

.time-slots {
    position: relative;
    min-height: 800px;
}

.time-slot {
    position: absolute;
    left: 0;
    right: 0;
    border-bottom: 1px solid #333;
    padding: 0.25rem;
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
}

/* Show Items */
.show-item {
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    background: linear-gradient(135deg, var(--band-bg), rgba(168, 85, 247, 0.2));
    color: var(--text-high-contrast);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(168, 85, 247, 0.3);
    border: 2px solid var(--band-border);
    backdrop-filter: blur(5px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.show-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.5);
    z-index: 5;
    border-color: var(--band-color-hover);
    background: linear-gradient(135deg, var(--band-color), var(--band-color-hover));
}

.show-item .band-name {
    font-weight: bold;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.show-item .time {
    font-size: 0.8rem;
    opacity: 0.8;
    line-height: 1.1;
}

/* Genre Tags */
.show-genres {
    margin-top: 0.25rem;
}

.show-genre-tag {
    background: var(--band-color);
    color: var(--text-high-contrast);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 0.3rem;
    display: inline-block;
    margin-bottom: 0.2rem;
    font-weight: 600;
    border: 1px solid var(--band-border);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 4px rgba(168, 85, 247, 0.3);
}

/* Short Show Variant */
.show-item.short-show {
    min-height: 40px;
    font-size: 0.8rem;
    padding: 0.3rem;
}

.show-item.short-show .band-name {
    font-size: 0.85rem;
    margin-bottom: 0.1rem;
    line-height: 1.1;
    gap: 0.2rem;
}

.show-item.short-show .band-name .group-favorite-star {
    font-size: 0.6em;
}

.show-item.short-show .time {
    font-size: 0.7rem;
    line-height: 1;
}

.show-item.short-show .show-genres {
    margin-top: 0.1rem;
}

.show-item.short-show .show-genre-tag {
    font-size: 0.6rem;
    padding: 0.05rem 0.2rem;
    margin-right: 0.1rem;
}



/* ==========================================================================
   Modal Components
   ========================================================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1a1a1a;
    border: 2px solid #ff4444;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 90%;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ff4444;
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-info {
    margin-bottom: 1rem;
}

.modal-info h3 {
    color: #ff4444;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.modal-info p {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.modal-info a {
    color: #ff6666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.modal-info a:hover {
    color: #ff8888;
    text-decoration: underline;
}

/* Genre Tags in Modal */
.genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.genre-tag {
    background: #ff4444;
    color: #000;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.genre-tag:hover {
    background: #ff6666;
}

/* Conflicts Section in Modal */
.conflicts-section {
    background: rgba(255, 68, 68, 0.1);
    border: 2px solid #ff4444;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.conflicts-section h3 {
    color: #ff4444;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.conflicts-section p {
    margin-bottom: 0.75rem;
    color: #e5e5e5;
    font-size: 0.9rem;
}

.conflicts-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.conflict-item {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid #ff6666;
    border-radius: 6px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.conflict-item strong {
    color: #ff6666;
    font-size: 1rem;
}

.conflict-stage {
    color: #cccccc;
    font-size: 0.85rem;
    font-style: italic;
}

.conflict-time {
    color: #ffaaaa;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.loading {
    text-align: center;
    padding: 2rem;
    color: #888;
    font-size: 1.1rem;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: #888;
    font-size: 1.1rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet and Desktop */
@media (min-width: 768px) {
    .stage-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .search-box {
        font-size: 1.1rem;
    }
    
    .filter-btn {
        font-size: 1rem;
        padding: 0.6rem 1.2rem;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) {
    .stage-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Large Screens */
@media (min-width: 1200px) {
    .timetable {
        padding: 1.5rem;
    }
    
    .stage-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .modal-content {
        max-width: 70%;
    }
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    .header h1 {
        font-size: 1.4rem;
        text-shadow: 0 0 20px rgba(255, 68, 68, 0.8);
    }
    
    #status-container {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 0.75rem;
        bottom: 5px;
        right: 5px;
    }
    
    .status-item {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        font-size: 0.8rem; /* Reduced from 0.9rem (20% smaller) */
        padding: 0.6rem 1rem; /* Reduced from 0.8rem 1.2rem (20% smaller) */
        min-width: 72px; /* Reduced from 90px (20% smaller) */
        font-weight: 700;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    }
    
    .filters-toggle {
        width: 28px; /* Slightly smaller on mobile */
        height: 28px;
        font-size: 0.7rem;
    }
    
    .day-header {
        font-size: 1.2rem;
        padding: 1rem;
        text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
    }
    
    .stage-header {
        font-size: 1rem;
        padding: 0.8rem;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    }
    
    .show-item {
        font-size: 0.9rem;
        padding: 0.6rem;
        border-width: 3px;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    }
    
    .show-item .band-name {
        font-weight: 700;
        font-size: 1rem;
        gap: 0.3rem;
    }
    
    .show-item .band-name .group-favorite-star {
        font-size: 0.7em;
    }
    
    .show-item .time {
        font-size: 0.85rem;
        font-weight: 600;
    }
    
    .show-genre-tag {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
        font-weight: 700;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    }
    
    .modal-content {
        padding: 1.5rem;
        max-width: 95%;
    }
    
    .modal-title {
        font-size: 1.3rem;
        font-weight: 900;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .header,
    .controls {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .show-item {
        background: #f0f0f0;
        color: black;
        border: 1px solid #ccc;
    }
    
    .day-header {
        background: #333;
        color: white;
    }
    
    .stage-header {
        background: #555;
        color: white;
    }
}

/* ==========================================================================
   PWA Specific Styles
   ========================================================================== */

/* Prevent text selection on mobile */
* {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow text selection in modals */
.modal-content {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}



/* Splash screen for PWA */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.splash-screen.hide {
    opacity: 0;
    pointer-events: none;
}

.splash-screen .logo {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.splash-screen .loading-text {
    color: #ff4444;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Loading animation */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Offline indicator */
.offline-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #f44336;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1000;
    opacity: 0.8;
}

/* Touch-friendly improvements */
@media (max-width: 767px) {
    .filter-btn {
        min-height: 36px; /* Reduced from 44px (20% smaller) */
        min-width: 36px; /* Reduced from 44px (20% smaller) */
        /* Enhanced mobile styling for better touch feedback */
        border-width: 3px;
        font-weight: 700;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    }
    

    
    /* Make active state more prominent on mobile */
    .filter-btn[data-filter="day"].active {
        background: var(--day-color);
        color: var(--text-high-contrast);
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.8);
        border-color: var(--day-color-active);
        transform: translateY(-3px);
        opacity: 1;
        font-weight: 900;
    }
    
    .filter-btn[data-filter="stage"].active {
        background: var(--stage-color);
        color: var(--text-high-contrast);
        box-shadow: 0 0 20px rgba(78, 205, 196, 0.8);
        border-color: var(--stage-color-active);
        transform: translateY(-3px);
        opacity: 1;
        font-weight: 900;
    }
    
    .show-item {
        min-height: 44px;
    }
    
    .modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
}

/* Landscape orientation improvements */
@media (orientation: landscape) and (max-height: 500px) {
    .header {
        padding: 0.5rem;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
    
    .controls {
        padding: 0.5rem;
    }
    
    .filters {
        gap: 0.3rem;
    }
    
    .filter-btn {
        font-size: 0.7rem; /* Reduced from 0.8rem (20% smaller) */
        padding: 0.2rem 0.5rem; /* Reduced from 0.3rem 0.6rem (20% smaller) */
    }
}

/* ==========================================================================
   Favorites System Styles
   ========================================================================== */

/* Favorited band styling in timetable */
.show-item.favorited {
    border: 3px solid #ffd700;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4), 0 4px 8px rgba(168, 85, 247, 0.3);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), var(--band-bg));
}

.show-item.favorited:hover {
    border-color: #ffed4e;
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6), 0 8px 20px rgba(168, 85, 247, 0.5);
}

/* Group favorites star in timetable */
.band-name {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
}

.band-name .group-favorite-star {
    font-size: 0.8em;
    color: #ffd700;
    opacity: 0.8;
    text-shadow: 0 0 3px rgba(255, 215, 0, 0.5);
    flex-shrink: 0;
}

.star {
    cursor: pointer;
    font-size: 1.2em;
    margin-left: 10px;
    opacity: 0.5;
    transition: all 0.2s ease;
    user-select: none;
}

.star:hover {
    transform: scale(1.1);
}



/* Click animation for favorite-star */
#favorite-star:active {
    transform: scale(0.8);
    transition: transform 0.1s ease;
}

/* Add a subtle pulse animation for click feedback */
@keyframes starClick {
    0% { transform: scale(1); }
    50% { transform: scale(0.8); }
    100% { transform: scale(1); }
}

#favorite-star.clicked {
    animation: starClick 0.2s ease;
}

.star.filled {
    opacity: 1;
    color: #ffd700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.star.offline {
    opacity: 0.3;
    cursor: not-allowed !important;
    filter: grayscale(100%);
}

.star.offline:hover {
    opacity: 0.3;
    transform: none;
}

.modal-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: bold;
    color: #ff4444;
}

.modal-title span:first-child {
    flex: 1;
}

#favorites-list {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px solid #ff4444;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #fff;
}

#favorites-list strong {
    color: #ff4444;
} 