/* ========== ПЕРЕМЕННЫЕ ========== */
[data-theme="dark"] {
    --bg-body: #0d0f1a;
    --bg-card: rgba(20, 22, 36, 0.8);
    --bg-card-solid: #141624;
    --text-primary: #ffffff;
    --text-secondary: #b0b5d0;
    --accent: #f4a261;
    --accent-light: #e9c46a;
    --accent-gradient: linear-gradient(135deg, #f4a261, #e76f51);
    --border-color: rgba(244, 162, 97, 0.3);
    --card-shadow: 0 15px 30px rgba(0,0,0,0.4);
    --sand-gradient: linear-gradient(145deg, #1e1b2e, #0a0a14);
}
[data-theme="light"] {
    --bg-body: #fef9e8;
    --bg-card: rgba(255, 250, 235, 0.9);
    --bg-card-solid: #ffffff;
    --text-primary: #2c2b2a;
    --text-secondary: #6b5a4e;
    --accent: #e76f51;
    --accent-light: #f4a261;
    --accent-gradient: linear-gradient(135deg, #e76f51, #f4a261);
    --border-color: rgba(231, 111, 81, 0.25);
    --card-shadow: 0 15px 30px rgba(0,0,0,0.08);
    --sand-gradient: linear-gradient(145deg, #fff5e6, #faeedb);
}

.sandbox-showcase {
    position: relative;
    overflow-x: hidden;
    padding-bottom: 80px;
}

/* Hero-секция */
.sandbox-hero {
    position: relative;
    padding: 100px 20px 80px;
    text-align: center;
    overflow: hidden;
}
.sandbox-hero__content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    margin: 0 auto;
    animation: sandFloat 1s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
}
@keyframes sandFloat {
    from { opacity: 0; transform: translateY(40px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.sandbox-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px var(--accent));
    animation: iconGlow 2s infinite alternate;
}
@keyframes iconGlow {
    from { filter: drop-shadow(0 0 8px var(--accent)); }
    to { filter: drop-shadow(0 0 20px var(--accent-light)); }
}
.sandbox-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 20px;
}
.sandbox-title span {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}
.sandbox-description {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 30px;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 18px 25px;
    border-radius: 32px;
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
}
.sandbox-stats-hero {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}
.stat-item {
    font-size: 1rem;
    color: var(--text-secondary);
}
.stat-item span {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
    display: block;
}
.sandbox-cube {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(244,162,97,0.2);
    border: 1px solid var(--accent);
    transform: rotate(45deg);
    animation: cubeFloat 12s infinite linear;
    pointer-events: none;
}
.cube1 { top: 15%; left: 5%; animation-duration: 14s; width: 60px; height: 60px; }
.cube2 { bottom: 20%; right: 8%; animation-duration: 18s; width: 80px; height: 80px; }
.cube3 { top: 40%; right: 15%; animation-duration: 10s; width: 30px; height: 30px; }
.cube4 { bottom: 10%; left: 20%; animation-duration: 22s; width: 50px; height: 50px; }
@keyframes cubeFloat {
    0% { transform: rotate(45deg) translateY(0) translateX(0); opacity: 0.2; }
    50% { transform: rotate(45deg) translateY(-30px) translateX(20px); opacity: 0.6; }
    100% { transform: rotate(45deg) translateY(0) translateX(0); opacity: 0.2; }
}

/* Общие заголовки */
.section-header {
    text-align: center;
    margin: 60px 0 40px;
}
.section-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}
.section-line {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 12px auto 0;
}

/* Карточки особенностей */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.feature-card {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border-radius: 28px;
    padding: 30px 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}
.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 30px -10px rgba(0,0,0,0.2);
}
.feature-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
}
.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Мир */
.world-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}
.world-card {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border-radius: 32px;
    padding: 30px 40px;
    text-align: center;
    flex: 1;
    min-width: 180px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}
.world-card:hover {
    transform: scale(1.03);
    border-color: var(--accent);
}
.world-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
}
.world-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Моды */
.mods-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}
.mod-item {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    padding: 10px 24px;
    border-radius: 60px;
    font-weight: 600;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}
.mod-item:hover {
    transform: translateY(-4px) scale(1.05);
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 8px 18px rgba(244,162,97,0.3);
}

/* Звёзды и бабочки */
.stars-deco {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}
.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    width: 2px;
    height: 2px;
    opacity: 0.5;
    animation: twinkle 4s infinite;
}
@keyframes twinkle {
    0%,100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}
.butterflies-deco {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}
.butterfly {
    position: absolute;
    font-size: 28px;
    opacity: 0.6;
    animation: floatButterfly 25s linear infinite;
}
@keyframes floatButterfly {
    0% { transform: translate(-10%, 10%) rotate(0deg); opacity: 0; }
    10% { opacity: 0.7; }
    90% { opacity: 0.7; }
    100% { transform: translate(110%, -20%) rotate(360deg); opacity: 0; }
}
.toggle-butterflies-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--accent);
    border-radius: 40px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s;
}
.toggle-butterflies-btn:hover {
    background: var(--accent);
    color: white;
}

/* Скролл-анимация */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Адаптивность */
@media (max-width: 768px) {
    .sandbox-title { font-size: 2.2rem; }
    .sandbox-title span { font-size: 1rem; }
    .sandbox-description { font-size: 0.9rem; }
    .sandbox-stats-hero { gap: 20px; }
    .stat-item span { font-size: 1.2rem; }
    .section-header h2 { font-size: 1.8rem; }
    .features-grid { gap: 20px; }
    .world-card { padding: 20px; }
    .world-number { font-size: 2rem; }
}