/* ================================================
   PREMIUM MOBILE RESPONSIVE FIXES
   Additional enhancements for mobile experience
   ================================================ */

/* ===== WORKSHOP SHOWCASE - KEEP ORIGINAL DESIGN ===== */
/* Don't override workshop showcase - it's fine as is */

/* ===== PROFILE CUSTOMIZATION HEADERS ===== */
.profile_customization_header {
    background: linear-gradient(135deg, rgba(102, 192, 244, 0.15), rgba(134, 80, 172, 0.15));
    border-bottom: 1px solid rgba(102, 192, 244, 0.3);
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.profile_customization_header:hover {
    background: linear-gradient(135deg, rgba(102, 192, 244, 0.25), rgba(134, 80, 172, 0.25));
}

/* ===== IMPORTANT LINKS ENHANCEMENTS ===== */
.important-link {
    position: relative;
    overflow: hidden;
}

.important-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.important-link:hover::before {
    left: 100%;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Tablets and below */
@media (max-width: 768px) {
    /* Workshop showcase - 4 columns */
    .workshop_grid_single_row {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .profile_customization_header {
        padding: 12px 16px;
        font-size: 15px;
    }

    /* Item showcases - 3 columns */
    .item_grid.full-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px;
    }

    /* Game grid - 2 columns */
    .game_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Profile customization blocks */
    .profile_customization_block {
        padding: 16px;
    }

    /* Archive button */
    .archive_profile_button {
        padding: 14px 24px;
        font-size: 15px;
        width: 100%;
        justify-content: center;
    }

    /* Level showcase */
    .level_badge_large .level_circle {
        width: 130px;
        height: 130px;
    }

    .level_number_large {
        font-size: 34px;
    }

    /* Hero content adjustments */
    .hero-content {
        padding: 20px;
    }

    /* Important links section */
    .important-links-section {
        padding: 30px 15px;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .section-header p {
        font-size: 15px;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    /* Workshop showcase - 3 columns on small screens */
    .workshop_grid_single_row {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .profile_customization_header {
        padding: 10px 14px;
        font-size: 14px;
        gap: 8px;
    }

    /* Item showcases - 3 columns */
    .item_grid.full-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px;
    }

    /* Game grid - 2 columns */
    .game_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Profile customization blocks */
    .profile_customization_block {
        padding: 14px;
    }

    /* Workshop header adjustments */
    .myworkshop_showcase_header {
        padding: 12px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .playerAvatar {
        margin: 0 auto;
    }

    .myworkshop_playerName {
        font-size: 15px;
    }

    /* Archive button */
    .archive_profile_button {
        padding: 12px 20px;
        font-size: 14px;
    }

    /* Level showcase */
    .level_badge_large .level_circle {
        width: 110px;
        height: 110px;
    }

    .level_number_large {
        font-size: 30px;
    }

    .level_stat_value {
        font-size: 22px;
    }

    .level_stat_label {
        font-size: 13px;
    }

    /* Hero content */
    .hero-content {
        padding: 16px;
    }

    .profile-info {
        margin: 15px 0;
    }

    /* Important links */
    .important-links-section {
        padding: 25px 10px;
    }

    .section-header h2 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .section-header p {
        font-size: 14px;
    }

    .link-stats {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 10px;
    }

    .stat-badge {
        font-size: 11px;
        padding: 4px 8px;
    }

    /* Content boxes */
    .content-box {
        border-radius: 12px;
    }

    .evidence-gallery {
        gap: 15px;
    }

    /* Timeline improvements */
    .timeline-box {
        padding: 15px;
    }

    .timeline-item {
        padding: 12px;
        font-size: 14px;
        border-radius: 8px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    /* Workshop - 3 columns minimum */
    .workshop_grid_single_row {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }

    /* Items - stay at 3 columns */
    .item_grid.full-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px;
    }

    /* Games - 2 columns */
    .game_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .profile_customization_header {
        padding: 9px 12px;
        font-size: 13px;
    }

    .profile_customization_block {
        padding: 12px;
    }

    /* Level showcase */
    .level_badge_large .level_circle {
        width: 100px;
        height: 100px;
    }

    .level_number_large {
        font-size: 26px;
    }

    /* Archive button */
    .archive_profile_button {
        padding: 11px 18px;
        font-size: 13px;
    }
}

/* ===== LANDSCAPE ORIENTATION FIXES ===== */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-header {
        padding: 15px 20px;
    }

    .avatar-section .avatar {
        width: 100px;
        height: 100px;
    }

    .avatar-img {
        width: 100px !important;
        height: 100px !important;
    }

    .avatar-frame {
        width: 120px !important;
        height: 120px !important;
    }

    .profile-info {
        margin: 10px 0;
    }

    .username {
        font-size: 22px;
    }

    .workshop_grid_single_row {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }

    .item_grid.full-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* ===== TOUCH OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    /* Larger tap targets */
    .showcase_item,
    .workshop_item,
    .game_link {
        min-height: 44px;
        min-width: 44px;
    }

    /* Disable hover effects that don't work on touch */
    .showcase_item:hover,
    .workshop_item:hover,
    .game_link:hover {
        transform: none;
    }

    /* Add active states for touch feedback */
    .showcase_item:active,
    .workshop_item:active,
    .game_link:active {
        opacity: 0.8;
        transform: scale(0.98);
    }

    /* Button touch improvements */
    .archive_profile_button,
    .cta-button,
    .important-link {
        min-height: 48px;
    }

    .cookie-btn {
        min-height: 48px;
    }

    .safety-alert-button {
        min-height: 52px;
    }
}

/* ===== HIGH RESOLUTION DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .workshop_item img,
    .showcase_item img,
    .game_img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }

    /* Sharper text rendering */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    /* Already dark, but enhance contrasts */
    .profile_customization_header {
        background: linear-gradient(135deg, rgba(102, 192, 244, 0.2), rgba(134, 80, 172, 0.2));
    }

    .showcase_item.workshop_item {
        background: rgba(0, 0, 0, 0.5);
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
@media (prefers-reduced-motion: reduce) {
    /* Disable animations for users who prefer reduced motion */
    .showcase_item,
    .workshop_item,
    .game_link,
    .important-link,
    .profile_customization_header {
        transition: opacity 0.2s ease;
    }

    .showcase_item::before,
    .important-link::before {
        display: none;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .social-media-bar-premium,
    .cookie-consent-banner,
    .safety-alert-banner,
    .safety-alert-overlay,
    .top-notice-bar {
        display: none !important;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }
}
