

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    
}

:root {
    --primary: #e67e22;
    --secondary: #2c3e50;
    --bg-secondary: #f0efef;
}

body {
    overflow-x: hidden;
    font-family: "Poppins", san-serif;
}

header {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    
}

/* Notification Badge */
.notifs {
    position: relative; /* Needed for positioning the badge */
    cursor: pointer;
}

.badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: #e74c3c; /* Red */
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
    border: 2px solid #fff; /* White ring to separate from text */
}

 .nav {
    position: fixed; 
    z-index: 99; 
    top: 0; 
    left: 0;
    width: 0;
    height: 100%;
    overflow-x: hidden;
    transition: 0.5s; 
    background: var(--primary);
    list-style: none;
    padding-top: 80px;
}

nav ul {
    list-style: none;
}

.nav a {
    display: block;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 13px;
    padding-left: 40px;
    color: #fff;
}

.nav .closebtn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}

.menu .toggle {
    cursor: pointer;
}

/* Toast Notification Container */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Individual Toast */
.toast {
    background-color: #2c3e50; /* Dark Blue/Grey */
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    min-width: 280px;
    border-left: 5px solid #f1c40f; /* Gold accent for Achievements */
    
    /* Animation: Slide in, stay, then fade out */
    animation: slideIn 0.5s ease-out, fadeOut 0.5s ease-in 4.5s forwards;
    opacity: 0; /* Start hidden for animation */
    animation-fill-mode: forwards; /* Keep final state */
}

/* Text Styling */
.toast-icon { font-size: 24px; margin-right: 15px; }
.toast-content h4 { margin: 0; font-size: 16px; color: #f1c40f; }
.toast-content p { margin: 2px 0 0; font-size: 14px; color: #ddd; }

/* Keyframes */
@keyframes slideIn {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; display: none; }
}

/* === WALLET AREA === */

.wallet {
    position: relative;
    width: 100%;
    margin-bottom: 80px;
    padding: 0 20px; /* Reduced padding for mobile space */
}

.wallet .text {
    margin-bottom: 20px;
    padding-left: 10px;
}

.wallet .text span {
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--primary);
}

/* CAROUSEL CONTAINER */
.carousel {
    position: relative;
    width: 100%;
    max-width: 600px; /* Prevents it from getting too huge on desktop */
    margin: 0 auto;
    height: 250px; /* Fixed height to keep layout stable */
}

/* TRACK CONTAINER (The Window) */
.carousel-track-container {
    background: white;
    width: 100%; 
    height: 100%;
    position: relative;
    border-radius: 10px;
    overflow: hidden; /* Hides the second card */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* THE TRACK (The Moving Strip) */
.carousel-track {
    padding: 0;
    list-style: none;
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    transition: transform 0.4s ease-in-out; 
}

/* Find this class in your CSS and update it */
.carousel-slide {
    min-width: 100%;
    height: 100%;
    box-sizing: border-box;
    flex-shrink: 0; /* <--- ADD THIS LINE! Important for mobile */
}

/* CARD CONTENT */
.card-content {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers text vertically */
    height: 100%;
    padding: 2rem;
    background: var(--primary);
}

.carousel-slide:nth-child(2) .card-content {
    background-color: var(--secondary);
}

.card-header h3 { color: #fff; margin-bottom: 10px; }

.balance { padding-bottom: 15px; }
.balance p { color: #fff; font-size: 1rem; }
.balance span {
    font-size: 3.5rem; /* Adjusted for mobile fit */
    font-weight: 900;
    margin-right: 10px;
}

.card-footer { border-top: 1px solid rgba(255,255,255,0.3); padding-top: 20px; }
.card-footer a {
    text-decoration: none;
    padding: 8px 20px;
    background: #fff;
    color: var(--primary);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* NAVIGATION ARROWS */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex; /* Flex to center the icon */
    align-items: center;
    justify-content: center;
    color: var(--primary);
    z-index: 10;
}

.btn-prev { left: -15px; }
.btn-next { right: -15px; }

.carousel-btn:hover { background: #f9f9f9; transform: translateY(-50%) scale(1.1); }
.carousel-btn:disabled { opacity: 0; cursor: default; } /* Hide button if at end */

/* MOBILE TWEAKS */
@media (max-width: 720px) {
    .wallet { padding: 0 10px; } /* More space for card */
    .btn-prev { left: -5px; }
    .btn-next { right: -5px; }
    .balance span { font-size: 2.5rem; }
}

/* === END WALLET AREA === */

/* === DAILY STREAK === */
.info {
    display: flex;
    flex-wrap: wrap;
}

.streak {
    width: 80%;
    max-width: 400px;
    margin-left: 40px;
    background-color: #f4f4f4;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.streak .content .days {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 40px;
}

.streak .days p {
    padding-right: 20px;
    width: 60%;
}

.streak .days span {
    font-size: 3rem;
    display: block;
    font-weight: 900;
    background-color: var(--primary);
    padding: 8px 20px;
    margin-left: 40px;
    color: #fff;
    border-radius: 40px;
}

.streak .content .claim {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
}

.streak .claim a {
    text-decoration: none;
    padding: 10px 15px;
    color: #fff;
    background-color: var(--primary);
    border-radius: 5px;
    font-weight: bold;
}

/* === END DAILY STREAK */

/* === REFERRAL AREA === */
.refer {
    background-color: var(--primary);
    color: #fff;
}

.streak .content .ref-count {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 40px;
}

.streak .ref-count p {
    padding-right: 20px;
    width: 60%;
    color: #fff;
}

.streak .ref-count span {
    font-size: 3rem;
    display: block;
    font-weight: 900;
    color: var(--primary);
    padding: 10px 40px;
    margin-left: 40px;
    background-color: #fff;
    border-radius: 50%;
}

.streak .content .ref-link {
    width: 100%;
    padding-bottom: 20px;
}

.streak .content .ref-link p {
    padding: 10px 0;
}

.streak .ref-link input[type="text"] {
    padding: 13px 10px;
    width: 100%;
    max-width: 400px;
    border: none;
    color: #bbb;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.streak .ref-link a {
    text-decoration: none;
    padding: 10px 15px;
    background-color: #fff;
    color: var(--primary);
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    font-weight: bold;
}

.streak .ref-progress .bar {
    width: 90%;
    background-color: #fff;
    height: 10px;
    border-radius: 10px;
    margin: 10px 0;
}

.ref-progress .color {
    width: 70%;
    height: 100%;
    border-radius: 10px;
    background-color: #7aff00;
}
/* === END REFERRAL AREA === */

/* ==== RESPONSIVE STYLING ==== */
@media (max-width: 720px) {

.streak {
    margin-left: 20px;
}

.streak .ref-link input[type="text"] {
    padding: 13px 10px;
    width: 70%;
    border: none;
    color: #bbb;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}


/* === END REFERRAL AREA === */
}

/* ========================= */
/* === PROFILE.HTML === */
/* ========================= */
.p-main {
    background-color: var(--bg-secondary);
    padding: 20px;
}

.p-main h1 {
    color: var(--secondary);
}

.main-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 20px 0;
}

.p-info {
    width: 95%;
    max-width: 480px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    background-color: #fff;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
}

.p-info .info-head {
    text-align: center;
    margin: auto;
    margin-bottom: 40px;
    color: var(--secondary);
}

/* COSMETIC STYLES */
.info-img {
    margin: 0 auto;
    position: relative;
    width: 100px; /* Ensure fixed size */
    height: 100px;
    border-radius: 50%;
    padding: 3px; /* Space for border */
}

.info-img img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Dynamic Border Classes (Matches database asset_value) */
.border-gold { border: 4px solid #FFD700; box-shadow: 0 0 15px rgba(255, 215, 0, 0.6); }
.border-red { border: 4px solid #ff4757; box-shadow: 0 0 15px rgba(255, 71, 87, 0.6); }
.border-blue { border: 4px solid #3498db; box-shadow: 0 0 15px rgba(52, 152, 219, 0.6); }
.border-glow { animation: glow 2s infinite alternate; border: 4px solid #fff; }

@keyframes glow {
    from { box-shadow: 0 0 5px #fff, 0 0 10px #e67e22; }
    to { box-shadow: 0 0 20px #fff, 0 0 30px #e67e22; }
}

.p-info .info-head .uname {
    margin-bottom: 10px;
}

.p-info .info-head .uname span {
    color: #fff;
    font-size: 1.5rem;
    background-color: var(--primary);
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
} 

.p-info .info-head .p-tier {
    padding: 5px 15px;
    background-color: #4ed6ff;
    color: #fff;
    margin-right: 10px;
    border-radius: 15px;
}

.p-info .info-head .p-role {
    padding: 5px 15px;
    background-color: #54ff4e;
    color: #fff;
    margin-right: 10px;
    border-radius: 15px;
    margin-top: 10px;
}

.p-info .info-head .user-title {
    padding: 5px 15px;
    display: inline-block;
    background-color: #e21d1d;
    color: #fff;
    margin-right: 10px;
    border-radius: 15px;
    margin-top: 10px;
}

.p-info .info-content .info-value {
    margin-bottom: 10px;
}

.p-info .info-value input[type="text"] {
    padding: 8px 15px;
    width: 90%;
}

.p-info .info-value a {
    text-align: center;
    text-decoration: none;
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--primary);
    border-radius: 30px;
    color: #fff;
    margin-top: 10px;
}

.p-content {
    width: 95%;
    max-width: 720px;
    background-color: #fff;
    border-radius: 5px;
    padding: 20px;
}

.p-title h1 {
    display: inline-block;
    position: relative;
    margin-bottom: 20px;
    color: var(--secondary);
}

.p-title h1::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 50%;
    height: 5px;
    background-color: var(--primary);
}

.p-title .title-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.p-title .title-card {
    text-align: center;
    margin-right: 15px;
    margin-bottom: 20px;
}

.p-title .title-card form button {
    padding: 4px 15px;
    border: 2px solid var(--primary);
    border-radius: 20px;
    margin-top: 10px;
    background-color: #fff;
}

.p-title .title-card form button:hover {
    background-color: var(--bg-secondary);
}

.p-title .title-card strong {
    margin-top: 10px;
    display: inline-block;
    font-size: 1.1rem;
    color: #7aff00;
}

.p-title .title-card h2 {
    display: inline-block;
    color: #fff;
    padding: 10px 15px;
    font-size: 1.4rem;
    background-color: var(--primary);
    border-radius: 40px;
    margin-bottom: 10px;
}
.p-title .title-card p {
    color: #bbb;
}

.p-title .title-card a {
    text-decoration: none;
    color: var(--primary);
    display: block;
    width: 800px;
    margin-top: 20px;
}

.p-history {
    width: 100%;
    color: var(--secondary);
}

.p-history .content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.content .history-card {
    width: 100%;
    max-width: 320px;
    padding: 20px;
    background-color: var(--bg-secondary);
    margin-right: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.content .history-card span {
    font-size: 3rem;
    color: var(--primary);
    font-weight: bold;
    display: inline-block;
    margin-bottom: 10px;
}
.content .history-card h3 {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* ========================= */
/* === WITHDRAW.HTML === */
/* ========================= */
.w-main {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
}

.w-main .credit-card {
    width: 100%;
    max-width: 480px;
    padding: 20px 80px 20px 20px;
    color: #fff;
    background-color: var(--primary);
    border-radius: 5px;
    z-index: 2;
}

.credit-card .head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}
.credit-card .num {
    margin-bottom: 20px;
}

.w-form {
    margin: 20px 0;
}

.w-form form {
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 5px;
}

form .info-value input[type="text"],
form .info-value input[type="submit"],
form .info-value select {
    padding: 8px 15px;
    width: 100%;
    margin-bottom: 20px;
}

form .info-value input[type="submit"] {
    background-color: var(--primary);
    border: none;
    color: #fff;
    padding: 15px;
    font-size: 1rem;
    border-radius: 5px;
}

/* ========================== */
/* ===== SETTINGS.HTML ====== */
/* ========================== */
.s-main {
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-secondary);
    display: flex;
    justify-content: center;
    padding: 20px;
}

.s-main .s-content {
    width: 100%;
    max-width: 720px;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
}

.s-content .s-card {
    margin-bottom: 10px;
    overflow: hidden;
}

.s-content .accordion {
    background-color: var(--primary);
    color: #fff;
    cursor: pointer;
    padding: 20px;
    outline: none;
    font-size: 1.4rem;
    border: none;
    width: 100%;
    text-align: left;
    margin-bottom: 20px;
    display: flex;
    align-content: center;
    justify-content: space-between;
    transition: 0.4s;
}

.active, .accordion:hover {
    background-color: var(--secondary);
}

.s-content .panel {
    max-height: 0;
    overflow: hidden;
    padding: 0 15px;
    transition: max-height 0.3s ease;
}

.panel form p {
    margin-bottom: 10px;
}

.panel form input[type="text"],
.panel form input[type="password"],
.panel form input[type="submit"] {
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    border: none;
    background-color: var(--bg-secondary);
    border-radius: 5px;
}
.panel form input[type="submit"] {
    background-color: var(--primary);
    color: #fff;
}

.panel form input[type="submit"]:hover {
    background-color: var(--secondary);
}