/* Arts Action Festival - Single Screen Compact Styles */
/* Version 4: All info visible, instant tabbing, 4 color schemes */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Scheme 1: The Stage (was Festival) */
    --stage-bg: #fe7700;
    --stage-accent: #ffaf01;
    --stage-text: #feffd9;
    
    /* Color Scheme 2: The Studio (was Stage) */
    --studio-bg: #17c569;
    --studio-accent: #2cf3a5;
    --studio-text: #fffac8;
    
    /* Color Scheme 3: The Mix (was Studio) */
    --mix-bg: #9c3538;
    --mix-accent: #d06c6e;
    --mix-text: #b2cbfa;
    
    /* Color Scheme 4: The Lab (new theme) */
    --lab-bg: #00878b;
    --lab-accent: #5bbab4;
    --lab-text: #ffffffe5;
    
    /* Color Scheme 5: More (was Lab, keeping orange) */
    --more-bg: #882bad;
    --more-accent: #ffaf01;
    --more-text: #ffffff;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

body {
    font-family: var(--font-family);
    background: var(--stage-bg);
    color: var(--stage-text);
    line-height: 1.4;
    overflow-x: hidden;
    height: 100vh;
}

/* App Container - Single Screen */
.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--stage-bg);
    transition: background var(--transition-normal);
    overflow: hidden; /* Prevent main container scrolling */
}

/* Header */
.app-header {
    position: relative;
    padding: var(--spacing-lg);
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid currentColor;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-qr {
    position: absolute;
    left: var(--spacing-lg);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 10;
    cursor: pointer;
}

.header-qr:hover {
    transform: translateY(-50%) translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.header-tickets-btn {
    position: absolute;
    right: var(--spacing-lg);
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    z-index: 10;
}

.header-tickets-btn:hover {
    transform: translateY(-50%) translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.6);
    background: linear-gradient(135deg, #ff7a4a, #ffa726);
    color: white;
    text-decoration: none;
}

.header-tickets-btn:active {
    transform: translateY(-50%);
}

.sibling-logo {
    height: 80px;
    width: auto;
    opacity: 0.9;
}

.festival-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin: var(--spacing-sm) 0;
    text-align: center;
}

.current-time {
    background: rgba(255, 255, 255, 0.2);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab-nav::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    color: currentColor;
    padding: var(--spacing-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    opacity: 0.7;
    position: relative;
}

.tab-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: currentColor;
}

.tab-icon {
    font-size: var(--font-size-lg);
}

.tab-label {
    font-size: var(--font-size-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

.tab-content {
    display: none;
    padding: var(--spacing-lg);
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.tab-content.active {
    display: flex !important;
    flex-direction: column;
}

/* Force sub-tab content to be visible - ULTRA AGGRESSIVE */
#content-More .events-feed {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--spacing-sm) !important;
    max-width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#content-More .event-card {
    display: flex !important;
    flex-direction: column !important;
    padding: var(--spacing-sm) var(--spacing-md) !important;
    min-height: 60px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: var(--radius-md) !important;
    cursor: pointer !important;
    transition: all var(--transition-fast) !important;
    backdrop-filter: blur(5px) !important;
    position: relative !important;
    overflow: hidden !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#content-More .link-card {
    display: flex !important;
    flex-direction: column !important;
    padding: var(--spacing-sm) var(--spacing-md) !important;
    min-height: 60px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: var(--radius-md) !important;
    cursor: pointer !important;
    transition: all var(--transition-fast) !important;
    backdrop-filter: blur(5px) !important;
    position: relative !important;
    overflow: hidden !important;
    text-decoration: none !important;
    color: inherit !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.about-list {
    padding-inline-start: 15px;
}

.stage-header {
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.stage-header h2 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.stage-header p {
    font-size: var(--font-size-sm);
    opacity: 0.8;
}

/* Events Feed - Compact Cards */
.events-feed {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-width: 100%;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: var(--spacing-lg);
}

.event-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transition: transform var(--transition-fast);
}

.event-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-card:hover::before {
    transform: scaleX(1);
}

.event-card.current {
    background: rgba(255, 255, 255, 0.2);
    border-color: currentColor;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3); }
    50% { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1); }
}

/* Three-Line Event Layout */
.event-card {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-sm) var(--spacing-md);
    min-height: 60px; /* Increased height for three lines */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
}

/* Link Cards (for Links sub-tab) */
.link-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.link-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.event-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-xs);
}

.event-time-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex: 1;
    min-width: 0;
}

.event-time {
    background: currentColor; /* Inverted color */
    color: var(--stage-bg); /* Background color of the current stage */
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0; /* Prevent shrinking */
}

.event-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.event-type {
    background: rgba(255, 255, 255, 0.2);
    color: currentColor;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.event-artist {
    font-size: var(--font-size-xs);
    font-style: italic;
    opacity: 0.8;
    margin-bottom: var(--spacing-xs);
    margin-left: calc(var(--spacing-sm) + 3.1rem); /* Another slight nudge */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-description {
    font-size: var(--font-size-xs);
    opacity: 0.7;
    line-height: 1.3;
    margin-left: calc(var(--spacing-sm) + 3.1rem); /* Another slight nudge */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Duration Widget */
.event-duration {
    position: absolute;
    bottom: 8px;
    left: calc(var(--spacing-sm) + 3.1rem - 50px);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    font-weight: 600;
    pointer-events: none;
}

/* Studio page - whiter duration widgets */
.studio-theme .event-duration {
    color: rgba(255, 255, 255, 0.8);
}

.stall-card .event-artist, .stall-card .event-description {
    margin-left: calc(var(--spacing-sm) + 4rem)
}

/* Sub-tab Navigation */
.subtab-nav {
    display: flex;
    width: 100%;
    margin: var(--spacing-md) 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.subtab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    color: currentColor;
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.subtab-btn:last-child {
    border-right: none;
}

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

.subtab-btn.active {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.subtab-label {
    display: block;
    text-align: center;
}

/* About Tab Content */
.about-content {
    margin-top: var(--spacing-md);
    padding: var(--spacing-lg);
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: var(--spacing-lg);
}

.about-content h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: currentColor;
}

.about-content p {
    font-size: var(--font-size-sm);
    line-height: 1.5;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
}

.about-content h3:last-of-type {
    margin-top: var(--spacing-lg);
}

.about-content p:last-of-type {
    margin-bottom: 0;
}

/* Floorplan Section */
.floorplan-section {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
}

.floorplan-header {
    text-align: center;
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: currentColor;
}

.floorplan-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 3rem;
}

/* Color Scheme Classes with Background Textures */
.stage-theme {
    background: var(--stage-bg) url('assets/texture-action.png');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    color: var(--stage-text);
}

.stage-theme .event-time {
    color: var(--stage-bg);
    background: var(--stage-text);
}

.studio-theme {
    background: var(--studio-bg) url('assets/texture-voices.png');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    color: var(--studio-text);
}

.studio-theme .event-time {
    color: var(--studio-bg);
    background: var(--studio-text);
}

.mix-theme {
    background: var(--mix-bg) url('assets/texture-story.png');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    color: var(--mix-text);
}

.mix-theme .event-time {
    color: var(--mix-bg);
    background: var(--mix-text);
}

.lab-theme {
    background: var(--lab-bg) url('assets/texture-journey.png');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    color: var(--lab-text);
}

.lab-theme .event-time {
    color: var(--lab-bg);
    background: var(--lab-text);
}

.more-theme {
    background: var(--more-bg) url('assets/texture-action.png');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    color: var(--more-text);
}

.more-theme .event-time {
    color: var(--more-bg);
    background: var(--more-text);
}


/* Responsive Design */
@media (max-width: 768px) {
    .app-header {
        padding: var(--spacing-md);
        min-height: 100px;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .header-qr {
        position: absolute;
        left: var(--spacing-md);
        top: 50%;
        transform: translateY(-50%);
        padding: 6px;
    }
    
    .qr-image {
        width: 30px;
        height: 30px;
    }
    
    .qr-text {
        font-size: 9px;
    }
    
    .header-center {
        padding: 0;
    }
    
    .sibling-logo {
        height: 70px;
    }
    
    .festival-title {
        font-size: var(--font-size-lg);
        margin: var(--spacing-xs) 0;
    }
    
    .current-time {
        font-size: var(--font-size-xs);
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    .header-tickets-btn {
        position: absolute;
        right: var(--spacing-md);
        top: 50%;
        transform: translateY(-50%);
        padding: 10px 16px;
        font-size: 13px;
        min-width: 100px;
    }
    
    .tab-btn {
        padding: var(--spacing-sm);
    }
    
    .tab-icon {
        font-size: var(--font-size-base);
    }
    
    .tab-label {
        font-size: 0.65rem;
    }
    
    .main-content {
        padding: var(--spacing-md);
    }
    
    .event-card {
        padding: var(--spacing-sm);
    }
    
    .event-title {
        font-size: var(--font-size-sm);
    }
    
    .event-artist {
        font-size: var(--font-size-xs);
    }
    
    .event-description {
        font-size: var(--font-size-xs);
    }
    
    .event-duration {
        font-size: 0.7rem;
        bottom: 6px;
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: var(--spacing-sm);
        min-height: 80px;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .header-qr {
        position: absolute;
        left: var(--spacing-sm);
        top: 50%;
        transform: translateY(-50%);
        padding: 5px;
    }
    
    .qr-image {
        width: 20px;
        height: 20px;
    }
    
    .qr-text {
        font-size: 7px;
    }
    
    .sibling-logo {
        height: 60px;
    }
    
    .festival-title {
        font-size: var(--font-size-base);
    }
    
    .header-tickets-btn {
        position: absolute;
        right: var(--spacing-sm);
        top: 50%;
        transform: translateY(-50%);
        padding: 8px 12px;
        font-size: 12px;
        min-width: 90px;
    }
    
    .tab-nav {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        min-width: 60px;
    }
    
    .event-duration {
        font-size: 0.65rem;
        bottom: 5px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .event-card {
        border-width: 2px;
    }
    
    .tab-btn.active::after {
        height: 4px;
    }
}

/* QR Image and Text Styling */
.qr-image {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.qr-text {
    color: #333;
    font-size: 10px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* QR Modal Styles */
.qr-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.qr-modal-content {
    position: absolute;
    background-color: white;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0;
    border-radius: 20px;
    width: 80%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.qr-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s ease;
}

.qr-modal-close:hover {
    color: #333;
}

.qr-modal-body {
    padding: 40px 30px 30px;
    text-align: center;
}

.qr-modal-image {
    width: 200px;
    height: 200px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.qr-modal-body h3 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #333;
    font-weight: 600;
}

.qr-modal-body p {
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.4;
}

/* Mobile adjustments for modal */
@media (max-width: 768px) {
    .qr-modal-content {
        width: 90%;
    }
    
    .qr-modal-body {
        padding: 30px 20px 25px;
    }
    
    .qr-modal-image {
        width: 180px;
        height: 180px;
    }
    
    .qr-modal-body h3 {
        font-size: 20px;
    }
    
    .qr-modal-body p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .qr-modal-content {
        width: 95%;
    }
    
    .qr-modal-body {
        padding: 25px 15px 20px;
    }
    
    .qr-modal-image {
        width: 160px;
        height: 160px;
    }
    
    .qr-modal-body h3 {
        font-size: 18px;
    }
    
    .qr-modal-body p {
        font-size: 13px;
    }
}