/* Общие стили для всех страниц Sharkproject */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1419 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Minecraft пиксельные блоки в фоне */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, rgba(102, 126, 234, 0.03) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(118, 75, 162, 0.03) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(102, 126, 234, 0.03) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(118, 75, 162, 0.03) 75%);
    background-size: 60px 60px;
    background-position: 0 0, 0 30px, 30px -30px, -30px 0px;
    pointer-events: none;
    z-index: 0;
}

/* Плавающие Minecraft блоки */
.mc-block {
    position: fixed;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    opacity: 0.1;
    animation: float-block 20s infinite ease-in-out;
    z-index: 0;
    border: 2px solid rgba(139, 92, 246, 0.3);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1);
}

@keyframes float-block {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(100px, -100px) rotate(90deg); }
    50% { transform: translate(200px, 50px) rotate(180deg); }
    75% { transform: translate(100px, 100px) rotate(270deg); }
}

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

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

/* Эффект наведения на карточки */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

/* Кнопки */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

/* Плавающая анимация */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Навигационные ссылки */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Плавное появление страницы */
body {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Дополнительные стили для новостей */
.news-content a {
    color: #667eea;
    text-decoration: underline;
}

.news-content a:hover {
    color: #764ba2;
}

.news-content h1,
.news-content h2,
.news-content h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.news-content ul,
.news-content ol {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.news-content p {
    margin-bottom: 0.5rem;
}

.news-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* Стили для форм */
input:focus,
textarea:focus,
select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

input.border-green-500 {
    border-color: #10b981 !important;
}

input.border-red-500 {
    border-color: #ef4444 !important;
}

/* Тени для повышенной глубины */
.shadow-glow {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}

.shadow-glow:hover {
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.4);
}

/* Minecraft-оформление форм (рамки, персонажи, мобы) */
.mc-form {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.mc-form::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border-width: 4px;
    border-style: solid;
    border-image-slice: 1;
    border-image-source: linear-gradient(90deg, #16a34a, #22c55e, #16a34a);
    opacity: 0.85;
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9);
}

.mc-form::after {
    content: '';
    position: absolute;
    inset: 0.35rem;
    border-radius: calc(1rem - 0.35rem);
    border: 2px solid rgba(15, 23, 42, 0.9);
    pointer-events: none;
}

.mc-form-characters {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mc-character {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 0.5rem;
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.7);
    overflow: hidden;
    animation: mc-character-float 4s ease-in-out infinite;
}

.mc-character:nth-child(2) {
    animation-delay: 0.9s;
}

.mc-character--player {
    background: #c58c85;
}

.mc-character--player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 42%;
    background: #2563eb;
}

.mc-character--player::after {
    content: '';
    position: absolute;
    top: 48%;
    left: 20%;
    right: 20%;
    height: 26%;
    background:
        linear-gradient(#111827, #111827) 0 0 / 28% 100% no-repeat,
        linear-gradient(#111827, #111827) 100% 0 / 28% 100% no-repeat;
}

.mc-character--creeper {
    background: #22c55e;
}

.mc-character--creeper::before {
    content: '';
    position: absolute;
    inset: 18% 18% 32% 18%;
    background:
        linear-gradient(#111827, #111827) 0 0 / 30% 40% no-repeat,
        linear-gradient(#111827, #111827) 100% 0 / 30% 40% no-repeat,
        linear-gradient(#111827, #111827) 50% 100% / 28% 80% no-repeat;
}

.mc-character--creeper::after {
    content: '';
    position: absolute;
    left: 28%;
    right: 28%;
    bottom: 10%;
    height: 24%;
    background: #111827;
}

@keyframes mc-character-float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-6px) scale(1.02);
    }
}

.mc-input {
    border-width: 2px;
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.7);
}

.mc-input:focus {
    background: rgba(15, 23, 42, 0.9);
}

.mc-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.mc-label::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9);
}

/* Minecraft блок-карточки для секций, статистики и магазина */
.mc-card-block {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    border: 2px solid rgba(15, 23, 42, 0.95);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.9),
        0 18px 0 rgba(15, 23, 42, 0.85);
    background-image:
        linear-gradient(to bottom, rgba(34, 197, 94, 0.16), transparent 38%),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.9));
}

.mc-card-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(34, 197, 94, 0.15) 1px, transparent 1px),
        linear-gradient(180deg, rgba(15, 23, 42, 0.2) 1px, transparent 1px);
    background-size: 10px 10px;
    opacity: 0.25;
    pointer-events: none;
}

.mc-card-emerald {
    border-color: rgba(34, 197, 94, 0.95);
    box-shadow:
        0 0 0 1px rgba(34, 197, 94, 0.8),
        0 18px 0 rgba(12, 26, 15, 0.95);
}

/* Дополнительные мобы */
.mc-character--skeleton {
    background: #9ca3af;
}

.mc-character--skeleton::before {
    content: '';
    position: absolute;
    inset: 18% 18% 42% 18%;
    background:
        linear-gradient(#111827, #111827) 0 0 / 32% 50% no-repeat,
        linear-gradient(#111827, #111827) 100% 0 / 32% 50% no-repeat;
}

.mc-character--skeleton::after {
    content: '';
    position: absolute;
    left: 24%;
    right: 24%;
    bottom: 20%;
    height: 24%;
    background:
        linear-gradient(#111827, #111827) 50% 0 / 70% 35% no-repeat,
        linear-gradient(#111827, #111827) 50% 100% / 40% 32% no-repeat;
}

.mc-character--enderman {
    background: radial-gradient(circle at 30% 30%, #a855f7 0, #111827 40%), #020617;
}

.mc-character--enderman::before {
    content: '';
    position: absolute;
    inset: 26% 18% 48% 18%;
    background:
        linear-gradient(#a855f7, #a855f7) 0 40% / 32% 32% no-repeat,
        linear-gradient(#a855f7, #a855f7) 100% 40% / 32% 32% no-repeat;
}

.mc-character--enderman::after {
    content: '';
    position: absolute;
    left: 36%;
    right: 36%;
    bottom: 16%;
    height: 26%;
    background: #020617;
}

/* Блок-иконки для заголовков и футера */
.mc-icon-block {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    position: relative;
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.9),
        0 4px 0 rgba(15, 23, 42, 0.9);
}

.mc-icon-block--grass {
    background-image:
        linear-gradient(to bottom, #22c55e, #16a34a 55%),
        linear-gradient(to bottom, #4b5563, #1f2937);
}

.mc-icon-block--stone {
    background-image:
        linear-gradient(to bottom, #9ca3af, #6b7280 55%),
        linear-gradient(to bottom, #4b5563, #111827);
}

.mc-icon-block--diamond {
    background-image:
        radial-gradient(circle at 30% 20%, #a5f3fc, #22d3ee 60%),
        linear-gradient(to bottom, #0f172a, #020617);
}

.mc-icon-block--redstone {
    background-image:
        radial-gradient(circle at 30% 20%, #fca5a5, #ef4444 60%),
        linear-gradient(to bottom, #111827, #020617);
}

.mc-icon-block--emerald {
    background-image:
        radial-gradient(circle at 30% 20%, #6ee7b7, #22c55e 60%),
        linear-gradient(to bottom, #022c22, #022c22);
}

.mc-icon-block--obsidian {
    background-image:
        linear-gradient(135deg, #1f2933, #020617);
}

.mc-icon-block--portal {
    background-image:
        linear-gradient(135deg, rgba(147, 51, 234, 0.4), rgba(244, 114, 182, 0.5)),
        linear-gradient(135deg, #020617, #020617);
}

.mc-footer-blocks {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

img.mc-logo {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
}

@media (min-width: 768px) {
    img.mc-logo {
        width: 40px;
        height: 40px;
    }
}

img.mc-floating-mob {
    position: fixed;
    height: 72px;
    width: auto;
    opacity: 0.14;
    z-index: 0;
    pointer-events: none;
    animation: mob-float 26s ease-in-out infinite;
    image-rendering: pixelated;
}

@media (max-width: 767px) {
    .mc-block,
    img.mc-floating-mob {
        display: none;
    }

    img.fixed.opacity-40.pointer-events-none.z-0 {
        display: none;
    }

    body {
        overflow-x: hidden;
    }

    .glass {
        backdrop-filter: blur(8px);
    }

    nav #auth-buttons,
    nav #user-menu {
        display: none !important;
    }

    .mobile-hide {
        display: none !important;
    }
}

* {
    overflow-wrap: anywhere;
}

@keyframes mob-float {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(40px, -30px, 0) rotate(3deg);
    }
}
