/* ============================================
   WEBSTORE - DESIGN SYSTEM s
   Modern Color Palette Implementation
   ============================================ */

/* ============================================
   1. FUTURISTIC DESIGN TOKENS
   ============================================ */
:root {
    /* Base Colors - Deep Blue Theme */
    --color-space-dark: #0a1628;        /* Espaço Profundo */
    --color-space-medium: #0d1b2a;      /* Azul Espacial Médio */
    --color-space-light: #1b2838;       /* Azul Espacial Claro */

    /* Accent Colors - Blue to Cyan to Purple Gradient (HYPER UP TV Theme) */
    --color-accent-cyan: #00d9ff;       /* Ciano Brilhante */
    --color-accent-blue: #0066ff;       /* Azul Vibrante */
    --color-accent-purple: #9d00ff;     /* Roxo/Magenta */

    /* Primary & Secondary Colors */
    --color-primary: #00d9ff;           /* Ciano Primário */
    --color-secondary: #9d00ff;         /* Roxo Secundário */

    /* Cyan Accents - Luminous Blue */
    --color-cyan: #00d9ff;              /* Ciano Brilhante */
    --color-cyan-light: #4dd0e1;        /* Ciano Claro */
    --color-cyan-glow: rgba(0, 217, 255, 0.3);

    /* Text Colors */
    --color-text-primary: #ffffff;
    --color-text-secondary: #e0e0e0;
    --color-text-muted: rgba(255, 255, 255, 0.6);
    --color-text-disabled: rgba(255, 255, 255, 0.4);

    /* Background Colors */
    --color-bg-primary: #0a1628;
    --color-bg-secondary: rgba(13, 27, 42, 0.8);
    --color-bg-tertiary: rgba(27, 40, 56, 0.7);

    /* Glass Morphism */
    --glass-bg: rgba(0, 0, 0, 0.5);
    --glass-bg-light: rgba(0, 0, 0, 0.3);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(10px);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00d9ff 0%, #0066ff 50%, #9d00ff 100%);
    --gradient-space: radial-gradient(ellipse at top, #1b2838 0%, #0d1b2a 50%, #0a1628 100%);
    --gradient-cyan: linear-gradient(135deg, #00d9ff 0%, #4dd0e1 100%);
    --gradient-glow: radial-gradient(circle, rgba(0, 217, 255, 0.2), transparent 70%);
    --gradient-overlay: linear-gradient(135deg, rgba(0, 217, 255, 0.05) 0%, rgba(0, 102, 255, 0.05) 50%, rgba(157, 0, 255, 0.05) 100%);

    /* Shadows with Glow */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.8);
    --shadow-primary: 0 0 20px rgba(0, 217, 255, 0.5), 0 0 40px rgba(0, 217, 255, 0.3);
    --shadow-secondary: 0 0 20px rgba(157, 0, 255, 0.5), 0 0 40px rgba(157, 0, 255, 0.3);
    --glow-cyan: 0 0 20px rgba(0, 217, 255, 0.5), 0 0 40px rgba(0, 217, 255, 0.3);
    --glow-blue: 0 0 20px rgba(0, 102, 255, 0.5), 0 0 40px rgba(0, 102, 255, 0.3);
    --glow-purple: 0 0 20px rgba(157, 0, 255, 0.5), 0 0 40px rgba(157, 0, 255, 0.3);

    /* Transitions - Smooth */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
}

/* ============================================
   2. GLOBAL STYLES - FUTURISTIC SPACE THEME
   ============================================ */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--color-space-dark);
    background-image: url('../bg.jpg');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--color-text-primary);
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
    letter-spacing: 0.3px;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Animated Particle Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20% 30%, var(--color-cyan), transparent),
        radial-gradient(2px 2px at 60% 70%, var(--color-accent-purple), transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, var(--color-cyan-light), transparent),
        radial-gradient(2px 2px at 90% 60%, var(--color-accent-blue), transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent),
        radial-gradient(1px 1px at 15% 60%, var(--color-cyan), transparent);
    background-size: 200% 200%, 250% 250%, 300% 300%, 350% 350%, 400% 400%, 450% 450%, 500% 500%;
    background-position: 0% 0%, 50% 50%, 100% 100%, 25% 75%, 75% 25%, 0% 100%, 100% 0%;
    animation: particleFloat 20s ease-in-out infinite;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

/* Pattern Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../pattern.png');
    background-size: auto;
    background-repeat: repeat;
    background-position: center;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

@keyframes particleFloat {
    0%, 100% {
        background-position: 0% 0%, 50% 50%, 100% 100%, 25% 75%, 75% 25%, 0% 100%, 100% 0%;
    }
    25% {
        background-position: 50% 25%, 75% 75%, 25% 50%, 100% 100%, 0% 0%, 75% 25%, 25% 100%;
    }
    50% {
        background-position: 100% 50%, 0% 100%, 50% 0%, 75% 25%, 25% 75%, 100% 50%, 0% 50%;
    }
    75% {
        background-position: 25% 75%, 100% 25%, 75% 100%, 0% 50%, 50% 0%, 50% 75%, 75% 0%;
    }
}

/* Geometric Lines Background - REMOVED */

/* ============================================
   3. HEADER / TOPBAR
   ============================================ */
.page-topbar {
    background: var(--color-bg-tertiary) !important;
    background-image: var(--gradient-primary) !important;
    box-shadow: var(--shadow-md);
    border-bottom: 2px solid var(--color-primary);
    padding: var(--spacing-md) 0;
}

.header-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Search Container */
.search-container {
    position: relative;
    max-width: 500px;
    margin-left: auto;
}

.search-input {
    width: 100%;
    padding: 12px 48px 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    color: var(--color-text-primary);
    font-size: 15px;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--color-secondary);
    box-shadow: 0 0 20px rgba(255, 165, 0, 0.3);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    pointer-events: none;
}

/* ============================================
   4. CARDS - MODERN GRID LAYOUT
   ============================================ */
.app-card-wrapper {
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp var(--transition-slow) ease-out;
}

.app-card {
    background: var(--color-bg-secondary) !important;
    border: 1px solid rgba(255, 107, 26, 0.2) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    overflow: hidden;
    position: relative;
    height: 100%;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-overlay);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.app-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary) !important;
}

.app-card:hover::before {
    opacity: 1;
}

.app-card .card-body {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* App Header */
.app-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.app-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 4px;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-primary);
    transition: transform var(--transition-base);
}

.app-card:hover .app-icon {
    transform: scale(1.1) rotate(5deg);
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 3px solid var(--color-bg-secondary);
}

.app-info {
    flex: 1;
    min-width: 0;
}

.app-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.version-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 165, 0, 0.15);
    border: 1px solid var(--color-secondary);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-secondary);
}

/* App Info Grid */
.app-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--spacing-md);
    padding: var(--spacing-md) 0;
    border-top: 1px solid rgba(255, 107, 26, 0.15);
    border-bottom: 1px solid rgba(255, 107, 26, 0.15);
    margin: var(--spacing-sm) 0;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.info-label i {
    font-size: 14px;
    color: var(--color-primary);
}

.info-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-secondary);
    padding-left: 20px;
}

/* Download Button */
.btn-download {
    width: 100%;
    padding: 14px 24px;
    background: var(--gradient-primary);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-primary);
    position: relative;
    overflow: hidden;
}

.btn-download::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width var(--transition-slow), height var(--transition-slow);
}

.btn-download:hover::before {
    width: 300px;
    height: 300px;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(255, 107, 26, 0.6);
    border-color: var(--color-secondary);
}

.btn-download:active {
    transform: translateY(0);
}

.btn-download i {
    font-size: 20px;
    z-index: 1;
}

.btn-download span {
    z-index: 1;
}

/* ============================================
   5. MODAL BUTTONS
   ============================================ */
.btn-secondary {
    background: var(--color-bg-secondary) !important;
    border: 2px solid var(--color-secondary) !important;
    color: var(--color-text-primary) !important;
    transition: all var(--transition-base);
    padding: 10px 24px;
    border-radius: var(--radius-md);
}

.btn-secondary:hover {
    background: var(--color-secondary) !important;
    box-shadow: var(--shadow-secondary);
    transform: translateY(-2px);
}

/* ============================================
   6. TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-primary);
    font-weight: 700;
}

h2 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

h4 {
    color: var(--color-text-primary) !important;
}

h5 {
    color: var(--color-secondary) !important;
    font-weight: 600;
}

.text-muted {
    color: var(--color-text-muted) !important;
}

/* Icons with Color */
.uil {
    color: var(--color-primary);
    transition: color var(--transition-fast);
}

.card:hover .uil {
    color: var(--color-secondary);
}

/* ============================================
   7. FOOTER - REMOVED FOR BETTER UX
   ============================================ */
/* Footer removed to maximize content area */

/* ============================================
   8. MODAL
   ============================================ */
.modal-content {
    background: var(--color-bg-secondary) !important;
    border: 2px solid var(--color-primary) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background: var(--gradient-primary) !important;
    border-bottom: 2px solid var(--color-primary) !important;
}

.modal-title {
    color: var(--color-text-primary) !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.modal-body {
    color: var(--color-text-primary);
    margin: 20px 0;
}

.modal-body h5 {
    color: var(--color-secondary) !important;
    margin-top: 20px;
}

.modal-body p {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.modal-footer {
    border-top: 1px solid rgba(255, 107, 26, 0.2) !important;
    display: flex;
    justify-content: center;
}

.modal-backdrop.show {
    opacity: 0.8 !important;
    background: var(--color-bg-tertiary);
}

/* Close button */
.close {
    color: var(--color-text-primary) !important;
    opacity: 0.8;
    transition: all var(--transition-fast);
}

.close:hover {
    opacity: 1;
    color: var(--color-secondary) !important;
    text-shadow: 0 0 10px rgba(255, 165, 0, 0.5);
}

/* ============================================
   9. PAGE TITLE - REMOVED FOR CLEANER UI
   ============================================ */
/* Title removed to maximize space and reduce visual clutter */

/* ============================================
   10. CONTENT AREA
   ============================================ */
.main-content {
    min-height: calc(100vh - 120px);
    padding-top: 48px;
    padding-bottom: 80px;
}

.page-content {
    padding-top: 0;
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
    padding-bottom: var(--spacing-xl);
}

/* ============================================
   11. ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.card {
    animation: fadeInUp var(--transition-slow) ease-out;
}

/* ============================================
   12. UTILITIES
   ============================================ */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-primary {
    box-shadow: var(--shadow-primary) !important;
}

.shadow-secondary {
    box-shadow: var(--shadow-secondary) !important;
}

/* ============================================
   13. SCROLLBAR CUSTOMIZATION
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
}

/* ============================================
   14. RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 991px) {
    .app-card-wrapper {
        margin-bottom: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .header-title {
        font-size: 24px;
    }

    .search-container {
        margin-top: var(--spacing-md);
        max-width: 100%;
    }

    .col-md-4, .col-md-8 {
        width: 100%;
    }

    .app-icon {
        width: 56px;
        height: 56px;
    }

    .app-name {
        font-size: 16px;
    }

    .btn-download {
        padding: 12px 20px;
        font-size: 15px;
    }

    .app-card .card-body {
        padding: var(--spacing-md);
    }

    .app-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .info-label {
        font-size: 11px;
    }

    .info-value {
        font-size: 14px;
        padding-left: 16px;
    }
}

@media (max-width: 576px) {
    .header-title {
        font-size: 20px;
        text-align: center;
    }

    .page-topbar .navbar-header {
        padding: 0;
    }

    .search-input {
        font-size: 14px;
        padding: 10px 40px 10px 16px;
    }

    .app-icon {
        width: 48px;
        height: 48px;
    }

    .app-info-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .app-header {
        gap: var(--spacing-sm);
    }

    .info-value {
        font-size: 13px;
        padding-left: 14px;
    }
}

/* ============================================
   15. ACCESSIBILITY ENHANCEMENTS
   ============================================ */
*:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 26, 0.5);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
