/**
 * Anime Island Shop - 3D Anime Theme & Local Styling
 * Zero external CDN dependencies - 100% Offline Ready
 * Typography: Yekan Bakh FaNum (Local)
 */

@font-face {
    font-family: 'YekanBakhFaNum';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/YekanBakhFaNum-Light.woff2') format('woff2'),
         url('../fonts/YekanBakhFaNum-Light.woff') format('woff');
}

@font-face {
    font-family: 'YekanBakhFaNum';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/YekanBakhFaNum-Regular.woff2') format('woff2'),
         url('../fonts/YekanBakhFaNum-Regular.woff') format('woff');
}

@font-face {
    font-family: 'YekanBakhFaNum';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/YekanBakhFaNum-SemiBold.woff2') format('woff2'),
         url('../fonts/YekanBakhFaNum-SemiBold.woff') format('woff');
}

@font-face {
    font-family: 'YekanBakhFaNum';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/YekanBakhFaNum-Bold.woff2') format('woff2'),
         url('../fonts/YekanBakhFaNum-Bold.woff') format('woff');
}

@font-face {
    font-family: 'YekanBakhFaNum';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../fonts/YekanBakhFaNum-ExtraBold.woff2') format('woff2'),
         url('../fonts/YekanBakhFaNum-ExtraBold.woff') format('woff');
}

@font-face {
    font-family: 'YekanBakhFaNum';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../fonts/YekanBakhFaNum-ExtraBlack.woff2') format('woff2'),
         url('../fonts/YekanBakhFaNum-ExtraBlack.woff') format('woff');
}

:root {
    --font-sans: 'YekanBakhFaNum', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --primary: #FF4D80;
    --primary-hover: #E03366;
    --primary-light: #FFE5EE;
    --secondary: #8352FD;
    --secondary-hover: #6E38F7;
    --secondary-light: #F0EBFF;
    --accent: #FFB800;
    --dark-bg: #13091B;
    --dark-surface: #1E122A;
    --card-bg: #FFFFFF;
    --text-main: #1F1527;
    --text-muted: #6B6275;
    --border-light: #EFE8F6;
    --glow-pink: rgba(255, 77, 128, 0.35);
    --glow-purple: rgba(131, 82, 253, 0.35);
}

body {
    font-family: var(--font-sans);
    direction: rtl;
    text-align: right;
    background-color: #FAF6FD;
    color: var(--text-main);
    overflow-x: hidden;
}

/* -------------------------------------------------------------
 * 3D PERSPECTIVE & TRANSFORMS
 * ----------------------------------------------------------- */
.perspective-container {
    perspective: 1200px;
}

.preserve-3d {
    transform-style: preserve-3d;
}

.card-3d {
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translateZ(0);
    will-change: transform, box-shadow;
    background: #FFFFFF;
    border: 1px solid rgba(230, 220, 245, 0.8);
    box-shadow: 0 8px 25px rgba(35, 15, 50, 0.05);
}

html.dark .card-3d,
body.dark-mode .card-3d {
    background: #131B2E !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6) !important;
}

.card-3d:hover {
    transform: perspective(1000px) translateY(-8px) scale(1.015);
    box-shadow: 0 20px 40px -10px var(--glow-pink), 0 10px 20px rgba(0, 0, 0, 0.04);
    border-color: rgba(255, 77, 128, 0.4);
}

html.dark .card-3d:hover,
body.dark-mode .card-3d:hover {
    border-color: rgba(255, 77, 128, 0.5) !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.85), 0 0 20px rgba(255, 77, 128, 0.25) !important;
}

/* 3D Neo-Anime Buttons */
.btn-3d-pink {
    background: linear-gradient(135deg, #FF5B8C 0%, #FF3366 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 9999px;
    box-shadow: 0 6px 0 #C41847, 0 10px 20px rgba(255, 77, 128, 0.4);
    transition: all 0.15s ease;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-3d-pink:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #C41847, 0 15px 25px rgba(255, 77, 128, 0.5);
}

.btn-3d-pink:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #C41847, 0 5px 10px rgba(255, 77, 128, 0.3);
}

.btn-3d-purple {
    background: linear-gradient(135deg, #9666FF 0%, #753BF5 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 9999px;
    box-shadow: 0 6px 0 #5320C7, 0 10px 20px rgba(131, 82, 253, 0.4);
    transition: all 0.15s ease;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-3d-purple:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #5320C7, 0 15px 25px rgba(131, 82, 253, 0.5);
}

.btn-3d-purple:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #5320C7, 0 5px 10px rgba(131, 82, 253, 0.3);
}

.btn-3d-dark {
    background: linear-gradient(135deg, #2D1B3E 0%, #170923 100%);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    box-shadow: 0 6px 0 #0E0317, 0 10px 25px rgba(0, 0, 0, 0.35);
    transition: all 0.15s ease;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-3d-dark:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #0E0317, 0 15px 30px rgba(0, 0, 0, 0.45);
    border-color: rgba(255, 77, 128, 0.5);
}

.btn-3d-dark:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #0E0317, 0 5px 12px rgba(0, 0, 0, 0.3);
}

/* -------------------------------------------------------------
 * BRAND LOGO BADGE (DARK CONTRAST BACKGROUND)
 * ----------------------------------------------------------- */
.brand-logo-badge {
    background: radial-gradient(circle at 30% 30%, #2A1538 0%, #12081C 100%);
    padding: 6px 10px;
    border-radius: 18px;
    border: 1px solid rgba(255, 77, 128, 0.3);
    box-shadow: 0 8px 20px rgba(18, 8, 28, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.brand-logo-badge:hover {
    transform: scale(1.05) rotate(-1deg);
    border-color: #FF4D80;
    box-shadow: 0 10px 25px rgba(255, 77, 128, 0.4), inset 0 1px 4px rgba(255, 255, 255, 0.3);
}

.brand-logo-badge img {
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
    max-height: 42px;
    width: auto;
    object-fit: contain;
}

/* -------------------------------------------------------------
 * 3D HERO STAGE & MASCOT
 * ----------------------------------------------------------- */
.hero-stage {
    position: relative;
    background: radial-gradient(ellipse at 70% 30%, #301744 0%, #160A22 65%, #0F0517 100%);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 25px 60px -15px rgba(22, 10, 34, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.hero-portal-ring {
    position: absolute;
    bottom: -15%;
    left: 10%;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 77, 128, 0.25) 0%, rgba(131, 82, 253, 0.15) 50%, transparent 70%);
    transform: rotateX(75deg);
    filter: blur(2px);
    animation: pulseGlow 4s ease-in-out infinite alternate;
    pointer-events: none;
}

.hero-mascot-img {
    filter: drop-shadow(0 15px 35px rgba(255, 77, 128, 0.35)) drop-shadow(0 25px 50px rgba(0, 0, 0, 0.6));
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-origin: center bottom;
    will-change: transform;
}

.floating-badge {
    animation: floatKawaii 4s ease-in-out infinite;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.floating-badge-2 {
    animation: floatKawaii 5s ease-in-out infinite 1.5s;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.floating-badge-3 {
    animation: floatKawaii 4.5s ease-in-out infinite 0.7s;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

@keyframes floatKawaii {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

@keyframes pulseGlow {
    0% {
        transform: rotateX(75deg) scale(0.9);
        opacity: 0.6;
    }
    100% {
        transform: rotateX(75deg) scale(1.15);
        opacity: 0.95;
    }
}

/* -------------------------------------------------------------
 * INSTAGRAM-STYLE ANIME STORIES BAR
 * ----------------------------------------------------------- */
.story-avatar-wrap {
    position: relative;
    padding: 3px;
    border-radius: 50%;
    background: linear-gradient(45deg, #FF4D80, #8352FD, #FFB800, #FF4D80);
    background-size: 300% 300%;
    animation: storyBorderSpin 6s ease infinite;
    cursor: pointer;
    transition: transform 0.25s ease;
}

.story-avatar-wrap:hover {
    transform: scale(1.08) translateY(-3px);
}

.story-avatar-inner {
    border-radius: 50%;
    overflow: hidden;
    background: #180a22;
    border: 3px solid #FAF6FD;
}

@keyframes storyBorderSpin {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* -------------------------------------------------------------
 * CATEGORIES 3D CARDS
 * ----------------------------------------------------------- */
.category-3d-card {
    position: relative;
    background: #FFFFFF;
    border-radius: 24px;
    border: 1px solid rgba(230, 220, 245, 0.8);
    box-shadow: 0 10px 25px -5px rgba(46, 31, 56, 0.06);
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 14px;
}

.category-3d-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: rgba(255, 77, 128, 0.5);
    box-shadow: 0 20px 35px -8px var(--glow-pink);
}

.category-img-badge {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 12px;
    border: 3px solid #F4EEFF;
    box-shadow: 0 8px 20px rgba(46, 31, 56, 0.12);
    transition: transform 0.35s ease, border-color 0.35s ease;
    background: #FDF8FF;
}

.category-3d-card:hover .category-img-badge {
    transform: scale(1.1) rotate(4deg);
    border-color: #FF4D80;
}

.category-img-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* -------------------------------------------------------------
 * OTAKU SERVICES 3D BOXES (IN ADDITION TO ANIME-SHOP.IR)
 * ----------------------------------------------------------- */
.service-3d-box {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 24px 20px;
    border: 1px solid rgba(230, 220, 245, 0.7);
    box-shadow: 0 10px 25px -5px rgba(46, 31, 56, 0.05);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.service-3d-box:hover {
    transform: translateY(-6px);
    border-color: rgba(131, 82, 253, 0.4);
    box-shadow: 0 15px 35px -5px var(--glow-purple);
}

.service-icon-wrap {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

/* -------------------------------------------------------------
 * DUAL PROMO 3D BANNERS
 * ----------------------------------------------------------- */
.promo-3d-banner {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 18px 45px -10px rgba(35, 15, 50, 0.2);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.promo-3d-banner:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 25px 55px -10px rgba(255, 77, 128, 0.3);
}

/* -------------------------------------------------------------
 * UTILITY & SCROLLBAR
 * ----------------------------------------------------------- */
::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: #F4EEFF;
}

::-webkit-scrollbar-thumb {
    background: #D5BFE0;
    border-radius: 9999px;
    border: 2px solid #F4EEFF;
}

::-webkit-scrollbar-thumb:hover {
    background: #FF4D80;
}

/* =============================================================
 * GOOEY BUBBLE BACKGROUND COMPONENT (React/Motion -> Vanilla CSS)
 * =========================================================== */
:root {
    --bubble-first: 18, 113, 255;
    --bubble-second: 221, 74, 255;
    --bubble-third: 0, 220, 255;
    --bubble-fourth: 255, 77, 128;
    --bubble-fifth: 140, 100, 255;
    --bubble-sixth: 255, 184, 0;
}

.bubble-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
    z-index: -20;
    background: radial-gradient(ellipse at 50% 20%, #FBF7FF 0%, #F5ECFD 50%, #ECE0FA 100%);
    transition: background 0.3s ease;
}

html.dark .bubble-bg-container,
body.dark-mode .bubble-bg-container {
    background: radial-gradient(ellipse at 50% 20%, #0d1527 0%, #090d19 60%, #050811 100%) !important;
}

.bubble-filter-wrap {
    position: absolute;
    inset: 0;
    filter: blur(45px);
    -webkit-filter: blur(45px);
    opacity: 0.45;
    transform: translate3d(0, 0, 0);
}

html.dark .bubble-filter-wrap {
    opacity: 0.25;
}

.bubble-circle {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: multiply;
    transform: translateZ(0);
    will-change: transform;
}

html.dark .bubble-circle {
    mix-blend-mode: screen;
}

.bubble-1 {
    width: 80vw;
    height: 80vw;
    max-width: 900px;
    max-height: 900px;
    top: 10%;
    left: 10%;
    background: radial-gradient(circle at center, rgba(var(--bubble-first), 0.75) 0%, rgba(var(--bubble-first), 0) 50%);
    animation: bubbleMoveY 30s ease-in-out infinite;
}

.bubble-2-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-origin: calc(50% - 400px);
    animation: bubbleRotate 20s linear infinite;
}

.bubble-2 {
    width: 80vw;
    height: 80vw;
    max-width: 900px;
    max-height: 900px;
    background: radial-gradient(circle at center, rgba(var(--bubble-second), 0.75) 0%, rgba(var(--bubble-second), 0) 50%);
}

.bubble-3-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-origin: calc(50% + 400px);
    animation: bubbleRotate 40s linear infinite;
}

.bubble-3 {
    position: absolute;
    width: 80vw;
    height: 80vw;
    max-width: 900px;
    max-height: 900px;
    top: calc(50% + 200px);
    left: calc(50% - 500px);
    background: radial-gradient(circle at center, rgba(var(--bubble-third), 0.75) 0%, rgba(var(--bubble-third), 0) 50%);
}

.bubble-4 {
    width: 80vw;
    height: 80vw;
    max-width: 900px;
    max-height: 900px;
    top: 10%;
    left: 10%;
    opacity: 0.7;
    background: radial-gradient(circle at center, rgba(var(--bubble-fourth), 0.75) 0%, rgba(var(--bubble-fourth), 0) 50%);
    animation: bubbleMoveX 40s ease-in-out infinite;
}

.bubble-5-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-origin: calc(50% - 800px) calc(50% + 200px);
    animation: bubbleRotate 20s linear infinite;
}

.bubble-5 {
    position: absolute;
    width: 140vw;
    height: 140vw;
    max-width: 1400px;
    max-height: 1400px;
    top: calc(50% - 70vw);
    left: calc(50% - 70vw);
    background: radial-gradient(circle at center, rgba(var(--bubble-fifth), 0.7) 0%, rgba(var(--bubble-fifth), 0) 50%);
}

.bubble-interactive {
    position: absolute;
    width: 65vw;
    height: 65vw;
    max-width: 650px;
    max-height: 650px;
    top: 0;
    left: 0;
    opacity: 0.65;
    background: radial-gradient(circle at center, rgba(var(--bubble-sixth), 0.75) 0%, rgba(var(--bubble-sixth), 0) 50%);
    pointer-events: none;
}

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

@keyframes bubbleMoveX {
    0%, 100% { transform: translateX(-50px); }
    50% { transform: translateX(50px); }
}

@keyframes bubbleRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

