@tailwind base;
@tailwind components;
@tailwind utilities;

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

/* ========================= */
/* 🌍 Global Styles */
/* ========================= */
:root {
    --bg-primary: #b37337;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: "Poppins", sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none !important;
    color: inherit;
}

/* ========================= */
/* 🎨 Scrollbar */
/* ========================= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 4px;
}

.custom-header-index {
    z-index: 999 !important;
}

/* ========================= */
/* 🔗 Nav Links */
/* ========================= */
.nav-link {
    color: inherit;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #000;
}

/* ========================= */
/* 💫 Smooth Transitions */
/* ========================= */
html,
body,
nav,
div,
a,
button {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ========================= */
/* 🏷️ Tag Button */
/* ========================= */
/* ✅ Put this directly in customStyle.css */
.tag-btn {
    color: #6b7280;
    /* text-gray-500 */
    border: 1px solid transparent;
    border-radius: 9999px;
    /* rounded-full */
    padding: 0.375rem 0.75rem;
    /* py-1.5 px-3 */
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}



/* Active state — same look as Trending */
.tag-btn.active {
    color: #000;
    border-bottom: 2px solid #000;
    border-radius: 0;
}

/* 🌙 Dark mode active state */
/* Active state (dark mode) */
.dark .tag-btn.active {
    color: #fff;
    border-bottom: 2px solid #fff;
}

/* ========================= */
/* ➡️ Arrow Buttons */
/* ========================= */
.arrow-btn {
    @apply absolute z-10 w-9 h-9 flex items-center justify-center rounded-full bg-white/90 dark:bg-neutral-800/90 border border-gray-200 dark:border-neutral-700 text-gray-700 dark:text-gray-200 shadow-md hover:shadow-lg backdrop-blur-md transition-all duration-300 ease-in-out hover:scale-105;
}

#scrollLeft {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
    transition: all 0.35s ease;
}

#scrollRight {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    transition: all 0.35s ease;
}

/* ========================= */
/* 🌀 Hide Scrollbar Utility */
/* ========================= */
.no-scrollbar::-webkit-scrollbar,
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar,
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ========================= */
/* 🌗 Dark Mode Gradients */
/* ========================= */
@media (prefers-color-scheme: dark) {
    .dark .bg-gradient-to-r.from-white {
        background-image: linear-gradient(to right, #171717, transparent);
    }

    .dark .bg-gradient-to-l.from-white {
        background-image: linear-gradient(to left, #171717, transparent);
    }
}

/* ========================= */
/* 🌐 Language Button */
/* ========================= */
.lang-btn {
    @apply bg-gray-50 dark:bg-neutral-800 text-gray-700 dark:text-gray-200 font-medium rounded-xl p-3 text-center border border-transparent hover:border-primary hover:bg-gray-100 dark:hover:bg-neutral-700 transition-all duration-200;
}

.lang-btn.active {
    @apply border-primary bg-primary/10 text-primary;
}

/* ========================= */
/* 🔗 Footer Links */
/* ========================= */
.footer-link {
    @apply text-gray-600 dark:text-gray-300 relative inline-block transition-all duration-300;
}

.footer-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    height: 1px;
    width: 0;
    background-color: currentColor;
    transition: width 0.3s ease;
}

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

.footer-link:hover {
    @apply text-gray-900 dark:text-white;
}

/* ========================= */
/* 🚫 Hide Google Translate Branding */
/* ========================= */
.goog-logo-link,
.goog-te-gadget,
.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-text-highlight,
iframe.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.goog-te-banner,
.goog-te-menu-frame,
.goog-te-balloon,
.goog-tooltip {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
}



/* ========================= */
/* 🧩 SVG Icons */
/* ========================= */
.custom-svgs svg {
    width: 20px;
    height: 20px;
}

/* ========================= */
/* ✨ Input Styles */
/* ========================= */
/* input:focus-visible {
    outline: none !important;
    border: 1px solid #b37337 !important;
} */

/* Checkbox size */
input#invite-checkbox {
    width: 20px;
    height: 20px;
    background-color: transparent;
}


[x-cloak] {
    display: none !important;
}

body {
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;

}

body.overflow-hidden {
    overflow: hidden !important;
    touch-action: none;
}

/* ✅ Hero BG setup */

/* make sure all direct children are above the overlay */
.hero-bg>* {
    position: relative;
    z-index: 1;
}

.hero-bg {
    position: relative;
    background: url('../img/hero.webp') center/cover no-repeat;
    /* overflow: hidden; */
}

/* ✅ Black overlay on hero */
.hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 1;
}

/* ✅ Smooth zoom-out animation */
.zoom-animate {
    animation: zoomOut 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes zoomOut {
    from {
        transform: scale(1.2);
    }

    to {
        transform: scale(1);
    }
}

/* ✅ Header entry smooth animation */
header {
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeSlideIn 1s ease forwards;
}

@keyframes fadeSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-tops {
    padding-top: 135px;
}





/* Dark mode */
.dark #tagBar.fixed {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 15px rgba(255, 255, 255, 0.05);
    background-color: #0a0a0a;
}

.img-box-skins {
    width: 100% !important;
    height: 190px !important;
}

canvas#modalSkinCanvas {
    width: 100% !important;
    height: auto !important;
    outline: none !important;
    cursor: move;
}

canvas#skinCanvas {
    width: 100% !important;
    height: auto !important;
    outline: none !important;
    cursor: move;

}

[x-cloak] {
    display: none;
}

.animate-fade-in-up {
    animation: fadeInUp 0.25s ease-out;
}

/* === TOGGLE SWITCH STYLING === */
.toggle-input {
    @apply hidden;
}

.toggle-label {
    @apply relative inline-flex items-center cursor-pointer;
}

.toggle-label::before {
    content: "";
    @apply w-10 h-6 bg-gray-300 dark:bg-neutral-700 rounded-full transition-all;
}

.toggle-label::after {
    content: "";
    @apply absolute left-0.5 top-0.5 w-5 h-5 bg-white rounded-full shadow transition-all;
}

.toggle-input:checked+.toggle-label::before {
    @apply bg-blue-600 dark:bg-blue-500;
}

.toggle-input:checked+.toggle-label::after {
    @apply translate-x-4;
}

/* Base toggle container */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

/* Hide checkbox */
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Track (background) */
.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    /* neutral gray */
    transition: 0.4s;
    border-radius: 9999px;
}

/* Circle (thumb) */
.toggle-switch .slider::before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    top: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

/* Checked state */
.toggle-switch input:checked+.slider {
    background-color: #22c55e;
    /* Tailwind green-500 */
}

.toggle-switch input:checked+.slider::before {
    transform: translateX(18px);
}

/* Focus ring */
.toggle-switch input:focus+.slider {
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.4);
}


input::placeholder {
    transition: opacity 0.5s ease;
}

img.img-no-found {
    width: 200px !important;
}

.pack-title-line {
    position: relative;
    line-height: 1.4;
    /* 👈 font mate safe */
    min-height: 1.4em;
    /* 👈 exact ek line reserve */
}

.pack-title {
    max-width: 100%;
    overflow: hidden;
}

.title-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 1;
}

.title-marquee {
    white-space: nowrap;
    opacity: 0;
    transform: translateX(0%);
}

.pack-title:hover .title-ellipsis {
    opacity: 0;
}

.pack-title:hover .title-marquee {
    opacity: 1;
    animation: marquee-safe 6s linear infinite;
}

@keyframes marquee-safe {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}





/* editor page css start  */

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    cursor: pointer;

    position: relative;
    overflow: visible !important;
    z-index: 50;
}

.dark .icon-btn {
    border-color: #404040;
    color: #f2f2f2;
}

.icon-btn:hover {
    background-color: rgb(243 244 246);
    /* gray-100 */
    color: rgb(17 24 39);
    /* gray-900 */
}

.dark .icon-btn:hover {
    background-color: rgb(64 64 64);
    /* neutral-700 */
    color: white;
}

.icon-btn:active {
    transform: scale(0.94);
}

.icon-btn .material-icons {
    font-size: 20px;
    line-height: 1;
}

#app-tooltip {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

/* Dark mode tooltip already white bg via tailwind,
   but thodu polish */
.dark #app-tooltip {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    color: #000;
}

.tool-btn {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    /* background: #f9fafb; */
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s ease;
}

/* .tool-btn:hover {
    background: #f3f4f6;
} */

.tool-btn.active {
    background: var(--bg-primary);
    color: #fff;
    border-color: var(--bg-primary);
}

.tool-btn .material-icons {
    font-size: 26px;
}

.dark .tool-btn {
    border-color: #404040;
    color: #f2f2f2;
}

/* ================= PANEL POSITION ================= */
.right-panel-wrapper {
    position: absolute;
    top: 64px;
    right: 16px;
    z-index: 50;
}

/* Desktop */
.right-panel {
    width: 340px;
}

.bodyparts {
    display: grid;
    grid-template-columns: repeat(4, 24px);
    gap: 4px;
}

.bodypart {
    width: 24px;
    height: 24px;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bodypart.active {
    opacity: 1;
    background: #8b5cf6;
}

.bodypart.inactive {
    opacity: 0.25;
}

/* Mobile → Bottom sheet */
@media (max-width: 768px) {
    .right-panel-wrapper {
        position: fixed;
        inset: auto 0 0 0;
        top: auto;
    }

    .right-panel {
        width: 100%;
        border-radius: 24px 24px 0 0;
    }
}

/* ================= PANEL BODY ================= */
.panel-inner {
    /* background: white; */
    /* border-radius: 24px; */
    padding: 16px;
    max-height: 70vh;
    overflow-y: auto;
}

/* ================= COLOR PICKER ================= */
.picker-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
}

#picker {
    width: 100% !important;
    height: auto !important;
}

/* ================= INPUTS ================= */
.hex-input {
    width: 90px;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid #ddd;
    text-align: center;
}

/* ================= BUTTONS ================= */
.mode-btn {
    padding: 10px;
    border-radius: 14px;
    border: 1px solid #ddd;
}


.download-btn {
    width: 100%;
    background: var(--bg-primary);
    color: white;
    padding: 10px;
    border-radius: 10px;
}


.preset-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
}

.preset-grid div {
    width: 30px;
    height: 30px;
    aspect-ratio: 1;
    border-radius: 5px;
    border: 1px solid #d1d5db;
    cursor: pointer;
}

/* Tablet */
@media (max-width: 768px) {
    .preset-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Mobile */
@media (max-width: 480px) {
    .preset-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width:767px) {
    .img-box-skins {
        width: 100% !important;
        height: 150px !important;
    }

    .dropdown-scroll {
        -webkit-overflow-scrolling: touch;
    }

    .tool-btn {
        width: 36px;
        height: 36px;
        border-radius: 14px;
        /* background: #f9fafb; */
        border: 1px solid #e5e7eb;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all .2s ease;
    }

    .tool-btn .material-icons {
        font-size: 20px;
    }
}


.skin-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#skin_container {
    max-width: 100%;
    max-height: 100%;
    image-rendering: pixelated;
}

#skin_container {
    width: 100%;
    height: 100%;
    display: block;
}


#gridOverlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    background-image:
        linear-gradient(to right, rgba(0, 0, 0, 0.25) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 1px, transparent 1px);
    background-size: 12px 12px;

}


.grid-enabled:hover #gridOverlay {
    opacity: 1;
}

.error-text {
    color: red;

}

#followersModal {
    display: none;
}

#followersModal.show {
    display: flex;
}

.modal-box {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#followersModal.show .modal-box {
    opacity: 1;
    transform: scale(1);
}

#followersModal.hide .modal-box {
    opacity: 0;
    transform: scale(0.95);
}

.custom-hightscrollbar {
    height: 430px !important;
}