:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #38bdf8;
    --accent-hover: #0ea5e9;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Base Components */
.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--accent-color);
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon {
    font-size: 1.5rem;
    color: var(--text-primary);
    background: none;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.btn-primary:active,
.action-btn:active {
    transform: scale(0.95);
}

.btn-primary:hover {
    transform: scale(1.05);
}

.btn-primary {
    background-color: var(--accent-color);
    color: #0f172a;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid var(--danger-color);
}

.btn-danger:hover {
    background-color: var(--danger-color);
    color: white;
}

.full-width {
    width: 100%;
}

.btn-sm {
    padding: 0.3rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    background: #334155;
    color: white;
}

.badge-unread {
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 999px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Animations */
@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    70% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideUp {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Apply PopIn */
.badge-unread,
#btn-confirm-border,
#btn-confirm-text {
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Layout */
.app-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    width: 280px;
    padding: 2rem 1rem;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 2rem;
    padding-left: 1rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    border-radius: 999px;
    transition: background 0.2s;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item .icon {
    font-size: 1.4rem;
    min-width: 30px;
    text-align: center;
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1rem 0;
}

.static-item {
    color: #fbbf24;
    font-weight: 600;
}

/* Main Content Column */
.main-content {
    flex: 1;
    max-width: 600px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    margin: 0;
    padding: 2rem 1rem;
}

/* Mobile Header */
.mobile-header {
    display: none;
    /* Hidden on desktop */
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin: -2rem -1rem 2rem -1rem;
    /* Counteract padding */
}

/* Responsive */
@media (max-width: 768px) {
    .app-sidebar {
        display: none;
        /* Default hidden */
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 260px;
        background: var(--bg-color);
        z-index: 1100;
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.5);
        animation: slideInLeft 0.3s ease-out;
    }

    .app-sidebar.mobile-open {
        display: flex;
    }

    .main-content {
        max-width: 100%;
        border-right: none;
    }

    .mobile-header {
        display: flex;
    }
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 1050;
    display: none;
}

.mobile-overlay.visible {
    display: block;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

/* Compose Area */
#compose-area {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#feed-container {
    width: 100%;
}

.post-card {
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border: none;
    /* Reset border issues */
}

#compose-area {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

textarea {
    width: 100%;
    background: #0f172a;
    border: 1px solid #334155;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.compose-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.cost-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#feed-filters {
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

.filter-btn {
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.2rem 0;
    position: relative;
}

.filter-btn.active {
    color: var(--text-primary);
}

.filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.post-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    animation: slideUpFade 0.5s ease backwards;
}

.post-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.post-content {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    white-space: pre-wrap;
}

.post-actions {
    display: flex;
    gap: 1.5rem;
    border-top: 1px solid #334155;
    padding-top: 1rem;
}

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.share-btn {
    color: var(--accent-color);
}

.share-btn:hover {
    background: rgba(16, 185, 129, 0.1);
}

.joy-btn {
    color: #ef4444;
}

.delete-btn {
    color: var(--danger-color);
    margin-left: auto;
}

/* Modal Rules - override hidden */
.hidden {
    display: none !important;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.visible {
    display: flex !important;
}

.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalSlideUp 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#modal-confirm,
#modal-message {
    z-index: 2000 !important;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.option {
    background: #0f172a;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
}

.option.selected {
    border-color: var(--accent-color);
}

.custom-amount {
    grid-column: 1 / -1;
}

#custom-amount-input {
    width: 100%;
    padding: 0.8rem;
    background: #0f172a;
    border: 1px solid #334155;
    color: white;
    border-radius: 8px;
}

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

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

.loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

/* Comments */
#comments-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.comment {
    border-bottom: 1px solid #334155;
    padding: 0.8rem 0;
}

.comment:last-child {
    border-bottom: none;
}

.comment-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.comment-compose {
    display: flex;
    gap: 0.5rem;
}

#comment-input {
    flex: 1;
    padding: 0.8rem;
    background: #0f172a;
    border: 1px solid #334155;
    color: white;
    border-radius: 8px;
}

/* Auth Styles */
.auth-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 400px;
    margin: 4rem auto;
    text-align: center;
}

.auth-input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    background: #0f172a;
    border: 1px solid #334155;
    color: white;
    border-radius: 8px;
}

.full-width {
    width: 100%;
}

.auth-switch {
    margin-top: 1rem;
    color: var(--text-secondary);
}

.auth-switch span {
    color: var(--accent-color);
    cursor: pointer;
    font-weight: bold;
}

/* Hashtag & Link Styles */
.hashtag {
    color: var(--accent-color);
    font-weight: 500;
}

.post-link {
    color: var(--accent-color);
    text-decoration: underline;
}

.link-preview-card {
    display: flex;
    /* Horizontal layout */
    margin-top: 1rem;
    border: 1px solid #334155;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    background: #0f172a;
    transition: transform 0.2s, border-color 0.2s;
    height: 120px;
    /* Fixed height for card */
}

.link-preview-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

.lp-image {
    width: 120px;
    /* Square image on left */
    height: 100%;
    object-fit: cover;
    background: #1e293b;
    display: block;
    flex-shrink: 0;
    /* Prevent shrinking */
}

/* Hide image when it has no src (handled by JS toggling style or class) or failed */
.lp-image[src=""],
.lp-image:not([src]) {
    display: none;
}

.lp-content {
    padding: 0.8rem 1rem;
    flex: 1;
    /* Take remaining space */
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    /* Fix flex child overflow */
}

.lp-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lp-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.lp-domain {
    font-size: 0.75rem;
    color: var(--accent-color);
    margin-top: auto;
    /* Push to bottom */
    padding-top: 0.5rem;
}

/* Read More */
.post-content.collapsed {
    max-height: 80px;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
    mask-image: linear-gradient(180deg, #000 60%, transparent);
}

.read-more-btn {
    background: transparent;
    border: none;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    padding: 0;
    display: block;
}

.read-more-btn:hover {
    text-decoration: underline;
}

/* Share Modal */
.share-textarea {
    width: 100%;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 1rem;
    margin: 1rem 0;
    font-family: inherit;
    resize: none;
    font-size: 0.95rem;
    line-height: 1.5;
}

.share-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-actions button {
    flex: 1;
    min-width: 120px;
}

/* Rich Text Styles */
.txt-bold {
    font-weight: 700;
}

.txt-italic {
    font-style: italic;
}

.txt-red {
    color: #f87171;
}

.txt-green {
    color: #4ade80;
}

.txt-blue {
    color: #60a5fa;
}

.txt-fire {
    background: linear-gradient(to top, #fcd34d, #ef4444);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
    animation: fire-flicker 1.5s infinite alternate;
}

.txt-rainbow {
    background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
    animation: rainbow-flow 3s linear infinite;
    background-size: 200%;
}

@keyframes fire-flicker {
    0% {
        text-shadow: 0 0 2px #ef4444;
    }

    100% {
        text-shadow: 0 0 5px #fcd34d;
    }
}

@keyframes rainbow-flow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

/* Post Container Styles */
.style-select {
    padding: 0.4rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
}

.style-select option {
    background: var(--bg-card);
}

.custom-border {
    position: relative;
    border: 2px solid var(--post-border-color, transparent) !important;
    box-shadow: 0 0 10px var(--post-border-color, transparent), inset 0 0 5px var(--post-border-color, transparent);
    animation: border-pulse 1.5s infinite alternate;
    z-index: 1;
}

@keyframes border-pulse {
    0% {
        box-shadow: 0 0 10px var(--post-border-color, transparent),
            inset 0 0 5px var(--post-border-color, transparent);
    }

    100% {
        box-shadow: 0 0 20px var(--post-border-color, transparent),
            inset 0 0 10px var(--post-border-color, transparent);
    }
}

.custom-text-color {
    color: var(--post-text-color, inherit) !important;
    text-shadow: 0 0 5px var(--post-border-color, rgba(255, 255, 255, 0.2));
    /* Subtle glow */
}

/* Presets */
.border-fire {
    position: relative;
    border: 2px solid transparent !important;
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        linear-gradient(to right, #fcd34d, #ef4444) border-box;
    animation: border-flicker 0.8s infinite alternate;
    /* Faster flicker */
    z-index: 1;
}

@keyframes border-flicker {
    0% {
        box-shadow: 0 0 10px #ef4444, inset 0 0 5px #ef4444;
    }

    100% {
        box-shadow: 0 0 25px #fcd34d, inset 0 0 10px #fcd34d;
    }
}

.border-rainbow {
    position: relative;
    border: 2px solid transparent !important;
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet) border-box;
    background-size: 400%;
    /* Smoother gradient */
    animation: rainbow-flow 4s linear infinite, rainbow-glow 2s infinite alternate;
    z-index: 1;
}

@keyframes rainbow-glow {
    0% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    }

    100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    }
}

.border-neon {
    border: 2px solid #0ff !important;
    box-shadow: 0 0 15px #0ff, inset 0 0 10px #0ff;
    animation: neon-pulse 1s infinite alternate;
}

@keyframes neon-pulse {
    0% {
        box-shadow: 0 0 15px #0ff, inset 0 0 10px #0ff;
    }

    100% {
        box-shadow: 0 0 30px #0ff, inset 0 0 20px #0ff;
        filter: hue-rotate(0deg);
    }
}

.border-galaxy {
    position: relative;
    border: 2px solid transparent !important;
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        linear-gradient(45deg, #6366f1, #a855f7, #ec4899) border-box;
    background-size: 200% 200%;
    animation: galaxy-spin 3s ease infinite;
    z-index: 1;
}

@keyframes galaxy-spin {
    0% {
        background-position: 0% 50%;
        box-shadow: 0 0 10px #6366f1;
    }

    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 20px #ec4899;
    }

    100% {
        background-position: 0% 50%;
        box-shadow: 0 0 10px #6366f1;
    }
}

.border-glitch {
    position: relative;
    border: 2px solid #fff !important;
    box-shadow: -2px 0 red, 2px 0 blue;
    animation: glitch-anim 2s infinite steps(2, start);
    z-index: 1;
}

@keyframes glitch-anim {
    0% {
        box-shadow: -2px 0 red, 2px 0 blue;
        transform: translate(0);
    }

    25% {
        box-shadow: 2px 0 red, -2px 0 blue;
        transform: translate(-2px, 1px);
    }

    50% {
        box-shadow: -1px 0 red, 1px 0 blue;
        transform: translate(1px, -1px);
    }

    75% {
        box-shadow: 1px 0 red, -1px 0 blue;
        transform: translate(0);
    }

    100% {
        box-shadow: -2px 0 red, 2px 0 blue;
        transform: translate(0);
    }
}

.border-gold {
    position: relative;
    border: 2px solid transparent !important;
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        linear-gradient(45deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c) border-box;
    background-size: 200%;
    animation: gold-shimmer 2s linear infinite;
    z-index: 1;
}

@keyframes gold-shimmer {
    0% {
        background-position: 0% 50%;
        box-shadow: 0 0 5px #bf953f;
    }

    100% {
        background-position: 100% 50%;
        box-shadow: 0 0 15px #fcf6ba;
    }
}

.color-red {
    color: #f87171 !important;
}

.color-green {
    color: #4ade80 !important;
}

.color-blue {
    color: #60a5fa !important;
}

.color-gold {
    color: #fbbf24 !important;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    animation: pulse-red 2s infinite;
}

.btn-danger:hover {
    background-color: #dc2626;
    transform: scale(1.05);
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Loader */
#initial-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Modal Visibility */
.modal.visible {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.modal.hidden {
    display: none !important;
}

/* Toast Notification */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 3000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 17px;
    opacity: 0;
    transition: opacity 0.5s, bottom 0.5s;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

/* Post Images */
.post-image-wrapper {
    margin-bottom: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.feed-image {
    width: 100%;
    height: 300px;
    /* Fixed small size */
    object-fit: contain;
    /* Fit entire image X and Y */
    object-position: center;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.feed-image:hover {
    transform: scale(1.02);
}

/* ============================================
   Advertisement Styles
   ============================================ */

.ad-container {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 12px;
    margin: 1rem 0;
    transition: all 0.3s ease;
}

.ad-container:hover {
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(30, 41, 59, 0.7);
}

.ad-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    text-align: center;
    opacity: 0.6;
}

.ad-content {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

/* Top Banner Ad */
.ad-banner {
    margin-bottom: 1.5rem;
}

.ad-banner .ad-content {
    min-height: 90px;
}

/* Sidebar Ad */
.ad-sidebar {
    width: 300px;
    padding: 1rem;
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.ad-sidebar .ad-content {
    min-height: 250px;
}

/* In-Feed Ad */
.ad-in-feed {
    margin: 2rem 0;
    animation: slideUpFade 0.5s ease backwards;
}

.ad-in-feed .ad-content {
    min-height: 200px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ad-sidebar {
        display: none !important;
    }

    .ad-banner .ad-content {
        min-height: 60px;
    }

    .ad-in-feed .ad-content {
        min-height: 150px;
    }
}

/* ============================================
   AD STYLES
   ============================================ */

/* Ad Container Base Styles */
.ad-container {
    margin: 1.5rem 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ad-container:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Banner Ad Styles */
.ad-banner {
    width: 100%;
    min-height: 90px;
    max-height: 250px;
    margin: 1.5rem 0;
}

/* Sidebar Ad Container */
.ad-sidebar {
    width: 300px;
    padding: 1rem;
    flex-shrink: 0;
}

.ad-sticky {
    position: sticky;
    top: 2rem;
}

.ad-sidebar .ad-container {
    min-height: 250px;
    max-height: 600px;
    margin: 0;
}

/* AdSense Specific Styles */
.adsbygoogle {
    display: block;
    width: 100%;
    min-height: inherit;
}

/* Loading placeholder for ads */
.ad-content:empty::after {
    content: 'Loading ad...';
    color: var(--text-secondary);
    font-size: 0.8rem;
    opacity: 0.5;
}

/* Responsive Ad Behavior */
@media (max-width: 1024px) {
    .ad-sidebar {
        display: none;
    }

    .app-layout {
        max-width: 1200px;
    }
}

@media (max-width: 768px) {
    .ad-banner {
        min-height: 50px;
        max-height: 100px;
        margin: 1rem 0;
    }

    .ad-container {
        margin: 1rem 0;
        min-height: 50px;
    }
}

/* Ad Label (Optional - for transparency) */
.ad-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}