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

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

/* ========================= */
/* 🌍 Global Styles */
/* ========================= */
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;
}

/* ========================= */
/* 🔗 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);
    }
}



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

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