/* =========================
   RESET
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background: #0f0f0f;
    color: #fff;
    transition: 0.4s ease;
    overflow-x: hidden;
}

/* =========================
   LIGHT MODE
========================= */
body.light-mode {
    background: #f5f7fb;
    color: #222;
}

/* =========================
   GLASS EFFECT
========================= */
.navbar,
.topbar,
.card,
.footer {
    backdrop-filter: blur(14px);
    background: rgba(20,20,20,0.6);
    border: 1px solid rgba(255,255,255,0.08);
}

body.light-mode .navbar,
body.light-mode .topbar,
body.light-mode .card,
body.light-mode .footer {
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(0,0,0,0.08);
}

/* =========================
   TOPBAR
========================= */
.topbar {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    font-size: 14px;
}

/* =========================
   NAVBAR
========================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 22px;
    font-weight: bold;
}

.logo span {
    color: red;
}

/* =========================
   SEARCH BAR
/*========================= */
.search-bar {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 20px auto;
    margin-right: 50%;
}

/* ICON */
.search-bar i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    pointer-events: none;
    transition: 0.3s;
}

/* INPUT */
.search-bar input {
    width: 100%;
    padding: 16px 16px 14px 40px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    outline: none;
    font-size: 14px;
    color: #fff;

    /* Glass effect */
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);

    /* Depth */
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);

    transition: all 0.3s ease;
}

/* PLACEHOLDER */
.search-bar input::placeholder {
    color: #3b82f6;
}

/* FOCUS = PREMIUM GLOW */
.search-bar input:focus {
    border-color: #ff4d4d;
    box-shadow:
        0 0 0 2px rgba(255,77,77,0.2),
        0 0 15px rgba(255,77,77,0.4),
        0 4px 25px rgba(0,0,0,0.35);
}

/* ICON ANIMATION ON FOCUS */
.search-bar input:focus + i,
.search-bar:focus-within i {
    color: #ff4d4d;
    transform: translateY(-50%) scale(1.1);
}

/* HOVER EFFECT */
.search-bar input:hover {
    border-color: rgba(255,255,255,0.3);
}

/* ACTIVE CLICK FEEL */
.search-bar input:active {
    transform: scale(0.98);
}

/* MOBILE OPTIMIZATION */
@media (max-width: 600px) {
    .search-bar {
        max-width: 100%;
        padding: 0 10px;
            margin-right: 0;
    }

    .search-bar input {
        font-size: 13px; /* prevents zoom on mobile */
        padding: 12px 12px 12px 30px;
        color: chartreuse;
    }
}


/* =========================
   NAV LINKS
========================= */
nav {
    display: flex;
    gap: 15px;
}

nav a {
    display: inline-block;
    position: relative;
    padding: 8px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

nav a::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, #ff3b3b, #ff9a3b);
    transition: 0.3s;
}

nav a:hover::before {
    width: 100%;
}

nav a:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.08);
}
.menu-toggle {
    display: none;
    font-size: 26px;
    cursor: pointer;
}
/* =========================
   MOBILE NAV
========================= */
@media (max-width: 768px) {

    nav {
        position: absolute;
        top: 70px;
        right: 0;
        background: #111;
        flex-direction: column;
        width: 200px;
        padding: 15px;
        border-radius: 10px 0 0 10px;

        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: 0.3s ease;
    }

    nav.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;

    }
}
@media (max-width: 768px) {

    .menu-toggle {
        display: block;
    }

    nav {
        position: absolute;
        top: 70px;
        right: 0;
        background: #111;
        flex-direction: column;
        width: 200px;
        padding: 15px;
        border-radius: 10px 0 0 10px;

        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: 0.3s ease;
    }

    nav.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}

/* =========================
   SEARCH BAR HOVER
========================= */
.search-bar input:hover {
    background: rgba(255,255,255,0.1);
}


/* =========================
   HAMBURGER
========================= */
.hamburger {
    display: none;
    cursor: pointer;
    font-size: 22px;
}

/* =========================
   PAGE
========================= */
.page {
    padding: 20px;
}

.page h1 {
    margin-bottom: 20px;
}

/* =========================
   GRID
========================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.card {
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 340px;
    transform-style: preserve-3d;
    transition: transform 0.8s;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    backface-visibility: hidden;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* FRONT */
.card-front {
    background: #fff;
}

.card-front img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 10px;
}

/* BACK */
.card-back {
    background: linear-gradient(red, blue);
    color: white;
    transform: rotateY(180deg);

}

/* =========================
   CARD
========================= */
.card {
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s ease;
    position: relative;
    
}

.card:hover {
    transform: translateY(-6px);
}

.card img {
    width: 100%;
    height: 310px;
    object-fit: cover;
    border-radius: 10px;

}

.card h3 {
    margin-top: 10px;
    font-size: 16px;
}

/* =========================
   POPUP
========================= */
.popup {
    display: none;
    pointer-events: none;
}

.popup.active {
    display: flex;
    pointer-events: auto;
}

.popup-content {
    background: #111;
    padding: 20px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.popup img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 10px;
}

.close {
    float: right;
    cursor: pointer;
}

/* =========================
   NAV STRUCTURE FIX
========================= */

.nav-left,
.nav-center,
.nav-right {
    display: flex;
    align-items: center;
}

/* SEARCH CENTER */
.nav-center {
    flex: 1;
    justify-content: center;
}

.search-bar input {
    width: 200px;
}

/* =========================
   BULLETPROOF FAB (CIRCLE SYSTEM)
========================= */

.fab-container {
    position: fixed;
    bottom: 24px;
    right: 40px;
    width: 60px;
    height: 60px;
    z-index: 9999;
    will-change: transform;
    margin-left: 90%;
}

/* MAIN BUTTON */
.fab-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;

    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    color: white;
    font-size: 28px;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* BASE ITEM STYLE */
.fab-item {
    position: absolute;
    top: 50%;
    left: 50%;

    width: 44px;
    height: 44px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: white;
    text-decoration: none;

    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    transition: 0.25s ease;
    pointer-events: none;
}

/* SHOW */
.fab-container.active .fab-item {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

/* =========================
   CIRCLE POSITIONS (SAFE ON ALL SCREENS)
========================= */

.fab-container.active .wa {
    transform: translate(-50%, -50%) translate(-70px, 0) scale(1);
    background: #25D366;
}

.fab-container.active .ig {
    transform: translate(-50%, -50%) translate(-50px, -50px) scale(1);
    background: #E1306C;
}

.fab-container.active .fb {
    transform: translate(-50%, -50%) translate(0, -70px) scale(1);
    background: #1877F2;
}

.fab-container.active .tt {
    transform: translate(-50%, -50%) translate(50px, -50px) scale(1);
    background: #000;
}

/* ICON */
.fab-item i {
    font-size: 18px;
}
/* =========================
   FLOAT BUTTON
========================= */
.fab { 
    position: fixed;
    right: 20px;
    bottom: 20px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #ff4d4d;
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 1000;
    transition: bottom 0.3s ease;
}
.fab.raise {
    bottom: 100px; /* adjust based on footer height */
}

.fab:hover {
    transform: translateX(-50%) scale(1.1);
}
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox.active {
    display: flex;
}

.lightbox-box {
    position: fixed;
}
/* =========================
   FOOTER
========================= */
.footer {
    padding: 40px 20px;
    margin-top: 40px;
    align-content: center;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    align-items: center;
}

.footer-box h3 {
    margin-bottom: 10px;
}

.footer-box a {
    display: block;
    text-decoration: none;
    color: inherit;
    margin: 5px 0;
    opacity: 0.8;
}

.footer-box a:hover {
    opacity: 1;
}

/* SOCIALS */
.socials {
    display: flex;
    gap: 10px;
}

.socials img {
    width: 25px;
}

/* FOOTER BOTTOM */
.footer-bottom {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    opacity: 0.7;
}

/* =========================
   THEME SWITCH
========================= */
.theme-switch {
    width: 50px;
    height: 28px;
    border-radius: 50px;
    background: rgba(255,255,255,0.2);
    border: none;
    cursor: pointer;
}

/* =========================
   🔥 UPGRADE: SWIPE POPUP SYSTEM
========================= */
.swipe-container {
    display: flex;
    width: 200%;
    height: 100%;
    transition: transform 0.4s ease;
}

.swipe-card {
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* popup animation */
.popup.active .swipe-container {
    animation: popIn 0.25s ease;
}

@keyframes popIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* =========================
   🔥 UPGRADE: COOK MODE
========================= */
.cook-mode {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    z-index: 9999;
}

.cook-mode h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.cook-mode button {
    margin: 10px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

/* =========================
   🔥 UPGRADE: TOUCH FEEL
========================= */
.card,
nav a,
.fab {
    -webkit-tap-highlight-color: transparent;
}

.card:active {
    transform: scale(0.97);
}

/* =========================
   RESPONSIVE FOOTER
========================= */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .socials {
        justify-content: center;
    }
}
