/**
 * Champion Dashboard CSS
 * Dedicated stylesheet for champ_dashboard.php
 * Maintains visual consistency with fan_requests.php
 * Mobile-first responsive design with enhanced interactivity
 */

/* ==========================================
   BASE STYLES & VARIABLES
   ========================================== */

:root {
    /* Color Palette */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #4c63d4;
    
    /* Status Colors */
    --status-pending: #ff6b35;
    --status-pending-bg: rgba(255, 107, 53, 0.1);
    --status-responded: #28a745;
    --status-responded-bg: rgba(40, 167, 69, 0.1);
    
    /* Neutral Colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(102, 126, 234, 0.15);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 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;
    --font-size-3xl: 1.875rem;
}

/* ==========================================
   GLOBAL STYLES
   ========================================== */

* {
    box-sizing: border-box;
}

.dashboard-page {
    font-family: var(--font-family);
    background: var(--primary-gradient);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   TOP BAR STYLES (KEEP EXISTING DESIGN)
   ========================================== */

.topbar {
    background: var(--bg-secondary);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.menu-btn {
    background: #fff;
    color: #111;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 16px;
    padding: 8px 22px;
    border: none;
    margin-right: 4px;
    transition: background 0.2s, color 0.2s;
    font-family: var(--font-family);
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.menu-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.menu-btn.selected,
.menu-btn:focus {
    background: #111;
    color: #fff;
}

.menu-btn:active {
    transform: translateY(0);
}

/* ==========================================
   MAIN CONTENT LAYOUT
   ========================================== */

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

/* Section Management */
.section-hidden {
    display: none !important;
}

/* ==========================================
   SECTION TITLES
   ========================================== */

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.subsection-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-lg);
    margin-top: var(--spacing-2xl);
}

.refresh-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

/* ==========================================
   REQUEST CARDS (MATCHING FAN_REQUESTS.PHP)
   ========================================== */

.requests-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.request-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition-normal);
    overflow: hidden;
    position: relative;
}

.request-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.request-card.expanded {
    box-shadow: var(--shadow-lg);
}

/* Request Card Header */
.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    cursor: pointer;
    user-select: none;
    background: var(--bg-secondary);
    transition: background-color var(--transition-fast);
    position: relative;
}

.request-header:hover {
    background: var(--bg-tertiary);
}

.request-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--spacing-lg);
    right: var(--spacing-lg);
    height: 1px;
    background: var(--border-light);
    transition: opacity var(--transition-fast);
}

.request-card.expanded .request-header::after {
    opacity: 1;
}

.request-info {
    flex: 1;
    min-width: 0;
}

.fan-name {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
    line-height: 1.4;
}

.fan-email {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 400;
}

.request-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-shrink: 0;
}

.request-date {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-weight: 400;
}

/* Status Badges */
.request-status {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-pending {
    background: var(--status-pending-bg);
    color: var(--status-pending);
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.status-responded {
    background: var(--status-responded-bg);
    color: var(--status-responded);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.expand-icon {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    transition: transform var(--transition-normal);
    margin-left: var(--spacing-sm);
}

.request-card.expanded .expand-icon {
    transform: rotate(180deg);
}

/* Request Content */
.request-content {
    border-top: 1px solid var(--border-light);
    background: var(--bg-tertiary);
}

.fan-request-section,
.champion-response-section,
.response-upload-section {
    padding: var(--spacing-lg);
}

.fan-request-section h4,
.champion-response-section h4,
.response-upload-section h4 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-md) 0;
}

.request-question {
    background: var(--bg-secondary);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
    margin-bottom: var(--spacing-lg);
}

.request-question p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
}

.request-videos-section {
    margin-top: var(--spacing-lg);
}

.request-videos-section h4 {
    margin-bottom: var(--spacing-md);
}

/* Response Section */
.response-date {
    color: var(--status-responded);
    font-weight: 500;
    padding: var(--spacing-md);
    background: var(--status-responded-bg);
    border-radius: var(--radius-md);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

/* ==========================================
   RESPONSE UPLOAD FORM
   ========================================== */

.response-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.file-upload-container {
    position: relative;
}

.file-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 500;
    color: var(--text-secondary);
    min-height: 80px;
}

.file-upload-label:hover {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.submit-response-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: all var(--transition-normal);
    align-self: flex-start;
}

.submit-response-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

.submit-response-btn:active {
    transform: translateY(0);
}

/* Upload Progress */
.upload-progress {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    transition: width var(--transition-normal);
    border-radius: var(--radius-sm);
}

.progress-text {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    text-align: center;
}

/* ==========================================
   NO REQUESTS STATE
   ========================================== */

.no-requests {
    text-align: center;
    padding: var(--spacing-2xl);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-color);
}

.no-requests-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.5;
}

.no-requests h3 {
    font-size: var(--font-size-xl);
    color: var(--text-primary);
    margin: 0 0 var(--spacing-sm) 0;
}

.no-requests p {
    color: var(--text-secondary);
    margin: 0;
}

/* ==========================================
   SHARE SECTION
   ========================================== */

.share-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.referral-link-container {
    background: var(--bg-secondary);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.referral-link-box {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.referral-link-box span {
    flex: 1;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    word-break: break-all;
}

.referral-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.referral-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.1);
}

.discrete-btn {
    background: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
}

.discrete-btn:hover {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

.share-btns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.share-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
}

.share-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==========================================
   PROFILE SECTION
   ========================================== */

.profile-section,
.media-section,
.settings-section {
    background: var(--bg-secondary);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: var(--spacing-xl);
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border-light);
}

.profile-info-row:last-child {
    border-bottom: none;
}

.profile-info-label {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 150px;
    flex-shrink: 0;
}

.profile-info-value {
    color: var(--text-secondary);
    text-align: right;
    flex: 1;
}

.bio-value {
    text-align: left;
    line-height: 1.6;
}

/* Toggle Switch */
.debug-switch-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.debug-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.debug-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.debug-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-tertiary);
    transition: var(--transition-normal);
    border-radius: 24px;
    border: 1px solid var(--border-color);
}

.debug-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: var(--transition-normal);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

input:checked + .debug-slider {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
}

input:checked + .debug-slider:before {
    transform: translateX(26px);
}

.debug-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* ==========================================
   REFERRAL SECTION
   ========================================== */

.referral-section {
    background: var(--bg-secondary);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: var(--spacing-xl);
}

.referral-description {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin: var(--spacing-md) 0 0 0;
    line-height: 1.5;
}

.earnings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.earnings-card {
    background: var(--bg-tertiary);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.earnings-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

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

.earnings-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.earnings-icon {
    font-size: var(--font-size-xl);
}

.earnings-stats {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

.summary-card {
    background: var(--primary-gradient);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    color: white;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.summary-item:last-child {
    margin-bottom: 0;
}

.summary-label {
    font-size: var(--font-size-sm);
    opacity: 0.9;
}

.summary-value {
    font-weight: 600;
    font-size: var(--font-size-lg);
}

.summary-value.highlight {
    font-size: var(--font-size-xl);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   MEDIA CAROUSEL STYLES
   ========================================== */

/* Media Carousel - Modern TikTok-style */
.media-carousel {
    position: relative;
    width: 100%;
    margin: 20px 0;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    padding: 0 50px; /* Space for navigation buttons */
}

.carousel-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer/Edge */
}

.carousel-track::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.carousel-item {
    flex: 0 0 auto;
    width: 160px;
    height: 280px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.carousel-item img,
.carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

.carousel-item video {
    pointer-events: none; /* Prevent video controls in carousel */
}

/* Media overlay for videos */
.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    pointer-events: none;
}

/* Play button for videos */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.play-button:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Media category badges */
.media-category {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.media-category.video {
    background: rgba(255, 59, 48, 0.9);
    color: white;
}

.media-category.photo {
    background: rgba(52, 199, 89, 0.9);
    color: white;
}

.media-category.joke {
    background: rgba(255, 204, 0, 0.9);
    color: #333;
}

.media-category.other {
    background: rgba(88, 86, 214, 0.9);
    color: white;
}

.media-category.pep-talk {
    background: rgba(255, 149, 0, 0.9);
    color: white;
}

/* Media title */
.media-title {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    color: white;
    font-size: 11px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
}

/* Carousel Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(103, 126, 234, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.carousel-btn:hover {
    background: white;
    border-color: var(--primary-color);
    color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: translateY(-50%) scale(1.05);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.7);
}

.carousel-btn:disabled:hover {
    transform: translateY(-50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

/* Media Gallery (grid layout) */
.media-gallery {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.media-thumb {
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid var(--border-color);
    width: 140px;
    height: 140px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.media-thumb:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.media-thumb img,
.media-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Media Modal */
.media-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.media-modal-content {
    position: relative;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.media-modal.modal-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-modal.modal-open .media-modal-content {
    animation: bounceIn 0.5s ease-out;
}

.media-modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #666;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color var(--transition-fast);
}

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

#media-modal-body img,
#media-modal-body video {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Loading state for carousel items */
.carousel-item.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Media Carousel Section */
.media-carousel-section {
    margin: var(--spacing-xl) 0;
}

.media-section-group {
    margin-bottom: var(--spacing-xl);
}

.media-section-title {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-lg);
    font-weight: 600;
}

/* Hover effects for better interactivity */
.carousel-item:hover .media-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
}

.carousel-item:hover .play-button {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Smooth carousel track scrolling */
.carousel-track {
    scroll-snap-type: x mandatory;
}

.carousel-item {
    scroll-snap-align: start;
}

/* Fix for image loading and display issues */
.carousel-item img {
    background: white;
    transition: opacity 0.3s ease;
}

.carousel-item img[src=""],
.carousel-item img:not([src]) {
    opacity: 0;
}

/* Responsive carousel adjustments */
@media (max-width: 768px) {
    .carousel-container {
        padding: 0 30px; /* Smaller padding on mobile */
    }
    
    .carousel-item {
        width: 140px;
        height: 240px;
    }
    
    .carousel-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
    
    .media-category {
        font-size: 8px;
        padding: 3px 6px;
    }
    
    .media-title {
        font-size: 11px;
    }
    
    .play-button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .carousel-item {
        width: 120px;
        height: 200px;
    }
    
    .carousel-track {
        gap: 12px;
    }
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 1000px;
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        max-height: 1000px;
        opacity: 1;
    }
    to {
        max-height: 0;
        opacity: 0;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply animations */
.request-content {
    animation: slideDown var(--transition-slow) ease-in-out;
}

.request-card {
    animation: fadeIn var(--transition-normal) ease-out;
}

.earnings-card,
.share-btn,
.referral-btn {
    animation: bounceIn var(--transition-slow) ease-out;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* Mobile First - Base styles are for mobile */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .main-content {
        padding: var(--spacing-xl);
    }
    
    .request-meta {
        gap: var(--spacing-lg);
    }
    
    .fan-name {
        font-size: var(--font-size-xl);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .topbar-left {
        gap: var(--spacing-md);
    }
    
    .section-title {
        font-size: var(--font-size-3xl);
    }
    
    .profile-info-row {
        align-items: center;
    }
    
    .profile-info-value {
        text-align: right;
    }
    
    .share-btns {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .main-content {
        padding: var(--spacing-2xl);
    }
    
    .earnings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .share-btns {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .request-header {
        padding: var(--spacing-xl);
    }
    
    .fan-request-section,
    .champion-response-section,
    .response-upload-section {
        padding: var(--spacing-xl);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .main-content {
        max-width: 1400px;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

/* Focus styles for keyboard navigation */
.menu-btn:focus,
.refresh-btn:focus,
.referral-btn:focus,
.share-btn:focus,
.submit-response-btn:focus,
.file-upload-label:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --border-light: #333333;
        --text-secondary: #000000;
        --text-muted: #333333;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    .topbar,
    .refresh-btn,
    .response-upload-section,
    .share-links {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
        max-width: none;
    }
    
    .request-card {
        box-shadow: none;
        border: 1px solid #000;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .request-content {
        display: block !important;
    }
}
