/**
 * Responsive Styles
 * Media Queries für alle Bildschirmgrößen
 * ========================================
 */

/* ===== Large Desktop (1280px+) ===== */
@media (min-width: 1280px) {
    .main-container {
        padding: var(--spacing-3xl) var(--spacing-xl);
    }

    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .social-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== Desktop (1024px - 1279px) ===== */
@media (min-width: 1024px) and (max-width: 1279px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .social-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Tablet (768px - 1023px) ===== */
@media (min-width: 768px) and (max-width: 1023px) {
    .main-container {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .profile-card {
        padding: var(--spacing-xl);
    }

    .avatar {
        width: 120px;
        height: 120px;
    }

    .profile-name {
        font-size: var(--text-2xl);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .social-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: var(--spacing-md);
    }

    .lightbox-next {
        right: var(--spacing-md);
    }
}

/* ===== Mobile Landscape (576px - 767px) ===== */
@media (min-width: 576px) and (max-width: 767px) {
    .main-container {
        padding: var(--spacing-lg) var(--spacing-md);
        gap: var(--spacing-xl);
    }

    .profile-card {
        padding: var(--spacing-lg);
    }

    .avatar {
        width: 100px;
        height: 100px;
    }

    .profile-name {
        font-size: var(--text-xl);
    }

    .profile-handle {
        font-size: var(--text-base);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .social-cards {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: var(--text-lg);
    }
}

/* ===== Mobile Portrait (max-width: 575px) ===== */
@media (max-width: 575px) {
    :root {
        --spacing-xs: 0.2rem;
        --spacing-sm: 0.4rem;
        --spacing-md: 0.75rem;
        --spacing-lg: 1.25rem;
        --spacing-xl: 1.5rem;
        --spacing-2xl: 2rem;
    }

    .main-container {
        padding: var(--spacing-md);
        gap: var(--spacing-xl);
    }

    /* Profile Section Mobile */
    .profile-section {
        padding-top: var(--spacing-md);
    }

    .profile-card {
        padding: var(--spacing-lg);
        border-radius: var(--radius-xl);
    }

    .avatar-container {
        margin-bottom: var(--spacing-md);
    }

    .avatar {
        width: 90px;
        height: 90px;
    }

    .avatar-ring {
        top: -4px;
        left: -4px;
        right: -4px;
        bottom: -4px;
    }

    .status-indicator {
        width: 16px;
        height: 16px;
        bottom: 5px;
        right: 5px;
    }

    .profile-name {
        font-size: var(--text-xl);
    }

    .profile-handle {
        font-size: var(--text-sm);
    }

    .profile-tags {
        gap: var(--spacing-xs);
    }

    .tag {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: var(--text-xs);
    }

    .profile-bio {
        padding: var(--spacing-sm);
    }

    .profile-bio p {
        font-size: var(--text-sm);
    }

    .profile-meta {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .meta-item {
        font-size: var(--text-xs);
    }

    /* Social Cards Mobile */
    .social-cards {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .social-card {
        padding: var(--spacing-md);
        border-radius: var(--radius-lg);
    }

    .social-avatar {
        width: 48px;
        height: 48px;
    }

    .social-name {
        font-size: var(--text-sm);
    }

    .social-handle {
        font-size: var(--text-xs);
    }

    .social-stats {
        font-size: var(--text-xs);
    }

    .social-icon {
        width: 36px;
        height: 36px;
        font-size: var(--text-lg);
    }

    /* Gallery Mobile */
    .gallery-filters {
        gap: var(--spacing-xs);
        margin-bottom: var(--spacing-md);
        overflow-x: auto;
        padding-bottom: var(--spacing-sm);
        -webkit-overflow-scrolling: touch;
    }

    .filter-btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: var(--text-xs);
        white-space: nowrap;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .gallery-item {
        border-radius: var(--radius-lg);
    }

    .gallery-overlay {
        padding: var(--spacing-sm);
    }

    .gallery-title {
        font-size: var(--text-sm);
    }

    .gallery-category {
        font-size: var(--text-xs);
    }

    .video-indicator {
        width: 32px;
        height: 32px;
        top: var(--spacing-sm);
        right: var(--spacing-sm);
        font-size: var(--text-sm);
    }

    /* Lightbox Mobile */
    .lightbox-close {
        width: 40px;
        height: 40px;
        top: var(--spacing-md);
        right: var(--spacing-md);
        font-size: var(--text-lg);
    }

    .lightbox-nav {
        width: 36px;
        height: 36px;
        font-size: var(--text-base);
    }

    .lightbox-prev {
        left: var(--spacing-sm);
    }

    .lightbox-next {
        right: var(--spacing-sm);
    }

    .lightbox-caption {
        font-size: var(--text-sm);
        padding: var(--spacing-xs) var(--spacing-md);
        max-width: 90%;
    }

    /* Music Player Mobile */
    .music-player {
        bottom: var(--spacing-md);
        right: var(--spacing-md);
    }

    .music-toggle {
        width: 48px;
        height: 48px;
        font-size: var(--text-lg);
    }

    .music-controls {
        min-width: 180px;
        padding: var(--spacing-sm);
    }

    #music-title {
        font-size: var(--text-xs);
    }

    #volume-slider {
        width: 80px;
    }

    /* Section Titles Mobile */
    .section-title {
        font-size: var(--text-base);
        margin-bottom: var(--spacing-md);
    }

    .section-title i {
        font-size: var(--text-sm);
    }

    /* Footer Mobile */
    .footer {
        padding: var(--spacing-lg) 0;
    }

    .footer p {
        font-size: var(--text-xs);
    }

    .footer-links {
        gap: var(--spacing-md);
    }

    .footer-link {
        font-size: var(--text-xs);
    }
}

/* ===== Extra Small Devices (max-width: 375px) ===== */
@media (max-width: 375px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .profile-tags {
        flex-direction: column;
        align-items: center;
    }

    .avatar {
        width: 80px;
        height: 80px;
    }
}

/* ===== Touch Devices ===== */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects on touch devices */
    .social-card:hover,
    .gallery-item:hover,
    .filter-btn:hover {
        transform: none;
    }

    /* Make touch targets larger */
    .filter-btn {
        min-height: 44px;
    }

    .social-card {
        min-height: 80px;
    }

    /* Show overlay on touch devices */
    .gallery-overlay {
        opacity: 1;
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.7) 0%,
            transparent 70%
        );
    }
}

/* ===== Landscape Orientation ===== */
@media (orientation: landscape) and (max-height: 500px) {
    .main-container {
        padding-top: var(--spacing-md);
    }

    .profile-section {
        padding-top: 0;
    }

    .profile-card {
        flex-direction: row;
        text-align: left;
        gap: var(--spacing-lg);
    }

    .avatar-container {
        margin-bottom: 0;
    }

    .profile-tags {
        justify-content: flex-start;
    }

    .lightbox-content {
        max-height: 80vh;
    }
}

/* ===== Print Styles ===== */
@media print {
    .custom-background,
    .particles,
    .music-player,
    .lightbox {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .profile-card,
    .social-card,
    .gallery-item {
        border: 1px solid #ccc;
        background: white;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}
