/* =========================================
   Blazor Styling
   ========================================= */

/* Error boundary styling */
.blazor-error-boundary {
    padding: 1rem;
    background: rgba(179, 33, 33, 0.9);
    color: white;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: bold;
    text-align: center;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

/* =========================================
   Global Page Styles
   ========================================= */

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top, #0c1326, #05060d);
    color: #e8f0ff;
}

/* Wrapper for the page */
.page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    min-height: 100vh;
    box-sizing: border-box;
    background: rgba(20, 30, 50, 0.5);
    padding: 40px 20px;
    border-radius: 18px;
    backdrop-filter: blur(16px);
}
/* Slightly lighter for main content panel */
/*.page-wrapper {
    background: rgba(20, 30, 50, 0.5);
    padding: 40px 20px;
    border-radius: 18px;
    backdrop-filter: blur(16px);
}*/

.page-grid > .sidebar,
.page-grid > .main-content {
    border: 1px solid rgba(75, 200, 255, 0.1);
}

.section-title {
    font-size: 1.6rem;
    color: #51c8ff;
    text-shadow: 0 0 6px rgba(0, 200, 255, 0.3);
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(75, 200, 255, 0.2);
    padding-bottom: 6px;
}

/* =========================================
   Top Banner – Dark Neon Style
========================================= */
.top-banner {
    width: 100%;
    background: rgba(10, 19, 38, 0.85); /* dark transparent base */
    backdrop-filter: blur(16px); /* glassy effect */
    color: #9be8ff; /* light neon blue */
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.banner-content h1 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #9be8ff;
    text-shadow: 0 0 8px #51c8ff, 0 0 16px rgba(0, 200, 255, 0.4);
    animation: glowPulse 3s infinite;
}

.banner-content p {
    font-size: 1rem;
    color: #c8eaff;
    text-shadow: 0 0 6px rgba(75, 200, 255, 0.3);
}

.banner-btn {
    margin-top: 8px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #4a90e2, #50e3c2);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(0, 200, 255, 0.4);
    transition: all 0.3s ease;
}

    .banner-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
        background: linear-gradient(135deg, #50e3c2, #4a90e2);
    }

    .banner-btn:active {
        transform: scale(0.96);
        box-shadow: 0 0 12px rgba(0, 200, 255, 0.3);
    }

/* =========================================
   Site Navigation Bar
   ========================================= */
.site-nav {
    width: 100%;
    padding: 12px 20px;
    background: rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 20px;
    color: #9be8ff;
    font-weight: 600;
    text-decoration: none;
}

.nav-links a {
    margin-left: 20px;
    color: #d7f3ff;
    text-decoration: none;
}

    .nav-links a:hover {
        color: white;
    }

/* =========================================
   Search Panel
   ========================================= */

.search-panel {
    width: 100%;
    max-width: 600px;
    padding: 30px;
    margin-bottom: 40px;
    backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    box-shadow: 0 0 40px rgba(0, 200, 255, 0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.title {
    font-size: 28px;
    margin-bottom: 16px;
    color: #9be8ff;
}

/* Search Box */
.search-box {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.search-input {
    flex: 1;
    padding: 14px 18px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 16px;
    outline: none;
}

/*Search Button*/
.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
    width: 52px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    color: #e8f0ff;
    font-size: 20px;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
}

    .search-btn:hover {
        background: rgba(255, 255, 255, 0.14);
        transform: translateY(-2px);
        box-shadow: 0 0 18px rgba(0, 200, 255, 0.25);
    }

    .search-btn:active {
        transform: scale(0.96);
        box-shadow: 0 0 10px rgba(0, 200, 255, 0.15);
    }

    /* Make the material icon a bit cleaner */
    .search-btn .material-icons {
        font-size: 22px;
    }

/* Results grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 40px;
    width: 100%;
    max-width: 1100px;
    padding: 10px 0;
}

/* Coupon card */
.coupon-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 0 30px rgba(0, 200, 255, 0.12);
    transition: all 0.25s ease;
}

    .coupon-card:hover {
        transform: translateY(-4px) scale(1.02);
        box-shadow: 0 0 40px rgba(0, 200, 255, 0.18);
    }

/* Coupon fields */
.coupon-code {
    font-size: 22px;
    font-weight: 700;
    color: #9be8ff;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.coupon-info {
    font-size: 18px;
    margin-bottom: 8px;
    color: #e8f0ff;
}

.coupon-source {
    font-size: 14px;
    color: #8fa7c3;
    margin-bottom: 12px;
}

.confidence {
    font-size: 15px;
    color: #9fc8ff;
}

    .confidence span {
        font-weight: 600;
        color: #a6f1ff;
    }

/*footer*/
.site-footer {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    color: #8fa3c8;
    font-size: 14px;
    opacity: 0.8;
    background: rgba(10, 10, 20, 0.8);
    border-top: 1px solid rgba(75, 200, 255, 0.1);
    text-align: center;
    flex-wrap: wrap;
}

    .site-footer a {
        color: #51c8ff;
        text-decoration: none;
        transition: all 0.2s ease-in-out;
    }

        .site-footer a:hover {
            color: #9be8ff;
            text-decoration: underline;
        }


/*Site logo*/
.site-logo {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    color: #9be8ff;
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: glowPulse 3s infinite;
}

@keyframes glowPulse {
    0% {
        text-shadow: 0 0 8px #51c8ff;
    }

    50% {
        text-shadow: 0 0 16px #8beaff;
    }

    100% {
        text-shadow: 0 0 8px #51c8ff;
    }
}

/*Privacy and Terms - Legal*/
.legal-page {
    max-width: 800px;
    margin: 0 auto; /* Center page content */
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    backdrop-filter: blur(12px);
    color: #e8f0ff;
    line-height: 1.6;
}

    .legal-page h2 {
        font-size: 28px;
        color: #9be8ff;
        margin-bottom: 20px;
        text-align: center;
    }

    .legal-page p {
        margin-bottom: 16px;
        font-size: 16px;
    }

/*Error Message*/
.error-message {
    color: #ff6b6b;
    background: rgba(255, 0, 0, 0.1);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
    font-weight: bold;
}

/* =========================================
   Right Sidebar
========================================= */
/*.right-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: rgba(5, 10, 20, 0.6);
    padding: 15px;
    border-radius: 16px;
    backdrop-filter: blur(18px);
    box-shadow: 0 0 25px rgba(0, 200, 255, 0.1);
}*/

/* on mobile: hide or move */
@media (max-width: 900px) {
    .right-sidebar {
        width: 100%;
        margin-top: 20px;
        order: 3; /* goes below main content */
    }
}


.updates-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #c8eaff;
}

    .updates-list li {
        margin-bottom: 10px;
        font-size: 0.9rem;
    }


/* =========================================
   Left Sidebar Featured Deals – Dark Theme
========================================= */

.featured-deals-container {
    width: 260px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 25px rgba(0, 200, 255, 0.12);
    color: #e8f0ff;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.featured-title {
    font-size: 20px;
    margin-bottom: 0.8rem;
    color: #9be8ff;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.9;
}

.featured-deals-scroll {
    overflow-y: auto;
    padding-right: 6px;
    max-height: calc(8.5 * 86px);
    scrollbar-width: thin;
    scrollbar-color: rgba(80, 200, 255, 0.5) transparent;
}

.featured-deals-container::after {
    content: "";
    position: sticky;
    bottom: 0;
    height: 28px;
    background: linear-gradient(to bottom, transparent, rgba(5,10,20,0.9));
    pointer-events: none;
}

.featured-deals-scroll::-webkit-scrollbar {
    width: 6px;
}

.featured-deals-scroll::-webkit-scrollbar-thumb {
    background: rgba(80, 200, 255, 0.5);
    border-radius: 6px;
}

.featured-footer {
    text-align: center;
    padding: 10px 0;
    font-size: 0.8rem;
    opacity: 0.85;
}

/* ==============================
            Deal Card 
=================================*/
.deal-card {
    display: flex;
    position: relative;
    gap: 12px;
    padding: 12px;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

    .deal-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 0 16px rgba(0, 200, 255, 0.2);
    }

    /* Image */
    .deal-card img {
        width: 70px;
        height: 70px;
        border-radius: 8px;
        object-fit: cover;
    }

.deal-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ff5f6d, #ffc371);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 6px;
    border-radius: 6px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    pointer-events: none; 
}

.deal-link::after {
    
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.deal-card:hover .deal-link::after {
    transform: translateX(4px);
}

.deal-expiring {
    color: #ff9f43;
    font-weight: 600;
}

.deal-badge.hot {
    background: linear-gradient(135deg, #ff5f6d, #ffc371);
}

.deal-badge.trending {
    background: linear-gradient(135deg, #51c8ff, #9be8ff);
    color: #00131f;
}

.deal-badge.new {
    background: linear-gradient(135deg, #8df7b0, #51ffda);
    color: #002010;
}


/* Info */
.deal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
}

    .deal-info p {
        font-size: 0.85rem;
        opacity: 0.9;
        display: -webkit-box;
        -webkit-line-clamp: 3; /* max 3 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

.deal-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #c8eaff;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* max 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.deal-price {
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.deal-current {
    font-weight: 700;
    color: #8df7b0;
}

.deal-old {
    text-decoration: line-through;
    color: #8895b0;
}

/* Link */
.deal-link {
    font-size: 0.85rem;
    color: #51c8ff;
    text-decoration: none;
}

    .deal-link:hover {
        text-decoration: underline;
    }

.deal-main {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.deal-main {
    display: flex;
    flex-direction: column;
    /*height: 160px;*/
    justify-content: space-between;
    width: 100%;
    /*height: 160px;*/
    box-sizing: border-box;
}

    .deal-main:hover .deal-cta {
        text-decoration: underline;
    }

.deal-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-top: auto;
    min-width: 0;
}

.deal-store {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8fa7c3;
    margin-bottom: 6px;
}

.deals-list {
    display: grid;
    grid-template-columns: 1fr; /* single column */
    gap: 16px;
    width: 100%;
    max-width: 760px; /* standard width */
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 rgba(80,200,255,0.0);
    }

    50% {
        box-shadow: 0 0 12px rgba(80,200,255,0.35);
    }

    100% {
        box-shadow: 0 0 0 rgba(80,200,255,0.0);
    }
}

.deal-card.new {
    animation: pulseGlow 2.5s ease-in-out infinite;
}

/* Deal Counter */
.deal-counter {
    font-size: 0.95rem;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(81, 200, 255, 0.1);
    border-left: 3px solid #51c8ff;
    border-radius: 6px;
    opacity: 0.9;
}

.counter-number {
    color: #51c8ff;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Copy Button */
.copy-button {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

    .copy-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }

    .copy-button:active {
        transform: translateY(0);
    }

.promo-code-text {
    user-select: all;
}

@media (max-width: 900px) {
    .deals-list {
        max-width: 100%;
    }

    .deal-main {
        height: auto;
        min-height: 140px;
    }
    .featured-deals-scroll {
        max-height: 320px;
    }
}


/* Mobile */
@media (max-width: 900px) {
    .featured-deals-container {
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* Promo code badge styling */
.deal-badge.promo-code {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: #fff;
}

/* Updated Promo Code Box */
/*.promo-code-box {
    background: rgba(16, 185, 129, 0.1);
    border: 2px dashed rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 8px 0;
}*/

.promo-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

    .promo-code-header > div {
        font-family: 'Courier New', monospace;
        font-size: 1rem;
        font-weight: bold;
        color: #34d399;
        letter-spacing: 0.05em;
    }

    .promo-code-header strong {
        font-size: 0.75rem;
        color: #8fa7c3;
        font-weight: 600;
        margin-right: 6px;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

.usage-count {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    font-size: 0.8rem;
    color: #8fa7c3;
    text-align: center;
}

.copy-button {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

    .copy-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }

    .copy-button:active {
        transform: translateY(0);
    }

.promo-code-text {
    user-select: all;
}

/* Promo code display box */
.promo-code-box {
    background: rgba(16, 185, 129, 0.1);
    border: 2px dashed rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 8px 0;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    text-align: center;
    font-weight: bold;
    color: #34d399;
    letter-spacing: 0.05em;
}

    .promo-code-box strong {
        font-size: 0.75rem;
        color: #8fa7c3;
        font-weight: 600;
        margin-right: 6px;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

/* =========================================
   Page Grid Layout
========================================= */
.page-grid {
    display: grid;
    grid-template-columns: 280px auto 280px; /* left | main | right */
    gap: 20px;
    position: relative;
    min-height: calc(100vh - 170px);
}

    /* Divider line (left of main content) */
    .page-grid::before {
        content: "";
        position: absolute;
        left: 260px; /* exactly after left sidebar */
        top: 20px;
        bottom: 20px;
        width: 1px;
        background: rgba(75, 200, 255, 0.1);
    }

/* Left and right sidebar */
.sidebar {
    width: 280px;
    background: rgba(5, 10, 20, 0.6);
    padding: 15px;
    border-radius: 16px;
    backdrop-filter: blur(18px);
    box-shadow: 0 0 25px rgba(0, 200, 255, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Main content */
.main-content {
    width: 100%;
    overflow-y: auto;
    padding-right: 8px;
}

/* Right sidebar */
.right-sidebar {
    width: 260px;
    background: rgba(5, 10, 20, 0.6);
    padding: 15px;
    border-radius: 16px;
    backdrop-filter: blur(18px);
    box-shadow: 0 0 25px rgba(0, 200, 255, 0.1);
}

/* Mobile: stack vertically */
@media (max-width: 900px) {
    .page-grid {
        grid-template-columns: 1fr; /* one column */
    }

    .sidebar,
    .right-sidebar {
        width: 100%;
        position: sticky;
        top: 170px;
        height: calc(100vh - 170px);
        overflow-y: auto;
    }

    .page-grid::before {
        display: none; /* hide divider on mobile */
    }
}


/* =========================================
   Coming Soon
   ========================================= */
.coming-soon-right {
    position: fixed; /* fixed to viewport */
    top: 75%; /* center vertically */
    right: 20px; /* distance from the right edge */
    transform: translateY(-50%); /* perfect vertical centering */
    background: rgba(20, 30, 50, 0.85); /* dark glassy base */
    color: #c8eaff; /* neon accent color */
    padding: 12px 20px;
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.3);
    font-weight: 500;
    font-size: 0.95rem;
    text-align: center;
    z-index: 10000; /* above all content */
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

    /* Hover effect for a subtle glow */
    .coming-soon-right:hover {
        box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
        transform: translateY(-50%) scale(1.05);
    }

@media (max-width: 900px) {
    .coming-soon-right {
        display: none;
    }
}

@keyframes pulseRight {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 200, 255, 0.3);
    }

    50% {
        box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    }
}

.coming-soon-right {
    animation: pulseRight 3s infinite;
}

