/* ===== MOBILE RESPONSIVE STYLES ===== */

/* Mobile-first adjustments */
@media (max-width: 768px) {
    /* Reduce canvas particle count on mobile (handled in JS) */

    /* Adjust page layout for mobile */
    .page-wrap {
        padding: 20px 16px;
    }

    .linktree-card {
        padding: 28px 20px 32px;
        max-width: 100%;
        margin: 0 auto;
    }

    /* Avatar sizing for mobile */
    .avatar-wrap {
        width: 100px;
        height: 100px;
        margin: 0 auto 18px;
    }

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

    /* Reduce Runic Blade size on mobile */
    .avatar-wrap::before {
        font-size: 80px;
    }

    /* Profile header text sizing */
    .username {
        font-size: 26px;
    }

    .subtitle {
        font-size: 14px;
    }

    /* Link buttons - better touch targets */
    .link-btn {
        padding: 16px 20px;
        font-size: 15px;
        min-height: 56px;
        /* Minimum touch target size */
    }

    .link-btn .icon-svg {
        width: 22px;
        height: 22px;
    }

    /* Top action buttons */
    .icon-btn {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    /* Broken Wings Counter - smaller on mobile */
    .broken-wings-counter {
        top: 10px;
        gap: 10px;
    }

    .broken-wings-counter .wing {
        font-size: 24px;
    }

    /* Reduce cursor trail effect on mobile */
    #interaction-canvas {
        opacity: 0.7;
    }

    /* Footer text */
    .footer p {
        font-size: 13px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .page-wrap {
        padding: 16px 12px;
    }

    .linktree-card {
        padding: 24px 16px 28px;
    }

    .username {
        font-size: 24px;
    }

    .subtitle {
        font-size: 13px;
    }

    .link-btn {
        padding: 14px 18px;
        font-size: 14px;
    }

    /* Smaller avatar on very small screens */
    .avatar-wrap {
        width: 90px;
        height: 90px;
    }

    .avatar {
        width: 90px;
        height: 90px;
    }

    .avatar-wrap::before {
        font-size: 70px;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .page-wrap {
        padding: 12px 16px;
    }

    .linktree-card {
        padding: 20px 24px;
    }

    .avatar-wrap {
        width: 80px;
        height: 80px;
        margin-bottom: 12px;
    }

    .avatar {
        width: 80px;
        height: 80px;
    }

    .username {
        font-size: 22px;
        margin-bottom: 4px;
    }

    .subtitle {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .link-btn {
        padding: 12px 16px;
        margin-bottom: 10px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {

    /* Disable hover effects that don't work well on touch */
    .avatar-wrap::before {
        display: none;
    }

    /* Make buttons more responsive to touch */
    .link-btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    .icon-btn:active {
        transform: scale(0.95);
    }

    /* Reduce Wind Aura on touch devices */
    .link-btn::after {
        display: none;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    /* Sharper rendering for retina displays */
    .avatar {
        image-rendering: -webkit-optimize-contrast;
    }

    .icon-svg {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    /* Disable canvas animations */
    #effects-canvas,
    #bg-canvas,
    #interaction-canvas {
        display: none;
    }
}