/* =======================
   GENERAL BODY STYLING
   ======================= */
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(45deg, #fabcdb 0%, #8d5f76 25%, #4ca59c);
    background-size: 400% 400%;
    animation: diagonalShift 15s ease infinite;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* prevent horizontal scrollbar */
    
}

.navbar-right .login-btn {
    text-decoration: none;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 10px; /* space between balance and username */
}

.balance-boxnav {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.3);
    padding: 4px 20px;
    border-radius: 10px;
    margin-right: 10px;
}

.balance-boxnav .top-up {
    margin-left: 6px;
    font-weight: bold;
    text-decoration: none;
    margin-right: -20px;
}

/* =======================
   LOGIN PAGE
   ======================= */
body.login-page .page-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 100%;
    z-index: 10;
    text-align: center;
}


body.login-page .login-container {
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    text-align: center;
    justify-content: center;
    margin: auto;
}

body.login-page .login-container h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #333;
}

body.login-page .google-btn,
body.login-page .twitter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 80%;
    margin: 12px auto;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

body.login-page .google-btn .button-content,
body.login-page .twitter-btn .button-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.login-page .social-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

body.login-page .google-btn { background-color: #DB4437; }
body.login-page .google-btn:hover { background-color: #c33d2f; }
body.login-page .twitter-btn { background-color: #1DA1F2; }
body.login-page .twitter-btn:hover { background-color: #1991DA; }

/* =======================
   PROFILE PAGE
   ======================= */
body.profile-page .page-container {
    position: relative;
    margin-top: 80px;
    width: 90%;
    max-width: 1000px;
    text-align: center;
}

body.profile-page .page-content {
    display: none;
    opacity: 0;
    text-align: center;
    transition: opacity 0.5s ease-in-out;
}

body.profile-page .page-content.active {
    display: block;
    opacity: 1;
}

h1{
    color: white;
}

/* Tabs styling */
body.profile-page .profile-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

body.profile-page .tab-btn {
    padding: 10px 20px;
    border: none;
    background-color: rgba(255,255,255,0.2);
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    color: #fff;
    transition: all 0.3s ease;
}

body.profile-page .tab-btn:hover {
    background-color: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

body.profile-page .tab-btn.active {
    background-color: #fabcdb;
    color: #333;
}


/* =======================
   NAVBAR STYLING
   ======================= */
/* =======================
   GENERAL BODY STYLING
   ======================= */
body {
    background: linear-gradient(45deg, #fabcdb 0%, #8d5f76 25%, #4ca59c);
    background-size: 400% 400%;
    animation: diagonalShift 15s ease infinite;
    min-height: 100vh;
    margin: 0;
    font-family: 'Noto Sans JP', sans-serif;
    display: flex;
    flex-direction: column;
}

main {
    margin-left: 20px;
    margin-right: 20px;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

h1 {
    text-align: center;
}

/* =======================
   NAVBAR STYLING
   ======================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 20px;
    margin: 0 auto;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(6px);
}

.navbar-left {
    display: flex;
    align-items: center;
}

.navbar-left ul {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.navbar-right .login-btn {
    text-decoration: none;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.navbar .logo img {
    height: 50px;
    width: auto;
    display: block;
}

.navbar li {
    margin-left: 20px;
    position: relative;
}

.navbar li:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -10px;
    top: 25%;
    height: 50%;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.2);
}

.navbar .logo {
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    margin-right: 20px;
    margin-left: 10px;
}

.navbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.navbar-left ul li a,
.username-link,
.login-btn {
    color: white;
    font-family: 'Noto Sans JP', sans-serif;
    text-decoration: none;
    padding: 10px 15px;
}

.navbar-left ul li a:hover,
.username-link:hover,
.login-btn:hover,
.logout-btn:hover {
    text-decoration: none;
    color: #fabcdb;
    transform: scale(1.05);
}

.navbar .dropdown {
    position: relative;
}

.navbar .dropdown-content {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    min-width: 150px;
    border-radius: 6px;
    overflow: hidden;
    z-index: 1001;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    display: flex;
}

.navbar .dropdown-content .long-item {
    width: auto;
    word-break: break-word;
}

.navbar .dropdown-content a {
    display: block;
    text-align: center;
    padding: 10px;
    margin-right: 20px;
    color: #ffffff;
    text-decoration: none;
}

.navbar .dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fabcdb;
    transform: scale(1.05);
}

.navbar .dropdown:hover .dropdown-content {
    max-height: 500px;
    opacity: 1;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    padding: 15px 20px;
    display: block;
    text-align: center;
    transition: all 0.3s ease;
}

.navbar a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fabcdb;
    transform: scale(1.05);
}

.navbar .dropdown-content li:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.2);
}

/* =======================
   FOOTER STYLING
   ======================= */
footer {
    background-color: #2c3e50;
    color: #ffffff;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    margin-top: auto;
}

footer a {
    color: #fabcdb;
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    text-decoration: underline;
}

/* =========================
   Shipping Success Modal
   ========================= */
.modal-overlaySS {
    display: none; /* hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* subtle overlay */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.close-btn {
  margin-top: 1rem;
  padding: 0.5rem 1.2rem;
  background-color: teal;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.close-btn:hover {
  background-color: #006666;
}

.modal-overlaySS {
    display: none; /* hidden by default */
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 128, 128, 0.6); /* teal background */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.modal-overlaySS.active {
    display: flex;  /* show it */
    opacity: 1;
    pointer-events: auto;
    justify-content: center;
}

#ship-success-text {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
}

#ship-success-close {
    background-color: #fff;
    color: #333;
    font-weight: bold;
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#ship-success-close:hover {
    background-color: #f2f2f2;
    transform: scale(1.05);
}

/* Simple animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUp {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

.social-icons {
    margin-bottom: 10px;
}

.social-icons a {
    display: inline-block;
    margin: 0 10px;
    transition: transform 0.3s ease;
}

.social-icons a img {
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1);
    transition: filter 0.9s ease, transform 0.9s ease;
}

.social-icons a:hover img {
    filter: brightness(0) saturate(100%) invert(78%) sepia(15%) saturate(1223%) hue-rotate(291deg) brightness(100%) contrast(97%);
    animation: icon-bounce 0.4s ease forwards;
}

@keyframes icon-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    70% { transform: scale(1.15); }
    100% { transform: scale(1.2); }
}

@keyframes icon-bounce-out {
    0% { transform: scale(1.2); }
    50% { transform: scale(0.9); }
    70% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* =======================
   PROFILE STYLING
   ======================= */
.profile-container {
    display: flex;
    max-width: 1000px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.sidebar {
    width: 200px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 20px;
    color: #fff;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.balance-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 200px;
    padding: 30px 25px;
    background: linear-gradient(135deg, #00bfa5, #008080);
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    color: #fff;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.balance-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.balance-box h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.balance-box p {
    font-size: 1rem;
    opacity: 0.85;
}

/* Optional: subtle background for numbers */
.balance-box p span {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 8px;
}

/* Responsive tweak */
@media (max-width: 768px) {
    .balance-box {
        width: 90%;
        padding: 25px 20px;
    }
}

/* BALANCE CARD STYLING */
.balance-card {
    background: #f5f0ff;           /* soft pastel background */
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 200px;
    max-width: 280px;
    margin-right: 40px;            /* spacing if next to history box */
    font-family: 'Segoe UI', sans-serif;
}

.balance-card h2 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #6a1b9a;                /* nice purple accent */
}

.balance-details p {
    font-size: 18px;
    margin: 5px 0;
    color: #333;
}

#modalContent {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
    overflow-x: hidden; /* hides horizontal overflow */
}

.sidebar ul li {
    margin: 15px 0;
}

.sidebar ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.sidebar ul li a:hover {
    color: #fabcdb;
}

.profile-content {
    flex: 1;
    padding: 20px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: none;
}

.profile-content section {
    margin-bottom: 30px;
}

.profile-content h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* =======================
   BACKGROUND ANIMATION
   ======================= */
@keyframes diagonalShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* =======================
   FOOTER
   ======================= */
footer {
    background-color: #2c3e50;
    color: #ffffff;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    margin-top: auto;
}

footer a {
    color: #fabcdb;
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    text-decoration: underline;
}

.social-icons {
    margin-bottom: 10px;
}

.social-icons a {
    display: inline-block;
    margin: 0 10px;
    transition: transform 0.3s ease;
}

.social-icons a img {
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1);
    transition: filter 0.9s ease, transform 0.9s ease;
}

.social-icons a:hover img {
    filter: brightness(0) saturate(100%) invert(78%) sepia(15%) saturate(1223%) hue-rotate(291deg) brightness(100%) contrast(97%);
    animation: icon-bounce 0.4s ease forwards;
}

@keyframes icon-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    70% { transform: scale(1.15); }
    100% { transform: scale(1.2); }
}

@keyframes icon-bounce-out {
    0% { transform: scale(1.2); }
    50% { transform: scale(0.9); }
    70% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* =======================
   BACKGROUND ANIMATION
   ======================= */
@keyframes diagonalShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* =======================
   INVENTORY
   ======================= */

.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.card {
    width: 180px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.view-cards-btn,
.view-sold-cards-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #fabcdb 0%, #8d5f76 100%);
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}


.view-cards-btn:hover,
.view-sold-cards-btn:hover:hover{
    background: linear-gradient(135deg, #f78ab2 0%, #6a3c58 100%);
    transform: scale(1.05);
}

/* =========================
   Sell Success Modal Styling
   ========================= */
#sell-success-modal {
    display: none;
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7); /* semi-transparent black background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#sell-success-modal .modal-overlaySS {
    display: none; /* default hidden */
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background: rgba(78, 124, 177, 0.5);
    justify-content:center;
    align-items:center;
    z-index:1000;
    opacity:0;
    transition: opacity 0.3s ease;
}

#sell-success-modal .modal-overlaySS.active {
    display: flex;
    opacity:1;
}

#sell-success-modal .close-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background-color: #fabcdb; 
    color: #333;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

#sell-success-modal .close-btn:hover {
    background-color: #f7b3cd;
}

.shipping-order {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: background 0.3s ease;
}

.shipping-order:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.card img,
.empty-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 1px solid #ccc;
}

.empty-image {
    background-color: #f2f2f2;
}

#modalContent::-webkit-scrollbar {
    width: 6px;
}

#modalContent::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

#closeModal {
    background-color: #fff;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

#closeModal:hover {
    background-color: #fabcdb;
    color: #fff;
    transform: scale(1.05);
}

#modalContent {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
}

#modalContent div {
    width: 100px;
    text-align: center;
}

#modalContent img {
    width: 80px;
    height: auto;
    border-radius: 8px;
    border: 2px solid #fff;
    transition: transform 0.2s;
}

#modalContent img:hover {
    transform: scale(1.1);
}

#modalContent p {
    margin-top: 5px;
    font-size: 14px;
    color: #fff;
}

#shippingModal .modal-content {
    background: rgba(216, 157, 221, 0.8); /* translucent white */
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
}

#shippingModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5); /* semi-transparent overlay */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#shippingModal .modal-content-wrapper {
    background: linear-gradient(45deg, #fabcdb, #8d5f76) !important;
    padding: 20px;
    border-radius: 16px;
    max-width: 700px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 20px rgba(33, 236, 243, 0.3);
    color: #fff;
}

.modal-contentSS {
    background: rgba(16, 147, 151, 0.4);
    padding: 20px 40px;
    border-radius: 12px;
    display: flex;              /* MAKE IT FLEX */
    flex-direction: column;     /* Stack items vertically */
    justify-content: center;    /* Center vertically inside modal */
    align-items: center;        /* Center horizontally */
    text-align: center;         /* Center text inside elements */
    max-width: 400px;
    width: 80%;
    color: white;
}

.modal-contentSS h3 {
    color: white;
}

#shippingModal h3 {
    margin-bottom: 15px;
    font-size: 28px;
    text-align: center;
}

.card-actions {
    margin-top: 10px;
    display: flex;
    gap: 5px;
    justify-content: center;
}

.card-actions button {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}


.inventory-card img {
    width: 100%;
    border-radius: 8px;
}

/* Default card style */
.inventory-card {
    width: 180px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    box-shadow: 2px 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
    cursor: pointer; /* make it obvious that cards are clickable */
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

/* Hidden cards */
.inventory-card.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none; /* prevent clicking hidden cards */
    position: absolute;   /* optional to remove from flow */
}

/* Hover effect */
.inventory-card:hover {
    transform: translateY(-3px);
    box-shadow: 4px 8px 20px rgba(0,0,0,0.25);
    transform: scale(1.03);
}

/* Selected state */
.inventory-card.selected {
    transform: rotate(1deg) scale(1.02);
    border: 3px solid #fabcdb;
    box-shadow: 4px 8px 20px rgba(250, 172, 219, 0.6);
}

.inventory-wrapper {
    display: flex;
    justify-content: center;   /* center both containers together */
    align-items: flex-end;     /* align bottoms */
    gap: 40px;                 /* space between box and buttons */
    margin: 20px auto;
}

.inventory-box {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    height: 750px;
    padding: 70px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow-y: auto;    /* scroll only inside the box */
    justify-content: center;  /* align cards top-left */
    align-items: flex-start;      /* prevent cards from stretching vertically */
    min-width: 1150px;
    max-width: 1150px;
}

/* Optional: prettier scrollbar */
.inventory-box::-webkit-scrollbar {
    width: 8px;
}

.inventory-box::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.3);
    border-radius: 4px;
}

.inventory-box::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}

.selected-total {
    font-weight: bold;
    font-size: 1.2em;
    text-align: center;   /* center horizontally */
    margin-bottom: 20px;  /* push it higher above buttons */
}

.profile-main-container {
    display: flex;
    gap: 40px;
    flex-wrap: wrap; /* stack on small screens */
    justify-content: center;
    align-items: stretch;
    flex-direction: row;
}

/* History Box */
#history-box {
    background: linear-gradient(
        135deg, 
        rgb(211, 127, 130), 
        rgba(250, 208, 196, 0.4)
    );
    border-radius: 20px;
    padding: 30px 20px;
    min-width: 500px;
    height: 600px;
    flex: 1;
    color: white;
    box-shadow: 0 15px 30px rgba(0,0,0,0.25);
    overflow: hidden;
    overflow-y: auto;
}

/* Tabs inside history box */
.history-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.history-tab-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background: rgba(255,255,255,0.2);
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.history-tab-btn.active {
    background: #fabcdb;
    color: #333;
}

/* Scrollable sold orders list */
.sold-orders-list {
    max-height: 300px;      /* adjust as needed */
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;       /* removes default bullets */
    scrollbar-width: thin;        /* Firefox */
    scrollbar-color: #888 #f1f1f1;
}

/* Chrome, Edge, Safari */
.sold-orders-list::-webkit-scrollbar {
    width: 6px;
}
.sold-orders-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.sold-orders-list::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 10px;
}
.sold-orders-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Default: allow scrolling */
body {
    overflow-y: auto;
}

/* When balance tab is active, hide page scrollbar */
body.balance-tab-active {
    overflow-y: hidden;
}

/* ---------- Sold history scrollbar & list reset (target your exact HTML) ---------- */
#sell-history > ul {
    max-height: 520px;
    overflow-y: auto;
    overflow-x: hidden;     /* prevent horizontal scrollbar */
    margin: 0;
    padding: 0 20px 0 0;     /* add right padding so text doesn't clash with scrollbar */
    list-style: none;
    box-sizing: border-box;

    scrollbar-width: thin;
    scrollbar-color: #fabcdb rgba(0,0,0,0.06);
}

/* WebKit browsers (Chrome, Edge, Safari) */
#sell-history > ul::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
#sell-history > ul::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.06);
    border-radius: 8px;
}
#sell-history > ul::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #fabcdb, #deafe7);
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.02);
}
#sell-history > ul::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #f48fb1, #c78aa8);
}

/* Make sure individual li still look the same but take full width */
#sell-history > ul > li.sale-order {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: transparent;
}

/* Tab content */
.history-content {
    display: none;
}

.history-content.active {
    display: block;
}

/* =======================
   INVENTORY ACTION BUTTONS
   ======================= */
/* Buttons positioned at bottom-right, inline with box */

#balance {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: linear-gradient(
        135deg,
        rgba(0, 191, 165, 0.2),   /* teal-ish with 30% opacity */
        rgba(0, 128, 128, 0.2)    /* darker teal with 30% opacity */
    );
    padding: 40px 30px;
    border-radius: 20px;
    margin: 40px auto;
    box-shadow: 0 15px 30px rgba(0,0,0,0.25);
    color: white;
    text-align: center;
    transition: transform 0.3s ease;
}

#balance:hover {
    transform: translateY(-5px);
}

.total-balance {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}

.currency-boxes {
    display: flex;
    gap: 20px;
}

.currency-box {
    background: rgba(255,255,255,0.2);
    padding: 20px 25px;
    border-radius: 12px;
    min-width: 150px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.currency-box:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-3px);
}

.currency-box p {
    font-size: 16px;
    margin-bottom: 8px;
}

.currency-box span {
    font-size: 24px;
    font-weight: bold;
    color: #fcd4e8;
}


.inventory-filters {
    text-align: center;
    margin-bottom: 100px !important;
    flex-direction: column;
}

.category-btn {
    display: block; /* makes each button take its own line */
    width: 100%; /* optional: stretch to container width */
    padding: 50px 100px !important; /* larger size */
    font-size: 30px; /* larger text */
    border-radius: var(--border-radius, 30px) !important; /* use your variable if you have one */
    border: 1px solid var(--border-color, #333); /* use your existing variable */
    background-color: rgba(240, 240, 240, 0.5) !important; /* 50% transparent */
    color: var(--button-text, #000); /* text color */
    margin-bottom: 10px; /* spacing between buttons */
    cursor: pointer;
    transition: background 0.2s;
}

.category-btn:hover {
    background-color: var(--button-hover-bg, #ddd);
    transform: scale(1.05);
}

.category-btn.active {
    background: linear-gradient(45deg, #fabcdb, #deafe7);
    color: #333;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.inventory-actions {
    display: flex;
    flex-direction: column;      /* total above buttons */
    align-items: flex-end;       /* stick to the right side */
    justify-content: center;     /* center vertically within their container */
    margin-right: 200px;          /* spacing from right wall */
    height: 100%;                /* allow vertical centering */
}

.inventory-actions button {
    padding: 6px 12px;   /* skinnier buttons */
    border: none;
    border-radius: 6px;
    background-color: rgba(250, 188, 219, 0.8); 
    color: #333;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.inventory-actions button:hover {
    background-color: #deafe7;
    transform: scale(1.05);
}

.quantity-controls button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    font-size: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quantity-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.quantity-display {
    display: inline-block;
    width: 24px;
    text-align: center;
    font-weight: bold;
    margin: 0 4px;
    color: #fff;
}

/* =========================
   SHIPPING FORM STYLING
   ========================= */
.shipping-form {
    background-color: rgba(255, 255, 255, 0.05); /* very subtle, almost transparent */
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 20px;
    border-radius: 12px;
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}


.shipping-wrapper {
    display: flex;
    gap: 40px;
    flex-wrap: wrap; /* stack on small screens */
    justify-content: center;
    align-items: stretch;
    flex-direction: row;
}

#shipping-popup::-webkit-scrollbar {
    width: 8px;
}
#shipping-popup::-webkit-scrollbar-thumb {
    background: #fabcdb;
    border-radius: 4px;
}
#shipping-popup::-webkit-scrollbar-track {
    background: #eee;
}

.shipping-history-container {
    flex: 1 1 auto;             /* keep it flexible in the layout */
    min-width: 300px;
    max-width: 500px;
    max-height: 640px;
    border-radius: 12px;
    border: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    overflow: hidden;           /* keeps rounded corners */
    overflow-y: auto;
}

.shipping-list {
    flex: 1 1 auto;             /* fill available height */
    overflow-y: auto;           /* enable vertical scroll */
    padding: 10px;
}

/* Custom scrollbar styling */
.shipping-history-container::-webkit-scrollbar {
    width: 10px;
}

.shipping-history-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.shipping-history-container::-webkit-scrollbar-thumb {
    background-color: #fabcdb; /* matches site accent */
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.shipping-history-container::-webkit-scrollbar-thumb:hover {
    background-color: #f48fb1;
}

/* Optional: make the list a bit nicer */
.shipping-history-container ul {
    list-style: none;
    padding-left: 0;
    margin-top: 10px;
}

.shipping-history-container li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.shipping-history-container li:last-child {
    border-bottom: none;
}

.shipping-form .form-row {
    display: flex;
    gap: 10px;
}

.shipping-form .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.shipping-form .form-group input {
    background-color: rgba(255, 255, 255, 0.3); /* subtle transparent */
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff; /* text visible on gradient background */
    padding: 10px;
    border-radius: 8px;
    font-size: 16px;
}

.shipping-form .form-group input:focus {
    outline: none;
    border-color: #fabcdb;
    box-shadow: 0 0 5px rgba(250, 188, 219, 0.5);
}

.shipping-form .full-width {
    flex: 1 1 100%;
}

.shipping-form .btn-save {
    padding: 12px 30px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    background-color: #fabcdb;
    color: #333;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-end;
}

.shipping-form .btn-save:hover {
    background-color: #deafe7;
    transform: scale(1.05);
}

.postal-row {
    display: flex;
    gap: 10px;
    align-items: flex-end; /* ensures button aligns with input bottom */
}

.postal-row input {
    flex: 1; /* input takes remaining space */
}

.postal-row button {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    background-color: #fabcdb;
    color: #333;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.postal-row button:hover {
    background-color: #deafe7;
    transform: scale(1.05);
}

/* =========================
   MODAL
   ========================= */

/* Modal Overlay */
.modal-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}



/* Show modal */
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Modal Box */
.modal-content {
    background: #4ca59c; /* Teal background */
    padding: 30px;
    border-radius: 12px;
    max-width: 1200px;
    width: 90%;
    text-align: center;
    transform: translateY(-50px);
    transition: transform 0.3s ease;
    color: #fff; /* Make text readable */
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    max-height:800px;
    overflow-y: auto;
}

/* Slide down when active */
.modal-overlay.active .modal-content {
    transform: translateY(0);
}

/* Modal Text */
.modal-content h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #fff;
}

/* Buttons */
.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.modal-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

/* Yes button */
#modal-yes {
    background: #fabcdb;
    color: #333;
}
#modal-yes:hover {
    background: #f99fc0;
}

/* No button */
#modal-no {
    background: rgba(241, 227, 227, 0.3);
    color: #fff;
}
#modal-no:hover {
    background: rgba(245, 241, 241, 0.5);
}

#sell-success-modal .-modal-contentSS {
    background: rgba(0,0,0,0.8);
    padding: 20px 40px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* vertically center inside modal box */
    align-items: center;    /* horizontally center */
    text-align: center;     /* for text elements inside */
    max-width: 400px;
    width: 80%;
    color: white;
}

#sell-balance-change {
    color: #ffffff; /* green */
}

#sell-success-modal {
    display: none; /* ensures it never flashes on page load */
}

/* Container spacing */
/* Container */
#history {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    height: 700px;
    overflow-y: auto;
}

/* Scrollbar track */
#history::-webkit-scrollbar {
    width: 10px;              /* Width of scrollbar */
}

/* Track background */
#history::-webkit-scrollbar-track {
    background: rgba(241, 241, 241, 0.4);       /* Light background for the track */
    border-radius: 10px;
}

/* Scrollbar thumb (the draggable part) */
#history::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1abc9c, #16a085);  /* Teal gradient */
    border-radius: 10px;
    border: 2px solid #f1f1f1;  /* Adds spacing around thumb */
}

/* Scrollbar thumb hover */
#history::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #16a085, #1abc9c);
}

/* Optional: very subtle shadow */
#history::-webkit-scrollbar-thumb:active {
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}


/* Title styling */
#history h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
    color: #333;
}

/* Table styling */
#history table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

/* Table header */
#history table th,
#history table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

/* Optional: add striped rows */
#history table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Row hover effect */
#history table tr:hover {
    background-color: #f0f8ff;
}

/* Buttons */
.view-cards-btn {
    padding: 6px 12px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s, transform 0.1s;
}

.view-cards-btn:hover {
    background-color: #357ab7;
    transform: translateY(-2px);
}

/* Fallback for empty state */
#history p {
    text-align: center;
    color: #777;
    font-size: 1.1rem;
    margin-top: 20px;
}

.inventory-top-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: linear-gradient(90deg, #fabcdb, #8d5f76);
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    flex-direction: column;
    margin-left: 40px;
}

.inventory-top-bar label {
    font-size: 14px;
    font-weight: bold;
    color: white;
}

.inventory-top-bar select {
    padding: 6px 10px;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.inventory-top-bar select:focus {
    outline: none;
    box-shadow: 0 0 6px rgba(255,255,255,0.7);
}

#select-all-btn {
    padding: 6px 12px;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    background: #8d5f76;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

#select-all-btn:hover {
    background: #6c475b;
    transform: translateY(-2px);
}

/* ---------- Topup History ---------- */
#topup-history {
    width: 100%;
    padding: 10px 15px;
    box-sizing: border-box;
    max-height: 520px;        /* same as sell-history */
    overflow-y: auto;
}

/* Custom scrollbar matching sell-history */
#topup-history::-webkit-scrollbar {
    width: 8px;
}

#topup-history::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.06);
    border-radius: 8px;
}

#topup-history::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #fabcdb, #deafe7);
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.02);
}

#topup-history::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #f48fb1, #c78aa8);
}

/* Firefox */
#topup-history {
    scrollbar-width: thin;
    scrollbar-color: #fabcdb rgba(0,0,0,0.06);
}

/* History Grid & Row */
#topup-history .history-grid {
    display: flex;
    flex-direction: column;
    gap: 10px; /* space between rows */
}

#topup-history .history-row {
    display: flex;
    justify-content: space-between; /* 3 columns */
    align-items: center;
    padding: 10px 15px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    font-size: 16px;
    color: white;
}

#topup-history .history-col {
    flex: 1;
    text-align: center;
    min-width: 100px;
}

#topup-history .history-col:first-child {
    text-align: left;
}

#topup-history .history-col:nth-child(2) {
    text-align: center;
}

#topup-history .history-col:last-child {
    text-align: right;
}

/* Responsive */
@media (max-width: 1080px) {
    #topup-history .history-row {
        font-size: 14px;
        padding: 8px 10px;
    }
    #topup-history .history-col {
        min-width: 80px;
    }
}



/* =======================
   1080p
   ======================= */

/* CSS for screens 1920px wide or smaller */
@media (max-width: 1920px) {
    .inventory-filters{
        font-size: 5px;
        margin-bottom: 100px !important;
    }

    .category-btn{
        width:300px;
        font-size: 20px;
        padding: 15px 100px !important;
    }

    .inventory-box{
        min-width: 1000px;
        max-width: 1000px;
        height: 490px;

    }

    .inventory-actions{
        margin-right: 100px;
    }

    .inventory-card{
        width: 160px;
    }

    #history-box{
        height: 450px;
    }

    #history{
        height: 580px;
    }
}

   /* =======================
   1080p
   ======================= */

/* =========================
   MYPAGE PROFILE + LEVEL REWARDS
   ========================= */

/* Container for profile page */
.page-content#mypage {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    margin: 20px auto;
    max-width: 1200px;
}

/* Left & Right columns */
.page-content#mypage > div {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Profile image */
.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 3px solid rgba(250, 188, 219, 0.5);
}

/* User name and email */
#mypage h2 {
    font-size: 1.6rem;
    margin: 10px 0;
    color: #fff;
    text-align: center;
}

#mypage p {
    font-size: 0.95rem;
    color: #ddd;
    text-align: center;
    margin: 5px 0;
}

/* VIP Badge styling */
.vip-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 5px;
    font-size: 0.9rem;
    text-align: center;
}

/* Level & progress bar */
.level-container {
    margin-top: 15px;
    width: 100%;
    text-align: center;
}

.progress-bar {
    width: 180px;
    height: 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin: 5px auto 0 auto;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fabcdb, #deafe7);
    border-radius: 8px 0 0 8px;
    transition: width 0.3s ease;
}

/* Age group */
.age-group-container {
    margin-top: 10px;
    text-align: center;
}

.age-group-container .clickable {
    cursor: pointer;
    color: #00f;
    text-decoration: underline;
}

#age-group-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
    align-items: center;
}

#age-group-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 1rem;
}

#age-group-form button {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    background: #fabcdb;
    color: #333;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

#age-group-form button:hover {
    background: #deafe7;
    transform: scale(1.05);
}

/* Level rewards (right column) */
.level-rewards {
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
}

.level-rewards .reward {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, background 0.3s ease;
}

.level-rewards .reward:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.1);
}

.claim-btn, .claimed-btn {
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.claim-btn {
    background: #fabcdb;
    color: #333;
}

.claim-btn:hover {
    background: #deafe7;
    transform: scale(1.05);
}

.claimed-btn {
    background: gray;
    color: #fff;
    cursor: default;
}

/* Responsive adjustments */
@media (max-width: 1080px) {
    .page-content#mypage {
        flex-direction: column;
        align-items: center;
    }

    .page-content#mypage > div {
        min-width: 90%;
    }

    .progress-bar {
        width: 100%;
    }
}

.user-vip-status .vip-badge {
    font-weight: bold;
    font-size: 1.2rem;
    padding: 6px 14px;
    border-radius: 16px;
    display: inline-block;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

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

.vip-badge.koripavip {
    background: linear-gradient(270deg, #ff80b3, #20f0d0, #ffb6c1);
    background-size: 600% 600%;
    color: #fff;
    box-shadow: 0 0 20px #ff80b3, 0 0 35px #20f0d0, 0 0 50px #ffb6c1;
    animation: shimmerGradient 6s ease infinite, pulseGlow 2.5s ease-in-out infinite;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vip-badge.koripavip:hover {
    transform: scale(1.12) rotate(-1deg);
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px #ff80b3, 0 0 35px #20f0d0, 0 0 50px #ffb6c1; }
    50% { box-shadow: 0 0 30px #ff80b3, 0 0 45px #20f0d0, 0 0 70px #ffb6c1; }
}

/* KoripaVIP badge animations */
.vip-badge[data-vip="koripavip"] {
    position: relative;
    font-weight: bold;
    padding: 0.5em 1.2em;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: vip-glow 2s infinite alternate;
    cursor: default;
    transition: transform 0.3s ease;
}

.vip-badge[data-vip="koripavip"]:hover {
    transform: scale(1.15) rotateZ(2deg);
}

@keyframes vip-glow {
    0% {
        box-shadow: 0 0 10px #ff80b3, 0 0 20px #20f0d0, 0 0 30px #ffb6c1;
        background-position: 0% 50%;
    }
    50% {
        box-shadow: 0 0 15px #ffb6c1, 0 0 25px #ff80b3, 0 0 35px #20f0d0;
        background-position: 50% 50%;
    }
    100% {
        box-shadow: 0 0 10px #20f0d0, 0 0 20px #ffb6c1, 0 0 30px #ff80b3;
        background-position: 100% 50%;
    }
}

/* Animated gradient text inside badge */
.vip-badge[data-vip="koripavip"] {
    background: linear-gradient(270deg, #ff80b3, #20f0d0, #ffb6c1, #ff80b3);
    background-size: 600% 600%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: white;
    animation: gradientMove 3s ease infinite;
}

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

/* Invite Code Box */
.invite-code-box {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    background-color: rgba(248, 167, 255, 0.2);
}

/* Title */
.invite-code-box .invite-title {
    font-weight: bold;
    margin-bottom: 8px;
}

/* Invite Code Display */
.invite-code-box #invite-code {
    font-family: monospace;
    font-size: 1.25rem;
    color: #2563eb;
    margin-bottom: 12px;
}

/* Buttons container */
.invite-code-box .invite-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* Copy button */
.invite-code-box #copy-invite-code {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background-color: #10b981;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.invite-code-box #copy-invite-code:hover {
    background-color: #059669; /* slightly darker on hover */
}

/* Invite page link */
.invite-code-box .invite-buttons a {
    text-decoration: none;
    color: white;
    background-color: #2563eb;
    padding: 6px 12px;
    border-radius: 4px;
    display: inline-block;
    transition: background 0.2s;
}

.invite-code-box .invite-buttons a:hover {
    background-color: #1d4ed8; /* slightly darker on hover */
}

/* Keep link gray and unclickable if phone not verified */
.disabled-link {
    color: #aaa;
    pointer-events: none; /* disables click */
    cursor: not-allowed;
    text-decoration: none;
}

/* Warning text below button */
.phone-warning {
    color: #f87171; /* red-ish */
    font-weight: bold;
    margin-top: 6px;
    text-align: center;
}

/* Flex layout for phone + button */
.phone-verify-row {
    display: flex;
    gap: 10px;
    align-items: flex-end; /* Aligns button with input bottom */
}

#verify-phone-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    background-color: #fabcdb;
    color: #333;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

#verify-phone-btn:hover {
    background-color: #deafe7;
    transform: scale(1.05);
}

.PhoneClassModal {
    display: none; /* hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.PhoneClassModal.show {
    display: flex;
}

.PhoneClassModal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
}

.PhoneClassModal .modal-content {
    position: relative;
    background: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: inline-block; /* shrink to fit content */
    width: 300px;      /* never exceed 90% of viewport */
    white-space: nowrap;   /* prevent unwanted wrapping for short text */
    z-index: 1;
}

.PhoneClassModal .modal-content p {
    margin: 0;
    font-size: 16px;
}

.PhoneClassModal .modal-content.success p {
    color: green;
}

.PhoneClassModal .modal-content.error p {
    color: red;
}

.PhoneClassModal .modal-content button {
    margin-top: 15px;
    padding: 8px 16px;
    border: none;
    background: #4CAF50;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

/* Verification Code Input */
#verification_code {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    text-align: center;
    width: 200px;
    transition: all 0.3s ease;
}

#verification_code:focus {
    outline: none;
    border-color: #fabcdb;
    box-shadow: 0 0 8px rgba(250, 188, 219, 0.5);
    background-color: rgba(255, 255, 255, 0.2);
}

/* Verify Code Button */
#verify-code-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(45deg, #fabcdb, #deafe7);
    color: #333;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

#verify-code-btn:hover {
    background: linear-gradient(45deg, #deafe7, #f48fb1);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(250, 188, 219, 0.5);
}

.profile-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.tab-btn {
    font-size: 30px;
    padding: 20px 80px;
    border: none;
    background-color: rgba(255,255,255,0.2);
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    color: #fff;
    transition: all 0.3s ease;
}
.tab-btn:hover {
    background-color: rgba(255,255,255,0.3);
    transform: scale(1.05);
}
.tab-btn.active {
    background-color: #fabcdb;
    color: #333;
}

.page-content {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: none;
    text-align: center;
    min-height: 200px;
}
.page-content.active {
    opacity: 1;
    display: block;
}

.page-container{
    display: flex;
    top: -5%;
    justify-content: center;
    flex-direction: column;
}

.tab-btn{
    text-decoration: none; /* remove underline */
    display: inline-block; /* keep button-like behavior */
}

/* Mobile: hide desktop, show mobile */
@media (max-width: 760px) {
    .navbar {
        display: none;
    }
    .hamburger-navbar {
        display: block;
    }
    .tab-btn{
        font-size: 20px;
        padding: 15px;
    }
    #balance{
        width: 320px;
    }
    #history-box{
        max-width: 320px;
        min-width: 0px;
    }
    .inventory-wrapper{
        flex-direction: column;
    }
    .inventory-box{
        max-width: 230px;
        min-width: 230px;
        margin-right: 20px;
    }
    .inventory-top-bar{
        margin-right: 140px;
    }
    .inventory-actions{
        margin-right: 55px;
    }
    .shipping-form{
        max-width: 300px;
    }
    .shipping-form .form-row{
        flex-direction: column;
    }
}

/* Mobile: hide desktop, show mobile */
@media (min-width: 760px) {
    .navbar {
        display: flex;
    }
    .hamburger-navbar {
        display: none !important;
    }
}

@media (max-width: 768px) {
    /* Stack everything vertically */
    .inventory-wrapper {
        flex-direction: column;
        align-items: center; /* center horizontally */
        gap: 20px;
        padding: 10px;
    }

    /* Make inventory-box full width and remove fixed width */
    .inventory-box {
        width: 80% !important;
        max-width: 95% !important;
        padding: 20px !important;
        min-width: auto !important;
        height: auto; /* adjust height for mobile */
        overflow: visible; /* allow content to flow */
        justify-content: center; /* center cards horizontally */
        height: 800px;
        overflow-y: auto;
        margin: 0px;
    }

    /* Stack cards in the center */
    .inventory-card {
        width: 80% !important;
        max-width: 300px;
        margin: 0 auto;
    }

    /* Center inventory actions below the box */
    .inventory-actions {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 20px 0 !important;
    }

    /* Category buttons stacked vertically */
    .inventory-filters {
        display: flex;
        flex-direction: column !important;
        align-items: center;
        gap: 0px;
        margin-bottom: 0px;
    }

    .category-btn {
        width: 80% !important;
        max-width: 300px;
        font-size: 18px !important;
        padding: 15px !important;
    }

    /* Center the total and buttons */
    .selected-total {
        text-align: center;
    }

    #sell-btn,
    #ship-btn {
        width: 80%;
        max-width: 300px;
        margin: 10px 0;
        text-align: center;
    }

    /* Inventory top bar adjustments */
    .inventory-top-bar {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin: 0px;
    }

    .inventory-top-bar select,
    .inventory-top-bar button {
        width: 80%;
        max-width: 250px;
    }
}

/* Styles for verified phone input */
.verified-phone {
    background-color: #f0f0f0; /* greyed out */
    border: 1px solid #ccc;
    color: #555; /* dimmed text */
    cursor: not-allowed; /* shows not-editable cursor */
}

.phoneverifymodalyes {
    display: none; /* hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.phoneverifymodalyes.active {
    display: flex;
}

.phoneverifymodalyes-content {
    background: #222;
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    text-align: center;
}
.phoneverifymodalyes-content button {
    margin-top: 15px;
    padding: 5px 15px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: teal;
    color: white;
}

/* Hide modal by default */
#PhoneModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

/* Optional: show when "show" class is added */
#PhoneModal.show {
    display: flex; /* or block */
    justify-content: center;
    align-items: center;
}

.modal-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    position: relative;
    padding: 20px;
    border-radius: 10px;
    z-index: 10;
    background: rgba(81, 241, 220, 0.3);
}

.footer-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2147483647; /* higher than all existing modals */
}

.footer-modal-overlay.show {
  display: flex;
}

.footer-modal-content {
  background: rgb(2, 126, 120);
  color: white;
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 12px;
  padding: 20px;
  position: relative;
}

.footer-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
}