/* ========================================
   灵魂安装器 - 响应式样式表
   Soul Installer Responsive Styles
   ======================================== */

/* === Small Mobile (≤375px) === */
@media screen and (max-width: 375px) {
    .home-title {
        font-size: 2rem;
        letter-spacing: 4px;
    }

    .home-subtitle {
        font-size: 0.85rem;
    }

    .objects-grid {
        gap: var(--space-sm);
    }

    .object-card {
        padding: var(--space-md) var(--space-sm);
    }

    .object-img-wrapper {
        max-width: 120px;
    }

    .install-object-display {
        width: 160px;
        height: 160px;
    }

    .climax-visual {
        width: 200px;
        height: 200px;
    }

    .climax-brand {
        font-size: 1.4rem;
    }

    .climax-line {
        font-size: 1.1rem;
    }

    .tech-grid {
        grid-template-columns: 1fr;
    }
}

/* === Regular Mobile (376px - 480px) === */
@media screen and (min-width: 376px) and (max-width: 480px) {
    .home-title {
        font-size: 2.4rem;
        letter-spacing: 6px;
    }

    .objects-grid {
        gap: var(--space-md);
    }

    .object-img-wrapper {
        max-width: 150px;
    }

    .install-object-display {
        width: 180px;
        height: 180px;
    }
}

/* === Tablet & Small Desktop (481px - 768px) === */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .home-title {
        font-size: 3rem;
    }

    .objects-grid {
        max-width: 500px;
        gap: var(--space-lg);
    }

    .object-img-wrapper {
        max-width: 200px;
    }

    .install-object-display {
        width: 250px;
        height: 250px;
    }

    .climax-visual {
        width: 320px;
        height: 320px;
    }
}

/* === Desktop (≥769px) === */
@media screen and (min-width: 769px) {
    .home-title {
        font-size: 3.2rem;
        letter-spacing: 10px;
    }

    .home-subtitle {
        font-size: 1.15rem;
    }

    .objects-grid {
        max-width: 700px;
        gap: var(--space-xl);
    }

    .object-card {
        padding: var(--space-xl) var(--space-lg);
    }

    .object-img-wrapper {
        max-width: 220px;
    }

    .object-card:hover {
        transform: translateY(-8px);
    }

    .install-object-display {
        width: 280px;
        height: 280px;
    }

    .install-info-card {
        padding: var(--space-2xl);
    }

    .climax-visual {
        width: 350px;
        height: 350px;
    }

    .climax-core {
        width: 120px;
        height: 120px;
    }

    .climax-brand {
        font-size: 2.2rem;
    }

    .climax-line {
        font-size: 1.6rem;
    }

    .tech-grid {
        gap: var(--space-lg);
    }

    .tech-item {
        padding: var(--space-2xl);
    }

    .poster-preview {
        max-width: 400px;
    }

    .interact-input-group {
        max-width: 450px;
    }
}

/* === Large Desktop (≥1200px) === */
@media screen and (min-width: 1200px) {
    .objects-grid {
        max-width: 800px;
    }

    .climax-visual {
        width: 400px;
        height: 400px;
    }
}

/* === Landscape Mobile === */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .home-container {
        padding-top: var(--space-md);
    }

    .home-header {
        margin-bottom: var(--space-md);
    }

    .home-title {
        font-size: 1.8rem;
    }

    .objects-grid {
        max-width: 100%;
    }

    .object-img-wrapper {
        max-width: 100px;
    }

    .object-card {
        padding: var(--space-sm);
    }

    .install-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .install-stage {
        flex-direction: row;
        gap: var(--space-md);
    }

    .install-object-display {
        width: 150px;
        height: 150px;
    }

    .climax-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--space-lg);
    }

    .climax-visual {
        width: 200px;
        height: 200px;
    }
}

/* === Dark mode preference (already dark, but ensure) === */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }
}

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

    .loading-chip .chip-ring {
        animation: none;
        opacity: 0.3;
    }
}

/* === High Contrast === */
@media (prefers-contrast: high) {
    .object-card {
        border-width: 2px;
    }

    .install-info-card {
        border-width: 2px;
    }

    .home-title {
        -webkit-text-fill-color: white;
        text-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
    }
}

/* === Print === */
@media print {
    .scene {
        position: relative;
        opacity: 1;
        visibility: visible;
        page-break-inside: avoid;
    }

    #particleCanvas,
    .sound-btn,
    .tech-btn {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}
