﻿/* ============================================
   Общие стили для GoodCube
   ============================================ */

body {
    background-color: #0f0f0f;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}

/* Стеклянные эффекты */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-orange {
    background: rgba(234, 88, 12, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(234, 88, 12, 0.3);
}

/* Градиентные тексты */
.text-gradient {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Анимации */
.hover-scale {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(234, 88, 12, 0.3);
}

/* Minecraft паттерн фона */
.minecraft-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
    background-size: 20px 20px;
}

/* Анимация премиум-блоков */
.premium {
    animation: premiumGlow 2s infinite alternate;
}

@keyframes premiumGlow {
    0% {
        box-shadow: 0 0 10px #ea580c;
    }
    100% {
        box-shadow: 0 0 35px #f97316;
    }
}

/* Ползунок для валюты */
input[type=range] {
    -webkit-appearance: none;
    height: 8px;
    background: rgba(234, 88, 12, 0.2);
    border-radius: 5px;
    background-image: linear-gradient(to right, #f97316, #ea580c);
    background-size: 0% 100%;
    background-repeat: no-repeat;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #f97316;
    cursor: pointer;
    box-shadow: 0 0 10px #f97316;
    transition: all 0.2s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #fb923c;
}

/* Стили для числовых полей */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    opacity: 1;
    height: 24px;
    background: #f97316;
}

/* Частицы */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
/* ============================================
   Мобильная адаптация
   ============================================ */

/* Базовые стили */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Мобильное меню */
@media (max-width: 768px) {
    /* Навигация */
    nav .hidden.md\\:flex {
        display: none !important;
    }

    /* Герой секция */
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.3 !important;
    }

    /* Карточки привилегий */
    .grid {
        gap: 1rem !important;
    }

    .glass.rounded-3xl {
        padding: 1.25rem !important;
    }

    /* Кнопки */
    .px-8 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .py-4 {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    /* Модальные окна */
    .max-w-lg {
        margin: 1rem !important;
        width: calc(100% - 2rem) !important;
        max-width: none !important;
    }

    .p-8 {
        padding: 1.25rem !important;
    }

    /* Поля ввода */
    input, button {
        font-size: 16px !important; /* Предотвращает масштабирование на iOS */
    }

    /* Ползунок валюты */
    input[type="range"] {
        height: 44px !important;
        padding: 12px 0 !important;
    }

    /* Кнопки в модалке */
    .space-y-4 > div, .space-y-4 > a {
        padding: 0.75rem !important;
    }

    .w-12.h-12 {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }

    /* Текст */
    .text-4xl {
        font-size: 1.75rem !important;
    }

    .text-5xl {
        font-size: 2rem !important;
    }

    .rule-title {
        font-size: 1.5rem !important;
    }

    /* Коммиты */
    .commit-item .flex.items-start {
        flex-direction: column !important;
    }

    .commit-item img {
        width: 2rem !important;
        height: 2rem !important;
        margin-bottom: 0.5rem !important;
    }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .hero-title {
        font-size: 3rem !important;
    }
}

/* Мобильное меню (бургер) - добавим в HTML */
.mobile-menu-btn {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .mobile-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(15, 15, 15, 0.98);
        backdrop-filter: blur(20px);
        z-index: 100;
        transition: right 0.3s ease;
        padding: 5rem 1.5rem;
        border-left: 1px solid rgba(249, 115, 22, 0.3);
    }

    .mobile-menu.active {
        right: 0;
    }

    .mobile-menu a {
        display: block;
        padding: 1rem 0;
        font-size: 1.125rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 99;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* Улучшение тач-целей */
button,
a,
[onclick] {
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
}

/* Фикс для модальных окон на мобильных */
@media (max-width: 768px) {
    .fixed.inset-0 {
        overflow-y: auto !important;
    }

    .fixed.inset-0 > div:last-child {
        align-items: flex-start !important;
        padding-top: 2rem !important;
    }
}
/* Мобильное меню - по умолчанию скрыто */
.mobile-menu-btn {
    display: none;
}

.mobile-menu,
.mobile-menu-overlay {
    display: none;
}

/* Только на мобильных */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .mobile-menu {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(15, 15, 15, 0.98);
        backdrop-filter: blur(20px);
        z-index: 100;
        transition: right 0.3s ease;
        padding: 5rem 1.5rem;
        border-left: 1px solid rgba(249, 115, 22, 0.3);
    }

    .mobile-menu.active {
        right: 0;
    }

    .mobile-menu-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 99;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}
/* Исправление навигации */
nav .flex.items-center {
    align-items: center !important;
}

nav a, nav button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

nav .text-2xl {
    line-height: 1;
}

/* Для мобильных */
@media (max-width: 768px) {
    nav .hidden.md\\:flex {
        display: flex !important;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    nav .gap-8 {
        gap: 0.75rem !important;
    }

    nav a, nav button {
        font-size: 0.875rem !important;
        padding: 0.5rem 0.75rem !important;
    }

    nav .px-6 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    nav .py-2 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
}