/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font, 'Inter', sans-serif);
    color: #fff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background: linear-gradient(135deg, #0c0c1d, #1a1a3e);
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 20px 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== VISITOR COUNTER ===== */
.visitor-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    padding: 6px 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 14px;
    margin-bottom: 0;
    letter-spacing: 0.5px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #55efc4;
    border-radius: 50%;
    display: inline-block;
    animation: livePulse 2s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(85, 239, 196, 0.6);
}

@keyframes livePulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 6px rgba(85, 239, 196, 0.6);
    }

    50% {
        opacity: 0.3;
        box-shadow: 0 0 2px rgba(85, 239, 196, 0.2);
    }
}

.visitor-count {
    font-weight: 600;
    color: #55efc4;
}

/* ===== PROFILE ===== */
.profile-section {
    text-align: center;
    margin-bottom: 32px;
    width: 100%;
}

.profile-image-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.profile-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.profile-placeholder .material-icons-round {
    font-size: 48px;
    opacity: 0.8;
}

.profile-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 3px solid transparent;
    background: conic-gradient(var(--primary), var(--accent), var(--secondary), var(--primary)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: ringRotate 4s linear infinite;
}

@keyframes ringRotate {
    to {
        transform: rotate(360deg);
    }
}

.profile-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profile-bio {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.social-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.social-icon:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

.social-icon img {
    width: 18px;
    height: 18px;
}

/* ===== LINK CATEGORIES ===== */
.link-category-group {
    width: 100%;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
}

.link-category-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 10px;
    padding-left: 4px;
}

/* ===== LINKS ===== */
.links-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    animation: fadeUp 0.5s ease backwards;
    animation-delay: var(--delay, 0s);
    cursor: pointer;
    position: relative;
}

.link-card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.link-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.link-icon img,
.link-icon .custom-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: cover;
}

.emoji-icon {
    font-size: 22px;
    line-height: 1;
}

.link-title {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}

.link-arrow {
    font-size: 18px;
    opacity: 0.4;
    transition: all 0.3s;
}

.link-card:hover .link-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* Card Styles */
.link-card.glass {
    background: rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

.link-card.solid {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #1a1a2e !important;
    border: none;
}

.link-card.solid .link-icon {
    background: rgba(0, 0, 0, 0.06);
}

.link-card.outline {
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff !important;
}

.link-card.outline:hover {
    border-color: var(--primary);
}

.link-card.gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
    color: #fff !important;
    border: none;
}

.link-card.neon {
    background: rgba(10, 10, 20, 0.8) !important;
    border: 1px solid var(--primary);
    color: #fff !important;
    box-shadow: 0 0 12px rgba(108, 92, 231, 0.15), inset 0 0 12px rgba(108, 92, 231, 0.05);
}

.link-card.neon:hover {
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.3), inset 0 0 20px rgba(108, 92, 231, 0.1);
}

.link-card.minimal {
    background: transparent !important;
    color: #fff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    padding: 16px 4px;
}

.link-card.minimal:hover {
    border-bottom-color: var(--primary);
}

.link-card.rounded {
    background: rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff !important;
    border-radius: 100px;
    padding: 12px 24px;
}

/* ===== PRODUCTS ===== */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.85);
}

.section-title .material-icons-round {
    font-size: 24px;
    color: var(--primary);
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    width: 100%;
}

.product-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Product Carousel */
.product-carousel {
    position: relative;
    overflow: hidden;
}

.product-carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.product-carousel-track::-webkit-scrollbar {
    display: none;
}

.product-carousel-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    position: relative;
    padding-top: 100%;
}

.product-carousel-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    background: #fff;
    transform: scale(1.2);
}

.sale-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

.product-type-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 6px;
}

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.product-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
    margin-bottom: 8px;
}

.product-price-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.product-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--secondary);
}

.product-price.original {
    text-decoration: line-through;
    opacity: 0.5;
    font-size: 12px;
}

.product-price.sale {
    color: #55efc4;
}

.product-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.product-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

.product-btn .material-icons-round {
    font-size: 16px;
}

.products-section,
.blog-section {
    width: 100%;
    margin-bottom: 32px;
}

/* ===== BLOG V2 - COMPACT GRID ===== */
.blog-grid-v2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    width: 100%;
}

@media (max-width: 520px) {
    .blog-grid-v2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.blog-card-v2 {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.blog-card-v2:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
}

.blog-card-v2-image {
    height: 120px;
    overflow: hidden;
    position: relative;
}

.blog-card-v2-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.blog-card-v2:hover .blog-card-v2-image img {
    transform: scale(1.05);
}

.blog-card-v2-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
}

.blog-card-v2-placeholder .material-icons-round {
    font-size: 32px;
    opacity: 0.15;
}

.blog-card-v2-body {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-v2-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-v2-excerpt {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
    flex: 1;
}

.blog-card-v2-meta {
    display: flex;
    gap: 10px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: auto;
}

.blog-card-v2 {
    cursor: pointer;
}

/* Blog View More */
.blog-view-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 16px auto 16px;
    padding: 10px 28px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 50px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-view-more-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.blog-view-more-btn .material-icons-round {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.blog-view-more-btn.expanded .material-icons-round {
    transform: rotate(180deg);
}

.blog-grid-hidden {
    display: none;
    animation: slideDown 0.4s ease;
}

.blog-grid-hidden.visible {
    display: grid;
    margin-top: 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== MARKDOWN CONTENT STYLES ===== */
.markdown-body {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    word-wrap: break-word;
}

.markdown-body h1 {
    font-size: 1.8em;
    margin: 32px 0 16px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.markdown-body h2 {
    font-size: 1.5em;
    margin: 28px 0 14px;
    font-weight: 700;
}

.markdown-body h3 {
    font-size: 1.25em;
    margin: 24px 0 12px;
    font-weight: 600;
}

.markdown-body h4 {
    font-size: 1.1em;
    margin: 20px 0 10px;
    font-weight: 600;
}

.markdown-body p {
    margin-bottom: 16px;
}

.markdown-body a {
    color: var(--secondary);
    text-decoration: underline;
    text-decoration-color: rgba(162, 155, 254, 0.3);
    transition: 0.2s;
}

.markdown-body a:hover {
    text-decoration-color: var(--secondary);
}

.markdown-body img {
    max-width: 100%;
    border-radius: 12px;
    margin: 16px auto;
    display: block;
}

.markdown-body blockquote {
    border-left: 3px solid var(--primary);
    padding: 12px 16px;
    margin: 16px 0;
    background: rgba(108, 92, 231, 0.06);
    border-radius: 0 8px 8px 0;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.markdown-body blockquote p:last-child {
    margin-bottom: 0;
}

.markdown-body code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Fira Code', monospace;
}

.markdown-body pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 16px;
    overflow-x: auto;
    margin: 16px 0;
}

.markdown-body pre code {
    background: none;
    padding: 0;
    font-size: 13px;
    line-height: 1.6;
}

.markdown-body ul,
.markdown-body ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.markdown-body li {
    margin-bottom: 6px;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.markdown-body th,
.markdown-body td {
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.markdown-body th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

.markdown-body hr {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 24px 0;
}

/* Text alignment utilities */
.markdown-body .text-center,
.markdown-body [style*="text-align: center"],
.markdown-body [style*="text-align:center"] {
    text-align: center;
}

.markdown-body .text-right,
.markdown-body [style*="text-align: right"],
.markdown-body [style*="text-align:right"] {
    text-align: right;
}

.markdown-body .text-left,
.markdown-body [style*="text-align: left"],
.markdown-body [style*="text-align:left"] {
    text-align: left;
}

.markdown-body .text-justify,
.markdown-body [style*="text-align: justify"],
.markdown-body [style*="text-align:justify"] {
    text-align: justify;
}

/* Paragraph indent (first-line tab) */
.markdown-body .indent,
.markdown-body [style*="text-indent"] {
    text-indent: 2em;
}

/* ===== ADS ===== */
.ads-container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 20px;
}

.ad-banner {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    margin: 10px 0;
    transition: all 0.3s;
}

.ad-banner img {
    display: block;
    width: 100%;
    height: auto;
}

.ad-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Popup Ad */
.popup-ad-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.popup-ad-overlay.hidden {
    display: none;
}

.popup-ad-container {
    position: relative;
    max-width: 480px;
    width: 100%;
    background: rgba(30, 30, 50, 0.95);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: scaleUp 0.3s ease;
}

.popup-ad-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s;
}

.popup-ad-close:hover {
    background: var(--accent);
}

.popup-ad-link {
    text-decoration: none;
    color: #fff;
    display: block;
}

.popup-ad-image {
    display: block;
    width: 100%;
    height: auto;
}

.popup-ad-title {
    padding: 16px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

@keyframes scaleUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: #16162a;
    border-radius: 20px;
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: scaleUp 0.3s ease;
}

.modal-close {
    position: sticky;
    top: 12px;
    float: right;
    margin: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--accent);
}

.modal-content {
    padding: 24px 28px 32px;
}

.modal-content h1 {
    font-size: 24px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.modal-content .post-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 20px;
}

.modal-content .post-cover {
    width: 100%;
    border-radius: 14px;
    margin-bottom: 20px;
}

.modal-content .post-body {
    font-size: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.75);
}

.modal-content .post-body p {
    margin-bottom: 16px;
}

.modal-content .post-body img {
    max-width: 100%;
    border-radius: 12px;
    margin: 16px 0;
}

.modal-loading {
    display: flex;
    justify-content: center;
    padding: 60px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== FOOTER ===== */
.footer {
    margin-top: auto;
    padding-top: 32px;
    text-align: center;
    width: 100%;
}

.footer p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 4px;
}

.powered-by strong {
    color: var(--primary);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .container {
        padding: 28px 16px 20px;
    }

    .profile-name {
        font-size: 22px;
    }

    .profile-bio {
        font-size: 13px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .link-card {
        padding: 12px 14px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* ===== MAIN PAGE TABS ===== */
.main-tabs-container {
    width: 100%;
    margin: 0 auto 20px;
}

.main-tabs-header {
    display: flex;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 6px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.main-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.main-tab-btn .material-icons-round {
    font-size: 18px;
    transition: transform 0.3s;
}

.main-tab-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.main-tab-btn.active {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.main-tab-btn.active .material-icons-round {
    transform: scale(1.15);
}

.main-tab-indicator {
    position: absolute;
    top: 6px;
    left: 6px;
    height: calc(100% - 12px);
    width: calc(50% - 6px); /* default initially */
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    z-index: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.main-tabs-content-wrapper {
    position: relative;
    width: 100%;
}

.main-tab-content {
    display: none;
    opacity: 0;
    transform: translateY(15px) scale(0.98);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: fadeInTab 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== PDF CONVERTER ===== */
.pdf-converter-section {
    margin-bottom: 24px;
}

.pdf-converter-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.pdf-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
}

.pdf-upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
    position: relative;
}

.pdf-upload-area:hover, .pdf-upload-area.drag-over {
    border-color: var(--secondary);
    background: rgba(108, 92, 231, 0.1);
    transform: translateY(-2px);
}

.pdf-upload-icon {
    font-size: 48px;
    color: var(--secondary);
    margin-bottom: 12px;
}

.pdf-upload-area h3 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.pdf-upload-area p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

.pdf-hidden-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.pdf-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.pdf-preview-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1/1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.pdf-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdf-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(253, 121, 168, 0.9);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
}

.pdf-remove-btn .material-icons-round {
    font-size: 14px;
}

.pdf-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(253, 121, 168, 0.15);
    color: #fd79a8;
    border-color: rgba(253, 121, 168, 0.3);
}

/* ===== MINI TOOLS ===== */
.minitools-section {
    padding: 10px 0;
}

.minitools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.minitool-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.minitool-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--secondary);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.minitool-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(162, 155, 254, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--secondary);
}

.minitool-icon .material-icons-round {
    font-size: 24px;
}

.minitool-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #fff;
}

.minitool-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.3;
    margin: 0;
}

.tool-modal-overlay {
    z-index: 1000;
}

.tool-modal-overlay .modal-container {
    padding: 0;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}