/* THYPTAP MAIN STYLES (Firebase SPA Version) */

/* VARIABLES */
:root {
    --primary: #9B046F;
    --secondary: #A7C957;
    --danger: #ef4444;
    --surface: #ffffff;
    --bg: #f0f2f5;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 16px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --header-h: 70px;
}

/* GLOBAL RESET */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    padding-top: var(--header-h);
    overflow-x: hidden;
    width: 100%;
    position: relative;
    overflow-wrap: break-word;
    /* Prevent long text overflow */
}

.no-scroll {
    overflow: hidden !important;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    touch-action: manipulation;
}

/* UTILS */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.hidden {
    display: none !important;
}

/* AUTH UI SYNC HINTS */
.auth-hint .guest-only {
    display: none !important;
}

.mobile-only {
    display: none !important;
}

@media (max-width: 992px) {
    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }
}

/* LAYOUT GRID */
.grid-layout {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 25px;
    padding-top: 25px;
    padding-bottom: 25px;
    align-items: start;
    /* Ensure top alignment */
}

/* WIDE MODE (Profile Split) */
.mode-profile-wide {
    grid-template-columns: 1fr;
    max-width: 1100px;
    /* Constrain slightly for readability */
}

.mode-profile-wide .left-sidebar,
.mode-profile-wide .right-sidebar {
    display: none;
}

/* On desktop, keep left sidebar */
@media (min-width: 992px) {
    .mode-profile-wide {
        grid-template-columns: 260px 1fr !important;
        /* Force 2 columns */
    }

    .mode-profile-wide .left-sidebar {
        display: block !important;
    }

    .mode-profile-wide .right-sidebar {
        display: none !important;
    }

    /* Split Wrapper Grid */
    .profile-split-wrapper {
        display: grid;
        grid-template-columns: 300px 1fr;
        gap: 30px;
        align-items: start;
    }

    .profile-sticky-side {
        position: sticky;
        top: 110px;
        /* Header + padding */
    }

    .profile-content-side .dash-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 3 cols is plenty for this width */
    }
}

/* COMPONENTS */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

/* --- GRID & WRAPPING STABILITY --- */
#app-content {
    min-width: 0;
    /* Prevents 1fr grid column from expanding */
}

/* Custom Inbox Truncation */
#inbox-list .menu-item div {
    min-width: 0;
}

.inbox-msg-preview {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
}


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    font-size: 0.95rem;
    transition: 0.2s;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(155, 4, 111, 0.2);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    width: auto;
    padding: 8px;
}

.btn-ghost:hover {
    background: #f1f5f9;
    color: var(--primary);
}

/* INLINE CREATE POST */
.create-post-inline {
    padding: 0;
    overflow: hidden;
    transition: 0.3s;
}

/* Collapsed State */
.cp-collapsed {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    cursor: pointer;
    background: #fff;
    transition: 0.2s;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.cp-collapsed:hover {
    background: #f8fafc;
}

.cp-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.cp-placeholder {
    flex: 1;
    color: var(--text-muted);
    font-size: 1.05rem;
    background: #f1f5f9;
    padding: 12px 20px;
    border-radius: 50px;
}

.cp-expanded {
    overflow: hidden;
    padding: 20px;
}

.cp-preview {
    margin: 15px 0;
    background: #f8fafc;
    padding: 10px;
    border-radius: 12px;
    text-align: center;
}

.cp-tools {
    display: flex;
    gap: 15px;
}

/* HEADER */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* PUBLIC POST DIVIDER */
.public-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 30px 0;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.public-divider::before,
.public-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
    margin: 0 15px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo svg {
    width: 32px;
    height: 32px;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 20px;
    display: none;
    flex: 1;
    /* Center it */
}

@media (min-width: 900px) {
    .search-box {
        display: block;
    }
}

.search-input {
    width: 100%;
    background: #f1f5f9;
    border: none;
    padding: 12px 20px 12px 45px;
    border-radius: 50px;
    font-size: 0.95rem;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 12px;
    color: #94a3b8;
}

.nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    min-width: 120px;
    /* Prevent collapse */
    justify-content: flex-end;
}

.nav-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 1.1rem;
}

.nav-icon-btn:hover {
    background: #e2e8f0;
    color: var(--primary);
}

.my-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    cursor: pointer;
}

/* SIDEBAR LEFT */
.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 12px;
    margin-bottom: 5px;
}

.menu-item:hover,
.menu-item.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.menu-item i {
    width: 25px;
    text-align: center;
    font-size: 1.2rem;
}

/* HERO GUEST */
.guest-hero {
    padding: 60px 40px;
    text-align: center;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-avatars {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    position: relative;
    height: 80px;
    width: 200px;
}

.hero-av {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: absolute;
    object-fit: cover;
    transition: 0.3s;
}

.hero-av:nth-child(1) {
    left: 0;
    z-index: 1;
    transform: scale(0.9);
    opacity: 0.8;
}

.hero-av:nth-child(2) {
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    width: 90px;
    height: 90px;
    top: -5px;
    border-color: var(--primary);
}

.hero-av:nth-child(3) {
    right: 0;
    z-index: 1;
    transform: scale(0.9);
    opacity: 0.8;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 25px 0;
}

.stat-item {
    text-align: center;
}

.stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 5px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

.hero-desc {
    max-width: 500px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.btn-hero {
    padding: 15px 40px;
    font-size: 1.1rem;
    background: var(--text-main);
    color: white;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-hero:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(155, 4, 111, 0.25);
}

/* FEED & POSTS */
.create-post-box {
    padding: 20px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.cp-input {
    flex: 1;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 15px;
    cursor: pointer;
    transition: 0.2s;
}

.cp-input:hover {
    background: #fff;
    border-color: var(--primary);
}

.cp-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.cp-btn {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 8px;
}

.cp-btn:hover {
    background: #f0fdf4;
    color: var(--secondary);
}

/* MANIFESTO CARD STYLES */
.post-card {
    padding: 0;
    border-radius: 24px;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    height: 500px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.post-card:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.post-media-half {
    height: 40%;
    width: 100%;
    background: #000;
    position: relative;
}

.post-media-half img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-text-half {
    height: 60%;
    padding: 25px;
    display: flex;
    flex-direction: column;
    text-align: center;
    background: white;
    position: relative;
}

.author-badge {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 5px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.author-badge img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.manifesto-text {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 500;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
    height: 2.8em;
    /* Fixed height for 2 lines */
}

.manifesto-meta {
    margin-top: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.post-actions {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* SIDEBAR RIGHT */
.widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-main);
}

.user-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.user-list-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.user-list-name {
    font-weight: 700;
    font-size: 0.9rem;
    display: block;
}

.user-list-bio {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* MODALS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    padding: 30px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    /* Hide scrollbar for Chrome, Safari and Opera */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.modal-box::-webkit-scrollbar {
    display: none;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.form-input,
.form-textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    box-sizing: border-box;
    /* Explicit safety */
    overflow-y: auto;
    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.form-textarea::-webkit-scrollbar {
    display: none;
}

.form-input:focus {
    border-color: var(--primary);
}

/* TEXT TOOLBAR */
.text-toolbar {
    display: flex;
    gap: 5px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-bottom: none;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    align-items: center;
}

.toolbar-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-main);
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
}

.toolbar-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Connect toolbar to textarea below it */
.text-toolbar+.form-textarea {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* TOASTS */
#toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
    align-items: center;
}

.toast-item {
    background: white;
    padding: 20px 30px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
    pointer-events: auto;
    text-align: center;
}

/* Purchased Button Style for Marketplace */
.btn-purchased {
    background: #10b981 !important;
    /* Tailwind green-500 */
    color: white !important;
    border: none !important;
    font-weight: 700 !important;
    transition: all 0.2s ease;
}

.btn-purchased:hover {
    background: #059669 !important;
    /* Tailwind green-600 */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}


.toast-item.success {
    background: var(--primary);
    color: white;
}

.toast-item.error {
    background: #fff0f0;
    color: #d32f2f;
    border: 2px solid #ffcdd2;
}

.toast-item.loading {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

/* AUTH STATES */
body.logged-in .guest-only {
    display: none !important;
}

body:not(.logged-in) .auth-only {
    display: none !important;
}

/* Fix for User Nav (Profile/Bell overlap) */
#user-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Toast Animation */
@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .grid-layout {
        grid-template-columns: 1fr !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        gap: 15px;
        min-width: 0 !important;
    }

    .container {
        padding: 0 15px !important;
        min-width: 0 !important;
        max-width: 100vw !important;
    }

    /* Toggle Profile Views on Mobile */
    .profile-grid-view {
        display: none !important;
    }

    .profile-list-view {
        display: block !important;
    }

    body {
        padding-top: 110px;
        /* 70px header + 40px extra spacing */
        min-width: 0 !important;
        overflow-x: hidden !important;
    }

    /* FORCE HIDE SIDEBARS ON MOBILE */
    .left-sidebar,
    .right-sidebar,
    aside.left-sidebar,
    aside.right-sidebar {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* Booster/Crowdfund Widget Refinements for ALL Mobile/Tablet views */
    .booster-card,
    .crowdfund-card {
        padding: 16px !important;
        margin-left: 15px !important;
        margin-right: 15px !important;
        max-width: calc(100% - 30px) !important;
        box-sizing: border-box !important;
        width: auto !important;
    }

    .booster-title,
    .crowdfund-title {
        font-size: 1.1rem !important;
    }

    /* Prevent overflow from long addresses */
    .booster-address,
    .crowdfund-address {
        word-break: break-all !important;
        white-space: normal !important;
    }

    /* Mobile Inline Widget Containers (between posts) */
    .mobile-widget-inline {
        margin: 15px 0;
        padding: 0;
    }

    /* Match the successful profile page layout: 15px margins, calculated width */
    .mobile-widget-inline .booster-card,
    .mobile-widget-inline .crowdfund-card {
        margin-left: 15px !important;
        margin-right: 15px !important;
        max-width: calc(100% - 30px) !important;
        width: auto !important;
        box-sizing: border-box !important;
    }


    .guest-hero {
        padding: 30px 20px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-stats {
        gap: 15px;
    }

    .stat-num {
        font-size: 1.4rem;
    }
}

/* NATIVE DASHBOARD (Used for Profile & Post Pages) */
.dash-card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 25px;
}

/* REACTIONS SYSTEM (Dock Style) */
.reaction-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reaction-trigger {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1.2rem;
    color: #64748b;
    background: #f8fafc;
}

.reaction-trigger:hover {
    background: #e2e8f0;
    color: var(--primary);
}

.reaction-dock {
    position: absolute;
    left: 100%;
    top: 50%;
    background: white;
    border-radius: 50px;
    padding: 5px 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(-10px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
    margin-left: 5px;
}

/* Hover on Wrapper OR Active class reveals Dock */
.reaction-wrapper:hover .reaction-dock,
.reaction-dock.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(-50%) translateX(0) scale(1);
}

.reaction-option {
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.2s;
    transform-origin: bottom;
}

.reaction-option:hover {
    transform: scale(1.4);
}

.reaction-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.reaction-count.hidden {
    display: none;
}



.dash-avatar-p {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--secondary);
    margin-bottom: 15px;
    object-fit: cover;
    margin-bottom: 15px;
    object-fit: cover;
}

/* PROFILE VIEWS */
.profile-grid-view {
    display: block;
}

.profile-list-view {
    display: none;
}

.dash-grid {
    display: grid;
    gap: 20px;
}

/* Desktop Grid: 4 Columns */
@media (min-width: 1024px) {
    .dash-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.dash-grid-item {
    aspect-ratio: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    /* Thin gray border */
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.dash-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

/* Desktop Horizontal Profile */
@media (min-width: 992px) {
    .profile-layout-header {
        display: flex;
        align-items: center;
        gap: 30px;
        text-align: left;
        padding: 40px !important;
    }

    .profile-layout-header img.dash-avatar-p {
        margin-bottom: 0;
        width: 120px;
        height: 120px;
    }

    .profile-layout-header h2 {
        font-size: 2rem;
    }
}

.dash-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile: Smaller Reaction Dock */
@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .reaction-dock {
        padding: 4px 8px;
        gap: 5px;
        left: 0;
        top: auto;
        bottom: 100%;
        margin-left: 0;
        margin-bottom: 10px;
        transform: translateY(10px) scale(0.9);
    }

    .reaction-wrapper:hover .reaction-dock,
    .reaction-dock.active {
        transform: translateY(0) scale(1);
    }

    .reaction-option {
        font-size: 1.1rem;
    }

    .reaction-trigger {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .cp-placeholder {
        font-size: 0.7rem !important;
        white-space: nowrap !important;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 10px 15px;
        line-height: 1.3;
    }

    .cp-expanded {
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .dash-card {
        overflow: hidden;
        max-width: 100%;
        padding: 15px;
        /* Reduce padding from 30px */
    }

    .form-input,
    .form-textarea {
        max-width: 100%;
        box-sizing: border-box;
    }

    .cp-tools {
        flex-wrap: wrap;
        gap: 10px;
    }

    .grid-layout {
        grid-template-columns: 1fr !important;
        gap: 15px;
        padding: 15px;
    }

    .container {
        padding: 0 10px;
    }
}

/* =========================================
   FRESH PROFILE SPLIT LAYOUT (VERIFIED)
   ========================================= */

/* 1. Global Override for Profile Mode */
body.mode-profile-wide .right-sidebar,
body.mode-profile-wide .left-sidebar {
    display: none !important;
}

body.mode-profile-wide {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.mode-profile-wide .grid-layout {
    display: flex !important;
    justify-content: center !important;
    max-width: 100% !important;
    padding: 100px 40px 40px 40px !important;
}

/* 2. Split Container - Now 3 Columns */
.profile-split-container {
    display: grid !important;
    grid-template-columns: 280px 1fr 280px !important;
    gap: 30px;
    align-items: start;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    min-height: 400px;
}

/* 3. Sticky Left Sidebar (User Info) */
.profile-sticky-sidebar {
    position: sticky;
    top: 90px;
    z-index: 10;
}

/* 4. Center Feed Area */
.profile-feed-content {
    min-width: 0;
}

/* 5. Right Sidebar (Widgets) */
.profile-right-sidebar {
    position: sticky;
    top: 90px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Widget Card Style */
.profile-widget {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
}

.profile-widget h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-widget h4 i {
    color: var(--primary);
}

/* Recent Post Item (Same as Popular Post) */
.recent-post-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.2s;
}

.recent-post-item:last-child {
    border-bottom: none;
}

.recent-post-item:hover {
    background: #fafafa;
    margin: 0 -10px;
    padding: 10px;
    border-radius: 8px;
}

.recent-post-item img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.recent-post-item .post-info {
    flex: 1;
    min-width: 0;
}

.recent-post-item .post-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-item .post-author {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Activity Item */
.activity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.85rem;
}

.activity-item i {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
}

.activity-item span {
    color: var(--text-muted);
}

/* Quick Action Buttons */
.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    border: none;
}

.quick-action-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.quick-action-btn.secondary {
    background: #f8f9fa;
    color: var(--text-main);
    border: 1px solid #e9ecef;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quick-a.crowdfund-confirm-btn:active {
    transform: translateY(2px);
    box-shadow: none;
}

.crowdfund-form-container {
    margin-top: 20px;
}

.crowdfund-input-group {
    margin-bottom: 20px;
    text-align: left;
}

.crowdfund-input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
}

.crowdfund-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: 0.3s;
}

.crowdfund-input:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.crowdfund-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.crowdfund-form-container .btn {
    background: #fff !important;
    color: #9B046F !important;
    font-weight: 800 !important;
    border-radius: 16px !important;
    padding: 16px !important;
    text-transform: uppercase !important;
    font-size: 1rem !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    margin-top: 10px;
    width: 100%;
}

.crowdfund-form-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

.crowdfund-form-container span {
    color: #fff !important;
    font-size: 0.85rem !important;
    opacity: 0.8 !important;
    transition: 0.2s;
}

.crowdfund-form-container span:hover {
    opacity: 1 !important;
    text-decoration: underline;
}

/* Mobile Adjustments for Crowdfunding */
@media (max-width: 768px) {
    .crowdfund-card {
        padding: 16px;
        margin-bottom: 20px;
    }

    .crowdfund-title {
        font-size: 1.1rem;
    }

    .crowdfund-info {
        font-size: 0.85rem;
    }

    .crowdfund-progress-value {
        font-size: 1rem;
    }
}

/* 6. Mobile Responsiveness */
@media (max-width: 1000px) {
    .profile-split-container {
        grid-template-columns: 240px 1fr;
        gap: 20px;
    }

    .profile-right-sidebar {
        display: none;
    }
}

@media (max-width: 900px) {
    .profile-split-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .profile-sticky-sidebar {
        position: static;
        width: 100%;
    }

    .profile-feed-content .dash-card {
        padding: 20px 15px;
    }
}

/* FOOTER STYLES */
/* FOOTER STYLES */
.mobile-footer {
    display: none;
    /* Hidden by default on desktop */
}

@media (max-width: 992px) {
    .mobile-footer {
        display: block;
        grid-column: 1;
        text-align: center;
        padding-bottom: 35px;
        margin-top: 40px;
    }

    .desktop-footer {
        display: none !important;
    }
}

/* Default state for mobile logout button (Hidden on desktop) */
.mobile-logout-btn {
    display: none !important;
}

/* 7. Specific Mobile Profile Optimizations */
@media (max-width: 768px) {
    body.mode-profile-wide .grid-layout {
        padding: 85px 15px 0px 15px !important;
        /* Reduce side padding */
        display: block !important;
    }

    .profile-split-container {
        display: flex !important;
        flex-direction: column;
        gap: 15px;
    }

    /* Make profile card more compact on mobile */
    .profile-sticky-sidebar .dash-card {
        padding: 20px;
        text-align: center;
        margin-bottom: 15px;
    }

    .profile-sticky-sidebar img {
        width: 90px !important;
        height: 90px !important;
        margin-bottom: 10px !important;
    }

    .profile-sticky-sidebar h2 {
        font-size: 1.3rem !important;
    }

    /* Adjust Feed Padding if needed */
    .profile-feed-content .dash-card {
        padding: 20px 15px;
    }

    /* Mobile Logout Button Visibility */
    .mobile-logout-btn {
        display: block !important;
    }
}

/* --- THYPTAP (THYP) WALLET WIDGET --- */
.wallet-widget {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(155, 4, 111, 0.1);
}

.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.wallet-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wallet-balance-container {
    margin-bottom: 15px;
}

.wallet-balance {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
}

.wallet-currency {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-left: 5px;
}

.wallet-address-box {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.wallet-address-box:hover {
    background: #e2e8f0;
}

.wallet-address {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75rem;
    color: #475569;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mining-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}

.mining-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
}

.mining-dot.active {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

/* Mining Fire Icons */
.mining-fire-boosted {
    color: #f97316;
    filter: drop-shadow(0 0 3px rgba(249, 115, 22, 0.4));
    animation: fire-flicker 1.5s infinite alternate ease-in-out;
}

.mining-fire-regular {
    color: #94a3b8;
    opacity: 0.6;
}

@keyframes fire-flicker {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.mining-dot.active {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
    animation: blinkThyp 2s infinite;
}

@keyframes blinkThyp {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.mining-counter {
    font-weight: 700;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
}

.wallet-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.btn-thyp {
    padding: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-thyp-send {
    background: var(--primary);
    color: white;
}

.btn-thyp-send:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* --- EXPLORER PAGE --- */
.explorer-container {
    padding: 20px;
}

.explorer-header {
    text-align: center;
    margin-bottom: 40px;
}

.explorer-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.explorer-stat-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    text-align: center;
}

.explorer-stat-card .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.explorer-stat-card .value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.explorer-ledger-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.explorer-ledger-card .card-title {
    padding: 20px;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}

.explorer-table-wrapper {
    overflow-x: auto;
}

.explorer-table {
    width: 100%;
    border-collapse: collapse;
}

.explorer-table th,
.explorer-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.explorer-table th {
    background: #f1f5f9;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.explorer-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.explorer-badge.mining_reward {
    background: #dcfce7;
    color: #166534;
}

.explorer-badge.transfer {
    background: #e0f2fe;
    color: #075985;
}

.explorer-addr {
    font-family: monospace;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {

    .explorer-table th:nth-child(2),
    .explorer-table td:nth-child(2),
    .explorer-table th:nth-child(5),
    .explorer-table td:nth-child(5) {
        display: none;
    }
}

/* --- MOBILE NAVIGATION BAR --- */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    z-index: 1500;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .mobile-nav {
        display: flex !important;
        flex-direction: row !important;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    flex: 1;
    text-align: center;
    text-decoration: none;
}

.mobile-nav-item i {
    font-size: 1.25rem;
}

.mobile-nav-item.active {
    color: var(--primary);
}

/* Adjust body padding for mobile nav */
@media (max-width: 768px) {
    body {
        padding-bottom: 75px !important;
    }
}

/* CONTENT MANAGEMENT */
.btn-icon {
    background: white;
    border: 1px solid var(--border);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: 0.2s;
    font-size: 0.9rem;
    padding: 0;
}

.btn-icon:hover {
    background: #f1f5f9;
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.comment-delete {
    opacity: 1;
    transition: 0.2s;
    cursor: pointer;
    color: #cbd5e1;
    font-size: 0.8rem;
    margin-left: 8px;
}

.comment-delete:hover {
    color: var(--danger);
}

/* Redesigned Crowdfunding Widget */
.crowdfund-card {
    background: linear-gradient(135deg, #9B046F 0%, #4c0137 100%);
    color: white;
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(155, 4, 111, 0.4);
}

.crowdfund-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.crowdfund-badge {
    background: #FFD700;
    color: #9B046F;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.crowdfund-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.crowdfund-info {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.5;
    margin-bottom: 20px;
}

.crowdfund-progress-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.crowdfund-progress-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.crowdfund-progress-value {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.crowdfund-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.crowdfund-bar-fill {
    height: 100%;
    background: #FFD700;
    width: 0%;
    transition: width 1s ease-in-out;
}

.crowdfund-address-box {
    background: white;
    color: var(--text-main);
    padding: 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.crowdfund-address {
    font-family: monospace;
    font-size: 0.8rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crowdfund-copy-btn {
    background: #9B046F;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 12px;
    transition: 0.2s;
    cursor: pointer;
}

.crowdfund-copy-btn:hover {
    background: #7a0357;
}

.crowdfund-confirm-btn {
    width: 100%;
    padding: 16px;
    background: #a3d133;
    color: #1a3a00;
    border: none;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    text-transform: uppercase;
    box-shadow: 0 4px 0 #89b326;
}

/* BOOSTER WIDGET */
.booster-card {
    background: linear-gradient(135deg, #9B046F 0%, #4c0137 100%);
    color: white;
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(155, 4, 111, 0.4);
}

.booster-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.booster-badge {
    background: #FFD700;
    color: #9B046F;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.booster-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.booster-info {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.5;
    margin-bottom: 20px;
}

.booster-rate-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.booster-rate-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 5px;
}

.booster-rate-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.booster-address-box {
    background: white;
    color: var(--text-main);
    padding: 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.booster-address {
    font-family: monospace;
    font-size: 0.8rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.booster-copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 12px;
    transition: 0.2s;
}

.booster-copy-btn:hover {
    background: #7a0357;
}

.booster-form-container {
    margin-top: 20px;
}

.booster-input-group {
    margin-bottom: 20px;
    text-align: left;
}

.booster-input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
}

.booster-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: 0.3s;
}

.booster-input:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.booster-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.booster-submit-btn {
    background: #fff !important;
    color: #9B046F !important;
    font-weight: 800 !important;
    border-radius: 16px !important;
    padding: 16px !important;
    text-transform: uppercase !important;
    font-size: 1rem !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    margin-top: 10px;
    width: 100%;
    cursor: pointer;
    transition: 0.2s;
}

.booster-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

.booster-cancel-link {
    display: block;
    margin-top: 15px;
    color: #fff !important;
    font-size: 0.85rem !important;
    opacity: 0.8 !important;
    cursor: pointer;
    text-align: center;
    transition: 0.2s;
}

.booster-cancel-link:hover {
    opacity: 1 !important;
    text-decoration: underline;
}

/* MARKETPLACE STYLES */
.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.market-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.market-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.market-img-container {
    height: 160px;
    position: relative;
    background: #f8fafc;
}

.market-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.market-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
}

.badge-nft {
    background: #8b5cf6;
}

.badge-service {
    background: #10b981;
}

.badge-digital {
    background: #3b82f6;
}

.market-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.market-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.95rem;
    color: var(--text-main);
}

.market-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

.market-seller {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.market-seller img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

/* CHAT STYLES */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 0.9rem;
    position: relative;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chat-bubble.sent {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.chat-bubble.received {
    align-self: flex-start;
    background: #f1f5f9;
    color: var(--text-main);
    border-bottom-left-radius: 2px;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}

.market-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.market-tab {
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.market-tab.active {
    background: var(--primary);
    color: white;
}

.market-tab:not(.active):hover {
    background: #e2e8f0;
}

/* UI POLISH: Hide scrollbar in Market List Modal */
#market-list-modal .modal-box {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

#market-list-modal .modal-box::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

/* HIDE ADMIN ON MOBILE */
@media (max-width: 992px) {
    .admin-only {
        display: none !important;
    }
}


/* --- MOBILE PRECISION & OVERFLOW FIXES --- */
html,
body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
    -webkit-text-size-adjust: 100%;
}

@media (max-width: 768px) {
    .container {
        padding: 0 12px !important;
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    .grid-layout {
        overflow-x: hidden !important;
        max-width: 100% !important;
        gap: 15px !important;
        padding: 15px !important;
    }

    .booster-address {
        font-size: 0.7rem !important;
        white-space: normal !important;
        word-break: break-all !important;
    }

    /* Marketplace Grid Precision */
    .marketplace-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 12px !important;
        max-width: 100% !important;
    }

    /* Messaging Precision */
    .chat-container {
        height: 75vh !important;
        max-width: 100% !important;
    }

    .chat-bubble {
        max-width: 90% !important;
        word-break: break-word !important;
    }
}

/* HIDE RECAPTCHA BADGE */
.grecaptcha-badge {
    visibility: hidden !important;
}

/* Social Media Input Styles */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    font-size: 1.1rem;
    pointer-events: none;
}

.input-with-icon .form-input {
    padding-left: 40px !important;
    width: 100%;
}

/* CUSTOM SELECT PILL */
.form-select-pill {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #f1f5f9;
    border: none;
    border-radius: 50px;
    padding: 10px 35px 10px 20px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    transition: 0.2s;
}

.form-select-pill:hover {
    background-color: #e2e8f0;
    color: var(--primary);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239B046F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

.form-select-pill:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(155, 4, 111, 0.1);
}

/* GHOST SELECT (Transparent) */
.form-select-ghost {
    appearance: none;
    -webkit-appearance: none;
    background-color: transparent;
    border: none;
    border-radius: 50px;
    padding: 8px 30px 8px 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 14px;
}

.form-select-ghost:hover {
    color: var(--secondary);
    background-color: #f0fdf4;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A7C957' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

.form-select-ghost:focus {
    outline: none;
}

/* DESKTOP DEFAULT: Horizontal layout for Create Post form */
.cp-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cp-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cp-buttons {
    display: flex;
    gap: 10px;
}

/* MOBILE REFINEMENTS */
@media (max-width: 600px) {

    /* Visibility Selector: Full text visible on mobile */
    .form-select-pill,
    .form-select-ghost {
        width: auto !important;
        min-width: auto !important;
        padding: 8px 12px !important;
        background-image: none !important;
        font-size: 0.85rem;
    }

    /* Shrink form buttons on mobile */
    .cp-actions .btn,
    .dash-card .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    /* Specific fix for vertical buttons in Create Post page */
    .dash-card>div[style*="flex-direction:column"] .btn {
        padding: 10px 16px;
    }

    /* Desktop default: flex layout for cp-tools and cp-buttons */
    .cp-tools {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .cp-buttons {
        display: flex;
        gap: 10px;
    }

    /* Stack post creation form as 2-column grid on mobile */
    /* Photo | Privacy  (row 1) */
    /* Cancel | Publish (row 2) */
    .cp-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 12px !important;
        margin-top: 10px;
    }

    /* Remove nested flexible behavior for grid children */
    .cp-actions .cp-tools,
    .cp-actions .cp-buttons {
        display: contents;
        /* Allows children to be direct grid items */
    }

    /* Uniform button styling for all grid items */
    .cp-actions .cp-btn,
    .cp-actions select,
    .cp-actions .btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 12px 16px !important;
        border: 1px solid var(--border) !important;
        border-radius: 12px !important;
        /* Consistent rounded corners */
        background: white !important;
        font-size: 0.9rem !important;
        cursor: pointer;
        width: 100%;
        /* Fill grid cell */
        height: 44px;
        /* Consistent height */
    }

    /* Grid positions */
    /* 1. Photo (Top Left) */
    .cp-actions .cp-tools .cp-btn {
        grid-column: 1;
        grid-row: 1;
    }

    /* 2. Privacy (Top Right) */
    .cp-actions .cp-tools select {
        grid-column: 2;
        grid-row: 1;
        background-color: white !important;
        /* Reset select bg */
    }

    /* 3. Cancel (Bottom Left) */
    .cp-actions .cp-buttons .btn-ghost {
        grid-column: 1;
        grid-row: 2;
        background: #f1f5f9 !important;
        /* Slight grey for cancel */
        color: var(--text-muted) !important;
    }

    /* 4. Publish (Bottom Right) */
    .cp-actions .cp-buttons .btn:not(.btn-ghost) {
        grid-column: 2;
        grid-row: 2;
        background: var(--primary) !important;
        color: white !important;
        border-color: var(--primary) !important;
    }
}

/* ========================================
   SKELETON LOADING STYLES
   ======================================== */

/* Shimmer Animation */
@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Base Skeleton Element */
.skeleton {
    background: linear-gradient(90deg,
            #e0e0e0 25%,
            #f0f0f0 50%,
            #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.skeleton-circle {
    border-radius: 50%;
}

/* Skeleton Card Container */
.skeleton-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

/* Create Post Skeleton */
.skeleton-create-post {
    display: flex;
    align-items: center;
    gap: 15px;
}

.skeleton-create-post .skeleton-avatar {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.skeleton-create-post .skeleton-input {
    flex: 1;
    height: 40px;
    border-radius: 20px;
}

/* Post Card Skeleton */
.skeleton-post {
    padding: 0;
    overflow: hidden;
}

.skeleton-post .skeleton-image {
    width: 100%;
    height: 200px;
    border-radius: var(--radius) var(--radius) 0 0;
    position: relative;
}

.skeleton-post .skeleton-author-avatar {
    width: 50px;
    height: 50px;
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    border: 3px solid var(--surface);
}

.skeleton-post .skeleton-content {
    padding: 35px 20px 20px;
    text-align: center;
}

.skeleton-post .skeleton-title {
    width: 70%;
    height: 24px;
    margin: 0 auto 10px;
}

.skeleton-post .skeleton-meta {
    width: 40%;
    height: 16px;
    margin: 0 auto 15px;
}

.skeleton-post .skeleton-reactions {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.skeleton-post .skeleton-reactions .skeleton-btn {
    width: 60px;
    height: 30px;
    border-radius: 15px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .skeleton-post .skeleton-image {
        height: 180px;
    }
}

/* ========================================
   MOBILE BOTTOM NAVIGATION
   ======================================== */

.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #6B7280;
    font-size: 1.4rem;
    padding: 8px 16px;
    transition: color 0.2s ease;
}

.mobile-nav-item:hover {
    color: #4B5563;
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item.active i {
    transform: scale(1.1);
}

/* ========================================
   SHARE BUTTONS
   ======================================== */

.share-buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.share-btn i {
    font-size: 0.9rem;
}

/* Facebook */
.share-btn-facebook {
    background: #1877F2;
    color: white;
}

/* Instagram */
.share-btn-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

/* Threads */
.share-btn-threads {
    background: #000000;
    color: white;
}

/* X (Twitter) */
.share-btn-x {
    background: #000000;
    color: white;
}

/* Copy Link */
.share-btn-copy {
    background: #E5E7EB;
    color: #374151;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .share-buttons-row {
        flex-direction: column;
    }

    .share-btn {
        width: 100%;
        justify-content: center;
    }
}

/* NOTIFICATION BADGE */
.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.nav-icon-btn,
.menu-item,
.mobile-nav-item {
    position: relative;
}

/* Sidebar specific badge positioning */
.menu-item .notif-badge {
    position: static;
    margin-left: auto;
}

/* --- PREMIUM & TIPPING STYLES --- */
.premium-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #9B046F;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
    pointer-events: none;
}

/* Toggle Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary);
}

input:checked+.slider:before {
    -webkit-transform: translateX(18px);
    -ms-transform: translateX(18px);
    transform: translateX(18px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Mobile Premium Toggle Optimization */
@media (max-width: 600px) {
    .premium-toggle-label {
        font-size: 0.7rem !important;
        white-space: nowrap;
        gap: 4px !important;
    }
}

/* --- EXPLORER UI REDESIGN (Mockup Sync) --- */
.explorer-stats-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.explorer-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.explorer-stat-card {
    background: #fff;
    padding: 25px 20px;
    border-radius: 24px;
    /* More rounded as per mockup */
    border: 1.5px solid var(--primary);
    /* Primary border color */
    text-align: center;
    transition: all 0.3s ease;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
}

.explorer-stat-card.hero-card {
    padding: 35px 20px;
    border-width: 2px;
}

.explorer-stat-card.featured {
    background: rgba(155, 4, 111, 0.02);
}

.explorer-stat-card .label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: capitalize;
    margin-bottom: 12px;
}

.explorer-stat-card .value {
    font-size: 1.1rem;
    /* Base size */
    font-weight: 800;
    color: var(--text-main);
    word-break: break-all;
    line-height: 1.2;
}

/* Specific scaling for long full numbers */
.explorer-stat-card .value.sub-low {
    font-size: 0.95rem;
}

.formula-tag {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
}

.wallet-balance-container {
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex-wrap: wrap;
    min-width: 0;
}

.wallet-balance,
.thyp-balance-display {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--text-main);
    word-break: break-all;
    overflow-wrap: anywhere;
    line-height: 1.2;
    font-size: 1.6rem;
}

/* RESPONSIVE EXPLORER GRID */
@media (max-width: 992px) {
    .explorer-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .explorer-stats-hero {
        grid-template-columns: 1fr;
    }

    .explorer-stats-grid {
        grid-template-columns: 1fr;
    }

    .explorer-stat-card {
        min-height: 100px;
    }

    .wallet-balance {
        font-size: 1.3rem;
    }
}

/* --- MOBILE FOOTER DISPLAY CONTROL --- */
@media (max-width: 992px) {
    body.hide-mobile-footer .mobile-footer {
        display: none !important;
    }
}

/* --- POST CONTENT FORMATTING REFINEMENTS --- */
.article-content ul,
.manifesto-text ul {
    list-style: disc !important;
    margin-left: 25px !important;
    margin-bottom: 15px !important;
}

.article-content ol,
.manifesto-text ol {
    list-style: decimal !important;
    margin-left: 25px !important;
    margin-bottom: 15px !important;
}

.article-content li,
.manifesto-text li {
    margin-bottom: 5px !important;
    display: list-item !important;
}

.article-content {
    line-height: 1.5 !important;
}

/* --- QUILL EDITOR REFINEMENTS --- */
.ql-toolbar.ql-snow {
    border: none !important;
    border-bottom: 1px solid var(--border) !important;
    background: #f8fafc !important;
}

.ql-container.ql-snow {
    border: none !important;
}

.ql-editor {
    min-height: 150px !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 1rem !important;
    color: var(--text-main) !important;
    line-height: 1.5 !important;
}

.ql-editor.ql-blank::before {
    color: var(--text-muted) !important;
    font-style: normal !important;
}


/* --- MOBILE CONTENT SPACING RATIONALE --- */
@media (max-width: 992px) {
    body.hide-mobile-footer .grid-layout {
        padding-bottom: 58px !important;
    }
}

/* --- HOME FOOTER SPACING OPTIMIZATION --- */
@media (max-width: 992px) {
    .mobile-footer {
        padding-bottom: 25px !important;
    }
}

/* --- FOOTER HIDING LOGIC --- */
body.hide-mobile-footer .mobile-footer {
    display: none !important;
}

/* --- EXPLORER ESCROW BADGES --- */
.explorer-badge.marketplace_purchase_escrow {
    background: rgba(155, 4, 111, 0.1);
    color: var(--primary);
}

.explorer-badge.marketplace_network_fee {
    background: #fef3c7;
    color: #92400e;
}

.explorer-badge.marketplace_payout {
    background: #dcfce7;
    color: #166534;
}

.explorer-badge.marketplace_commission_burn {
    background: #fee2e2;
    color: #991b1b;
}

.explorer-badge.network_development {
    background: #e0f2fe;
    color: #0369a1;
}

/* STANDALONE MODE (Microsites) */
body.standalone-mode {
    padding-top: 0 !important;
    background-color: #ebedee !important;
    /* Match microsite gradient END */
}

body.standalone-mode .main-header,
body.standalone-mode .left-sidebar,
body.standalone-mode .right-sidebar,
body.standalone-mode .mobile-nav,
body.standalone-mode .mobile-footer {
    display: none !important;
}

body.hide-mobile-footer .mobile-footer {
    display: none !important;
}

body.standalone-mode .grid-layout {
    display: block !important;
    padding-top: 0 !important;
    max-width: 100% !important;
    padding-bottom: 0 !important;
}

body.standalone-mode .container {
    padding: 0 !important;
    max-width: 100% !important;
}

/* --- MICROSITE PRODUCT REFINEMENTS --- */
.mini-product-card {
    height: 130px !important;
}

.mini-product-card img {
    width: 130px !important;
    height: 130px !important;
    object-fit: cover !important;
}

/* --- TOOLS PAGE STYLES --- */
.tools-hero {
    text-align: center;
    padding: 13px 20px 20px;
    /* Desktop: Reduced by 27px from original 40px */
}

@media (max-width: 992px) {
    .tools-hero {
        padding-top: 27px;
        /* Mobile: Exact gap requested */
    }
}

.tools-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 5px;
}

.tool-grid {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.tool-frame {
    border-radius: 25px;
    padding: 30px;
    position: relative;
    border: 3px solid transparent;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.tool-frame:hover {
    transform: translateY(-5px);
}

.tool-header-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.tool-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tool-name {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.input-pill-wrapper {
    background: white;
    border-radius: 50px;
    padding: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.input-pill {
    flex: 1;
    min-width: 200px;
    border: none;
    background: transparent;
    padding: 10px 20px;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
}

.btn-pill {
    border-radius: 50px;
    padding: 12px 30px;
    border: none;
    color: white;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-pill:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.result-area {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    display: none;
    border: 1px dashed rgba(0, 0, 0, 0.1);
}

.result-area.active {
    display: block;
    animation: fadeInTools 0.5s ease;
}

@keyframes fadeInTools {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theme-tt {
    background-color: #ecfeff;
    border-color: #cffafe;
}

.theme-tt .tool-icon-box {
    background: #000;
}

.theme-tt .tool-name {
    color: #0e7490;
}

.theme-tt .btn-pill {
    background: #000;
}

.theme-tt .input-pill-wrapper {
    border: 2px solid #a5f3fc;
}

.theme-weton {
    background-color: #f0fdf4;
    border-color: #dcfce7;
}

.theme-weton .tool-icon-box {
    background: #16a34a;
}

.theme-weton .tool-name {
    color: #15803d;
}

.theme-weton .btn-pill {
    background: #16a34a;
}

.theme-weton .input-pill-wrapper {
    border: 2px solid #bbf7d0;
}

.theme-wa {
    background-color: #f0fdfa;
    border-color: #ccfbf1;
}

.theme-wa .tool-icon-box {
    background: #0d9488;
}

.theme-wa .tool-name {
    color: #0f766e;
}

.theme-wa .btn-pill {
    background: #0d9488;
}

.theme-wa .input-pill-wrapper {
    border: 2px solid #99f6e4;
}

.theme-qr {
    background-color: #f5f3ff;
    border-color: #ede9fe;
}

.theme-qr .tool-icon-box {
    background: #7c3aed;
}

.theme-qr .tool-name {
    color: #6d28d9;
}

.theme-qr .btn-pill {
    background: #7c3aed;
}

.theme-qr .input-pill-wrapper {
    border: 2px solid #ddd6fe;
}

/* LINK SHORTENER THEME (Rose/Pink Pastel) */
.theme-link {
    background-color: #fff1f2;
    border-color: #ffe4e6;
}

.theme-link .tool-icon-box {
    background: linear-gradient(135deg, #e11d48 0%, #fb7185 100%);
}

.theme-link .tool-name {
    color: #be123c;
}

.theme-link .btn-pill {
    background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
}

.theme-link .input-pill-wrapper {
    border: 2px solid #fecdd3;
}

/* --- NEW TOOLS THEMES --- */

/* BMI Calculator Theme (Cyan/Sky) */
.theme-bmi {
    background-color: #ecfeff;
    border-color: #cffafe;
}

.theme-bmi .tool-icon-box {
    background: #0891b2;
}

.theme-bmi .tool-name {
    color: #0e7490;
}

.theme-bmi .btn-pill {
    background: #0891b2;
}

.theme-bmi .input-pill-wrapper {
    border: 2px solid #a5f3fc;
}

/* Image Compressor Theme (Amber/Yellow) */
.theme-compress {
    background-color: #fffbeb;
    border-color: #fef3c7;
}

.theme-compress .tool-icon-box {
    background: #d97706;
}

.theme-compress .tool-name {
    color: #b45309;
}

.theme-compress .btn-pill {
    background: #d97706;
}

.theme-compress .input-pill-wrapper {
    border: 2px solid #fde68a;
}

/* PDF Tools Theme (Indigo/Violet) */
.theme-pdf {
    background-color: #eef2ff;
    border-color: #e0e7ff;
}

.theme-pdf .tool-icon-box {
    background: #4f46e5;
}

.theme-pdf .tool-name {
    color: #4338ca;
}

.theme-pdf .btn-pill {
    background: #4f46e5;
}

.theme-pdf .input-pill-wrapper {
    border: 2px solid #c7d2fe;
}

/* Profile Widget Theme (Pink/Rose) */
.theme-widget {
    background-color: #fdf2f8;
    border-color: #fce7f3;
}

.theme-widget .tool-icon-box {
    background: #db2777;
}

.theme-widget .tool-name {
    color: #be185d;
}

.theme-widget .btn-pill {
    background: #db2777;
}

.theme-widget .input-pill-wrapper {
    border: 2px solid #fbcfe8;
}

@media (max-width: 600px) {
    .input-pill-wrapper {
        flex-direction: column;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    .input-pill {
        background: white;
        border-radius: 50px;
        width: 100%;
        border: 2px solid rgba(0, 0, 0, 0.1);
    }

    .btn-pill {
        width: 100%;
    }
}
/* BMI Mobile Fix */
@media (max-width: 600px) { .bmi-inputs { display: flex !important; flex-direction: column !important; gap: 10px !important; } .bmi-inputs .input-pill { width: 100% !important; flex: none !important; } }
