@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ===================================================================
   PenguinStudios — Shared Base Stylesheet
   Provides consistent navbar, footer, typography, and utilities
   across all pages (shop, wiki, dashboard, etc.)
   =================================================================== */

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #050a14;
    color: #E2E8F0;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%; }
img { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #050a14; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #3B82F6, #1D4ED8); border-radius: 5px; border: 2px solid #050a14; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #60A5FA, #3B82F6); }
* { scrollbar-width: thin; scrollbar-color: #3B82F6 #050a14; }

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 1240px;
    z-index: 9999;
    background: linear-gradient(135deg, rgba(8, 15, 30, 0.92), rgba(5, 10, 20, 0.95));
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid transparent;
    border-radius: 18px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(59, 130, 246, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.navbar::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 19px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.4));
    background-size: 300% 300%;
    animation: navBorderGlow 6s ease-in-out infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
@keyframes navBorderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.navbar.scrolled {
    top: 8px;
    background: linear-gradient(135deg, rgba(8, 15, 30, 0.97), rgba(5, 10, 20, 0.99));
    box-shadow:
        0 16px 56px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(59, 130, 246, 0.18),
        0 0 40px rgba(59, 130, 246, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 28px;
    max-width: 100%;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Brand */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-brand a,
.nav-home {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}
.nav-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.6));
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
    animation: logoPulse 4s ease-in-out infinite;
}
@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.6)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.9)); transform: scale(1.05); }
}
.nav-brand:hover .nav-logo {
    transform: rotate(-8deg) scale(1.15);
    filter: drop-shadow(0 0 24px rgba(59, 130, 246, 1));
}
.nav-title {
    font-size: 1.15rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #60A5FA 40%, #A78BFA 60%, #ffffff 100%);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleShimmer 5s ease-in-out infinite;
    letter-spacing: -0.3px;
}
@keyframes titleShimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 300% center; }
}

/* Nav Links */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
}
.nav-link {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover {
    color: #fff;
    background: rgba(59, 130, 246, 0.08);
    transform: translateY(-1px);
}
.nav-link:hover::after {
    width: 60%;
}
.nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(99, 102, 241, 0.8));
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.nav-link.active::after {
    display: none;
}

/* Auth Buttons */
.btn-login {
    background: linear-gradient(135deg, #3B82F6, #2563EB) !important;
    color: #fff !important;
    padding: 9px 20px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    margin-left: 10px;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none !important;
}
.btn-login:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-admin {
    background: linear-gradient(135deg, #7C3AED, #6D28D9) !important;
    color: #fff !important;
    padding: 9px 20px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    margin-left: 8px;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-admin:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Nav toggle (mobile hamburger) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    padding: 4px;
}
.nav-toggle span {
    width: 22px;
    height: 2px;
    background: linear-gradient(90deg, #60A5FA, #A78BFA);
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }

/* User menu (dashboard) */
.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid rgba(255,255,255,0.08);
}
.user-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.3);
    object-fit: cover;
}
.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #E2E8F0;
}
.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #F87171;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}
.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #EF4444;
    transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(180deg, #080e1a, #020617);
    border-top: 1px solid rgba(59, 130, 246, 0.06);
    padding: 60px 0 24px;
}
.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
}
.footer-description {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.7;
}
.footer-links h4,
.footer-platforms h4,
.footer-social h4 {
    color: #E2E8F0;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}
.footer-links ul { list-style: none; padding: 0; }
.footer-links a {
    color: #475569;
    font-size: 0.88rem;
    display: inline-block;
    padding: 4px 0;
    transition: all 0.2s ease;
}
.footer-links a:hover { color: #60A5FA; transform: translateX(4px); }
.platform-icons { display: flex; gap: 10px; flex-wrap: wrap; }
.platform-link {
    background: rgba(59, 130, 246, 0.06);
    color: #64748B;
    font-weight: 500;
    font-size: 0.8rem;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.08);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}
.platform-link:hover {
    background: rgba(59, 130, 246, 0.12);
    color: #93C5FD;
    border-color: rgba(59, 130, 246, 0.2);
}
.social-icons { display: flex; gap: 10px; }
.social-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60A5FA;
    font-size: 1rem;
    transition: all 0.2s ease;
}
.social-icon:hover {
    background: #2563EB;
    color: #fff;
    transform: translateY(-3px);
}
.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.04);
    color: #334155;
    font-size: 0.82rem;
}
.footer-bottom a { color: #3B82F6; }

/* ===== SECTION COMMON ===== */
.section { padding: 100px 0; position: relative; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #3B82F6;
    margin-bottom: 12px;
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.15);
}
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #F1F5F9;
    letter-spacing: -1px;
    margin-bottom: 12px;
}
.section-subtitle {
    font-size: 1.1rem;
    color: #64748B;
    max-width: 500px;
    margin: 0 auto;
}

/* ===== COMMON BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-family: inherit;
}
.btn-primary {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #fff;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.6);
}
.btn-secondary {
    background: rgba(255,255,255,0.04);
    color: #E2E8F0;
    border: 1.5px solid rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(8px);
}
.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-3px);
}

/* ===== ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* ===== RESPONSIVE — MOBILE ===== */
@media (max-width: 768px) {
    .navbar {
        top: 0;
        width: 100%;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid rgba(59, 130, 246, 0.08);
    }
    .navbar::before {
        display: none;
    }
    .navbar .container { padding: 12px 16px; }
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 54px;
        flex-direction: column;
        background: linear-gradient(180deg, rgba(5, 10, 20, 0.98), rgba(8, 15, 30, 0.98));
        width: 100%;
        padding: 20px 0;
        padding-bottom: max(20px, env(safe-area-inset-bottom));
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9999;
        max-height: calc(100vh - 54px);
        max-height: calc(100dvh - 54px);
        overflow-y: auto;
        overflow-x: hidden;
        border-bottom: 1px solid rgba(59, 130, 246, 0.1);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        -webkit-overflow-scrolling: touch;
    }
    .nav-menu.active { left: 0; }
    .nav-menu .nav-link {
        padding: 16px 24px;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.03);
        border-radius: 0;
        display: block;
        width: 100%;
        text-align: left;
        -webkit-tap-highlight-color: transparent;
    }
    .nav-menu .nav-link::after { display: none; }
    .nav-menu .nav-link:hover { transform: none; background: rgba(59, 130, 246, 0.08); }
    .nav-menu .nav-link.active {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(99, 102, 241, 0.1));
        border-left: 3px solid #3B82F6;
    }
    .nav-menu .btn-login,
    .nav-menu .btn-admin {
        margin: 8px 16px;
        padding: 14px 24px !important;
        text-align: center;
        border-radius: 12px !important;
        display: block;
        width: calc(100% - 32px);
    }
    .nav-toggle { display: flex; z-index: 10001; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .social-icons, .platform-icons { justify-content: center; }
    .user-menu {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        padding: 14px 24px;
        border-top: 1px solid rgba(255,255,255,0.04);
    }
}
@media (max-width: 1024px) {
    .footer-content { grid-template-columns: 1fr 1fr; }
}
