/* ==========================================
   APPLIST.AI - CYBER LUX GLOBAL STYLES
   Enhanced with Animations from Design Doc
   ========================================== */

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0D0D0D;
    color: #FFFFFF;
    overflow-x: hidden;
}

/* Ensure body fills viewport */
body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

h1:focus {
    outline: none;
}

/* Primary Gradient Text Effect */
.text-gradient-primary {
    background: linear-gradient(135deg, #14F195 0%, #00D4AA 50%, #9945FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Credit Cost Badge with Glow */
.credit-cost-badge {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #14F195;
    background: rgba(20, 241, 149, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(20, 241, 149, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 10px rgba(20, 241, 149, 0.2);
    transition: all 0.3s ease;
}

.credit-cost-badge:hover {
    background: rgba(20, 241, 149, 0.15);
    border-color: rgba(20, 241, 149, 0.5);
    box-shadow: 0 0 20px rgba(20, 241, 149, 0.4);
    transform: translateY(-2px);
}

/* Execute Agent Button */
.btn-execute-agent {
    background: linear-gradient(135deg, #14F195, #00D4AA) !important;
    color: #0D0D0D !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    text-transform: none !important;
    box-shadow: 0 4px 15px rgba(20, 241, 149, 0.3) !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.btn-execute-agent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 241, 149, 0.5) !important;
}

.btn-execute-agent:active {
    transform: translateY(0);
}

.btn-execute-agent:disabled {
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.4) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

/* Compact Get Started Button - Smaller for Header */
.btn-get-started {
    background: linear-gradient(135deg, #14F195, #00D4AA) !important;
    color: #0D0D0D !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    text-transform: none !important;
    box-shadow: 0 2px 10px rgba(20, 241, 149, 0.3) !important;
    transition: all 0.3s ease !important;
    border: none !important;
    white-space: nowrap !important;
    margin-left: 8px !important;
}

.btn-get-started:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(20, 241, 149, 0.5) !important;
}

.btn-get-started:active {
    transform: translateY(0);
}

/* Mobile Sign In Icon - Animated */
.mobile-signin-icon {
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Responsive adjustments for Get Started button */
@media (max-width: 768px) {
    .btn-get-started {
        padding: 4px 10px !important;
        font-size: 12px !important;
    }
    
    .btn-get-started .mud-button-label {
        font-size: 12px !important;
    }
    
    .btn-get-started .mud-icon-root {
        font-size: 16px !important;
    }
}

@media (max-width: 480px) {
    .btn-get-started {
        padding: 4px 8px !important;
        font-size: 11px !important;
    }
}

a, .btn-link {
    color: #14F195;
    transition: color 0.3s ease;
}

a:hover, .btn-link:hover {
    color: #00D4AA;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #9945FF, #14F195);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(153, 69, 255, 0.4);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(20, 241, 149, 0.5);
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #14F195;
}

.invalid {
    outline: 1px solid #FF4444;
}

.validation-message {
    color: #FF4444;
    font-size: 0.875rem;
    margin-top: 4px;
}

/* Blazor Error UI - Enhanced */
#blazor-error-ui {
    color-scheme: dark;
    background: linear-gradient(135deg, #FF4444, #cc0000);
    bottom: 0;
    box-shadow: 0 -4px 20px rgba(255, 68, 68, 0.5);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 1rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 10000;
    color: white;
    font-weight: 500;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.5rem;
        transition: opacity 0.3s ease;
    }

    #blazor-error-ui .dismiss:hover {
        opacity: 0.7;
    }

.blazor-error-boundary {
    background: linear-gradient(135deg, #FF4444, #cc0000);
    padding: 1.5rem 1.5rem 1.5rem 4rem;
    color: white;
    border-radius: 8px;
    margin: 16px;
    box-shadow: 0 8px 24px rgba(255, 68, 68, 0.3);
}

    .blazor-error-boundary::before {
        content: '⚠';
        position: absolute;
        left: 1.5rem;
        font-size: 2rem;
    }

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Loading Progress with Cyber Aesthetic */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: rgba(20, 241, 149, 0.2);
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
        animation: pulse-glow 2s ease-in-out infinite;
    }

        .loading-progress circle:last-child {
            stroke: #14F195;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
            filter: drop-shadow(0 0 10px rgba(20, 241, 149, 0.5));
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    font-family: var(--font-display);
    color: #14F195;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
    text-shadow: 0 0 10px rgba(20, 241, 149, 0.5);
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #14F195;
    background: rgba(20, 241, 149, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Glass Morphism Cards */
.glass-card {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(26, 26, 46, 0.8);
    border-color: rgba(20, 241, 149, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.queued {
    background: rgba(255, 184, 77, 0.15);
    color: #FFB84D;
    border: 1px solid rgba(255, 184, 77, 0.3);
}

.status-badge.processing {
    background: rgba(0, 212, 170, 0.15);
    color: #00D4AA;
    border: 1px solid rgba(0, 212, 170, 0.3);
}

.status-badge.completed {
    background: rgba(20, 241, 149, 0.15);
    color: #14F195;
    border: 1px solid rgba(20, 241, 149, 0.3);
}

.status-badge.failed {
    background: rgba(255, 68, 68, 0.15);
    color: #FF4444;
    border: 1px solid rgba(255, 68, 68, 0.3);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #0D0D0D;
}

::-webkit-scrollbar-thumb {
    background: rgba(20, 241, 149, 0.3);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(20, 241, 149, 0.5);
}

/* Selection Styling */
::selection {
    background: rgba(20, 241, 149, 0.3);
    color: white;
}

::-moz-selection {
    background: rgba(20, 241, 149, 0.3);
    color: white;
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid #14F195;
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Utility Classes */
.hover\:scale-105:hover {
    transform: scale(1.05);
}

.hover\:text-primary:hover {
    color: #14F195 !important;
}

.transition-colors {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* ========== USER REQUESTED UI IMPROVEMENTS ========== */

/* Categories Color-Shift Animation */
.category-card-animated {
    animation: category-color-shift 8s ease infinite;
    background-size: 200% 200%;
    transition: all 0.3s ease;
}

@keyframes category-color-shift {
    0% { 
        background: linear-gradient(135deg, rgba(20, 241, 149, 0.15) 0%, rgba(0, 212, 170, 0.15) 100%);
        border-color: rgba(20, 241, 149, 0.3);
    }
    33% { 
        background: linear-gradient(135deg, rgba(153, 69, 255, 0.15) 0%, rgba(20, 241, 149, 0.15) 100%);
        border-color: rgba(153, 69, 255, 0.3);
    }
    66% { 
        background: linear-gradient(135deg, rgba(0, 212, 170, 0.15) 0%, rgba(153, 69, 255, 0.15) 100%);
        border-color: rgba(0, 212, 170, 0.3);
    }
    100% { 
        background: linear-gradient(135deg, rgba(20, 241, 149, 0.15) 0%, rgba(0, 212, 170, 0.15) 100%);
        border-color: rgba(20, 241, 149, 0.3);
    }
}

/* Animated Background Pulse for Categories Section */
@keyframes background-pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Enhanced Pulse Glow for Mobile - How It Works Section */
@media (max-width: 768px) {
    .pulse-glow {
        box-shadow: 0 0 40px rgba(20, 241, 149, 0.8) !important;
        animation: pulse-glow-mobile 3s ease-in-out infinite !important;
    }
}

@keyframes pulse-glow-mobile {
    0%, 100% {
        box-shadow: 0 0 40px rgba(20, 241, 149, 0.8);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 60px rgba(20, 241, 149, 1);
        transform: scale(1.05);
    }
}

/* Reduced Glow for AppList.AI Logo - 50% Reduced */
.neon-glow-text-reduced {
    text-shadow: 0 0 10px rgba(20, 241, 149, 0.2);
    transition: text-shadow 0.3s ease;
}

.neon-glow-text-reduced:hover {
    text-shadow: 0 0 15px rgba(20, 241, 149, 0.3);
}

/* Mobile Get Started Button - Gradient Background */
@media (max-width: 768px) {
    .btn-get-started {
        background: linear-gradient(135deg, #14F195, #00D4AA) !important;
        color: #0D0D0D !important;
        font-weight: 600 !important;
        padding: 8px 16px !important;
        border-radius: 6px !important;
        box-shadow: 0 4px 15px rgba(20, 241, 149, 0.4) !important;
        transition: all 0.3s ease !important;
    }
    
    .btn-get-started:hover {
        box-shadow: 0 6px 20px rgba(20, 241, 149, 0.6) !important;
        transform: translateY(-2px);
    }
}

/* Colorful Search Box Styling */
.search-box-enhanced {
    background: linear-gradient(135deg, rgba(20, 241, 149, 0.1), rgba(153, 69, 255, 0.1)) !important;
    border: 2px solid rgba(20, 241, 149, 0.3) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(20, 241, 149, 0.2) !important;
    transition: all 0.3s ease !important;
}

.search-box-enhanced:focus,
.search-box-enhanced:focus-within {
    box-shadow: 0 6px 30px rgba(20, 241, 149, 0.4) !important;
    border-color: rgba(0, 212, 170, 0.5) !important;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.15), rgba(153, 69, 255, 0.15)) !important;
}

.search-box-enhanced input {
    color: var(--text-primary) !important;
}

.search-box-enhanced input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Hide Header Search on Mobile */
@media (max-width: 768px) {
    .header-search-desktop {
        display: none !important;
    }
}

/* Professional Mobile Header Improvements */
@media (max-width: 768px) {
    .mobile-signin-icon {
        color: var(--color-primary) !important;
        padding: 8px !important;
    }

    .main-header {
        padding: 12px 16px !important;
    }
}

/* ==========================================
   COOKIE CONSENT BANNER
   GDPR/CCPA Compliant Privacy Control
   ========================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(13, 13, 13, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(20, 241, 149, 0.2);
    color: #FFFFFF;
    padding: 24px 20px;
    z-index: 10000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5), 0 0 60px rgba(20, 241, 149, 0.1);
    animation: slide-in-bottom 0.5s ease-out;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 300px;
}

.cookie-banner-text h3 {
    margin: 0 0 8px 0;
    font-size: 1.2em;
    font-weight: 600;
    color: #14F195;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
}

.cookie-banner-text a {
    color: #00D4AA;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cookie-banner-text a:hover {
    color: #14F195;
}

.cookie-banner-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.btn-accept,
.btn-reject {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-accept {
    background: linear-gradient(135deg, #14F195 0%, #00D4AA 100%);
    color: #0D0D0D;
    box-shadow: 0 4px 12px rgba(20, 241, 149, 0.3);
}

.btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(20, 241, 149, 0.4);
}

.btn-accept:active {
    transform: translateY(0);
}

.btn-reject {
    background: transparent;
    color: #FFFFFF;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-reject:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-reject:active {
    background: rgba(255, 255, 255, 0.05);
}

/* Mobile Cookie Banner */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 20px 16px;
    }

    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .cookie-banner-text {
        min-width: 0;
    }

    .cookie-banner-text h3 {
        font-size: 1.1em;
    }

    .cookie-banner-text p {
        font-size: 13px;
    }

    .cookie-banner-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .btn-accept,
    .btn-reject {
        width: 100%;
        text-align: center;
    }
}
