html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

/* ====================== AUCTION DETAILS CSS ====================== */

/* Remove body background-image rules so we can use a pseudo element for advanced dark mode filtering */
body {
    background-image: none !important;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: url("../../img/i1.png");
    background-image: image-set(url("../../img/i1.webp") type("image/webp"), url("../../img/i1.png") type("image/png"));
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0.15;
    /* Subtly dim in light mode so it doesn't overpower */
}

[data-theme="dark"] body {
    background-image: none !important;
}

[data-theme="dark"] body::before {
    /* Magic filter logic from organizer dashboard for the perfect glowing neon look */
    filter: invert(1) hue-rotate(185deg) brightness(0.92) contrast(1.05);
    opacity: 0.35;
    /* Perfect opacity to blend with the #000000 base background */
}

.ad-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 1.25rem 1rem 1rem;      /* trimmed bottom — no wasted space under short tab content */
    font-family: 'Poppins', sans-serif;
    color: var(--text-primary);
}

@media (min-width: 1200px) {
    .ad-container {
        padding: 1.75rem 4rem 1.5rem;
    }
}

@media (min-width: 600px) and (max-width: 1199px) {
    .ad-container {
        padding: 1.5rem 2rem 1.25rem;
    }
}

.blue-text {
    color: #0088EA;
}

.blue-btn {
    background-color: #0088EA;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.blue-btn:hover {
    background-color: #0073c6;
}

/* Header Top */
.ad-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.ad-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 auto 0 0;   /* keep title next to the back button on the left (actions stay right) */
}

.ad-actions {
    display: flex;
    gap: 12px;
}

.ac-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.ac-icon.edit {
    color: #0088EA;
}

.ac-icon.delete {
    color: #ff4d4f;
}


/* Details Card - Luxury Glassmorphic Style */
.ad-glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 32px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .ad-glass-card {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.6) 0%, rgba(15, 15, 15, 0.3) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ad-tournament-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    padding: 0 0 24px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .ad-tournament-row {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ad-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    display: block;
    font-weight: 600;
}

[data-theme="dark"] .ad-label {
    color: #aaa;
}

.ad-tournament-name {
    font-size: 28px;
    font-weight: 800;
    margin: 4px 0 0 0;
    color: #111;
    letter-spacing: -0.5px;
}

.ad-tournament-icons {
    display: flex;
    gap: 16px;
    background: rgba(255, 255, 255, 0.5);
    padding: 10px 16px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.ad-tournament-icons svg {
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: #0088EA;
    transition: transform 0.2s ease;
}

.ad-tournament-icons svg:hover {
    transform: scale(1.1);
}

/* Premium Hero Banner (Light Theme) */
.premium-hero-banner {
    background-color: rgba(255, 255, 255, 0.85);
    background-image:
        url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='curves' width='400' height='200' patternUnits='userSpaceOnUse' patternTransform='rotate(-10) scale(1.5)'%3E%3Cpath d='M0 100 C 100 50, 100 150, 200 100 C 300 50, 300 150, 400 100' fill='none' stroke='%230088ea' stroke-width='1.5' stroke-opacity='0.12'/%3E%3Cpath d='M0 120 C 100 70, 100 170, 200 120 C 300 70, 300 170, 400 120' fill='none' stroke='%230088ea' stroke-width='1.5' stroke-opacity='0.08'/%3E%3Cpath d='M0 80 C 100 30, 100 130, 200 80 C 300 30, 300 130, 400 80' fill='none' stroke='%230088ea' stroke-width='1.5' stroke-opacity='0.08'/%3E%3Cpath d='M0 140 C 100 90, 100 190, 200 140 C 300 90, 300 190, 400 140' fill='none' stroke='%230088ea' stroke-width='1.5' stroke-opacity='0.05'/%3E%3Cpath d='M0 60 C 100 10, 100 110, 200 60 C 300 10, 300 110, 400 60' fill='none' stroke='%230088ea' stroke-width='1.5' stroke-opacity='0.05'/%3E%3Cpath d='M0 160 C 100 110, 100 210, 200 160 C 300 110, 300 210, 400 160' fill='none' stroke='%230088ea' stroke-width='1.5' stroke-opacity='0.02'/%3E%3Cpath d='M0 40 C 100 -10, 100 90, 200 40 C 300 -10, 300 90, 400 40' fill='none' stroke='%230088ea' stroke-width='1.5' stroke-opacity='0.02'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(../%23curves)' /%3E%3C/svg%3E"),
        radial-gradient(at 100% 0%, rgba(0, 136, 234, 0.08) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(0, 180, 216, 0.05) 0px, transparent 50%);
    background-size: cover;
    border: 1px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    color: #0f172a;
    box-shadow: 0 20px 50px rgba(0, 136, 234, 0.06), 0 4px 12px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.ph-top-section {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

@media (min-width: 900px) {
    .ph-top-section {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.ph-logo-container {
    width: 140px;
    height: 140px;
    background: #fff;
    border-radius: 50%;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 136, 234, 0.15);
    flex-shrink: 0;
}

.ph-logo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: #fff;
}

.ph-main-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ph-badges {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ph-badge-pro {
    background: #0088ea;
    color: #fff;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 136, 234, 0.25);
}

.ph-badge-code {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.ph-tournament-name {
    font-size: 38px;
    font-weight: 800;
    margin: 0;
    color: #0f172a;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.ph-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 32px;
}

.ph-datetime {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
}

.ph-datetime svg {
    width: 18px;
    height: 18px;
    stroke: #0088ea;
}

.ph-socials {
    display: flex;
    gap: 16px;
    align-items: center;
}

.ph-social-icon {
    color: #64748b;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ph-social-icon:hover {
    color: #0088ea;
    transform: translateY(-2px);
}

.ph-social-icon svg {
    width: 20px;
    height: 20px;
}

.ph-action-icon {
    width: 20px;
    height: 20px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ph-action-icon:hover {
    color: #0088ea;
}

.ph-actions-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

@media (min-width: 900px) {
    .ph-actions-right {
        align-items: flex-end;
    }
}

.ph-engagement {
    display: flex;
    gap: 12px;
}

.ph-btn-follow {
    background: transparent;
    border: 1.5px solid #0088ea;
    color: #0088ea;
    padding: 8px 24px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ph-btn-follow:hover {
    background: rgba(0, 136, 234, 0.05);
}

.ph-btn-like {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.ph-btn-like:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fecaca;
}

.ph-btn-like svg {
    width: 18px;
    height: 18px;
}

.ph-btn-panel {
    background: #0088ea;
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ph-btn-panel svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

.ph-btn-panel:hover {
    transform: translateY(-2px);
    background: #0073c7;
}

/* Mobile Responsive Hero Banner */
@media (max-width: 899px) {
    .premium-hero-banner {
        padding: 20px;
        border-radius: 16px;
        gap: 24px;
    }

    .ph-top-section {
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .ph-logo-container {
        width: 100px;
        height: 100px;
    }

    .ph-main-info {
        align-items: center;
        gap: 12px;
    }

    .ph-tournament-name {
        font-size: 28px;
    }

    .ph-meta-row {
        flex-direction: column;
        gap: 12px;
        justify-content: center;
    }

    .ph-actions-right {
        width: 100%;
        align-items: stretch;
    }

    .ph-engagement {
        justify-content: center;
    }

    .ph-btn-panel {
        width: 100%;
    }

    .ph-stats-bar {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        padding: 16px;
        gap: 16px;
    }

    .ph-stat-icon {
        width: 40px;
        height: 40px;
    }

    .ph-stat-item {
        gap: 12px;
    }
}

/* Stats Bar */
.ph-stats-bar {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 24px;
}

.ph-stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ph-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f0f9ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0088ea;
    border: 1px solid #e0f2fe;
}

.ph-stat-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
}

.ph-stat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ph-stat-label {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ph-stat-value {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}


.ad-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ad-stat-item:hover .ad-stat-icon {
    transform: rotate(5deg) scale(1.1);
}

[data-theme="dark"] .ad-stat-icon {
    background: #222222;
}

.ad-stat-icon svg {
    width: 22px;
    height: 22px;
    stroke: #0a0a0a;
}

[data-theme="dark"] .ad-stat-icon svg {
    stroke: #ffffff;
}

.ad-stat-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ad-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    color: #888888;
}

.ad-stat-value {
    font-size: 20px;
    font-weight: 800;
    color: #0a0a0a;
    letter-spacing: -0.5px;
}

[data-theme="dark"] .ad-stat-value {
    color: #ffffff;
}

.ad-panel-action {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

.ad-btn-panel {
    background: #0a0a0a;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 18px 40px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .ad-btn-panel {
    background: #ffffff;
    color: #0a0a0a;
    box-shadow: 0 10px 24px rgba(255, 255, 255, 0.1);
}

.ad-btn-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
    transform: skewX(-20deg);
    transition: all 0.6s ease;
}

.ad-btn-panel:hover::after {
    left: 150%;
}

.ad-btn-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
}


/* .card — generic card (moved here from dashboard.css so this page owns its code, R5) */
.card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 200px;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}
[data-theme="dark"] .card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.65) 0%, rgba(15, 23, 42, 0.55) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
