:root {
    --bg-main: #090d16;
    --bg-secondary: #0f172a;
    --card-bg: rgba(15, 23, 42, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #6366f1;
    --green: #10b981;
    --amber: #f59e0b;
    --purple: #a855f7;
    --blue: #0ea5e9;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-secondary: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(0, 0, 0, 0.08);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    padding: 30px 20px 60px 20px;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
}

.hub-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Header */
.hub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--card-border);
}

.hub-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hub-logo {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.hub-logo svg {
    width: 24px;
    height: 24px;
}

.hub-title {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hub-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.time-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    color: var(--text-main);
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover {
    border-color: var(--accent);
}

/* Filter Section */
.filter-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 30px;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-ico {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--text-muted);
}

.search-input-wrapper input {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 14px 16px 14px 44px;
    font-size: 15px;
    color: var(--text-main);
    outline: none;
    box-shadow: var(--shadow-card);
    transition: border-color 0.2s;
}

.search-input-wrapper input:focus {
    border-color: var(--accent);
}

.category-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    padding: 8px 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.cat-btn:hover,
.cat-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.35);
}

/* Apps Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.app-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.app-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    opacity: 0.15;
}

.blue-glow { background: var(--blue); }
.amber-glow { background: var(--amber); }
.emerald-glow { background: var(--green); }
.purple-glow { background: var(--purple); }

.app-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.app-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.app-icon svg {
    width: 24px;
    height: 24px;
}

.trading-icon { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.route-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.health-icon { background: linear-gradient(135deg, #10b981, #059669); }
.book-icon { background: linear-gradient(135deg, #a855f7, #7c3aed); }

.status-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 11px;
    font-weight: 700;
    color: var(--green);
}

.status-pill .dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--green);
}

.app-info {
    flex: 1;
    margin-bottom: 20px;
}

.app-name {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.app-category {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    display: block;
    margin-bottom: 10px;
}

.app-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.app-footer {
    display: flex;
    gap: 10px;
    align-items: center;
}

.launch-btn {
    flex: 1;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: opacity 0.2s, transform 0.2s;
}

.launch-btn:hover {
    opacity: 0.92;
    transform: scale(1.01);
}

.blue-btn { background: linear-gradient(90deg, #0ea5e9, #0284c7); }
.amber-btn { background: linear-gradient(90deg, #f59e0b, #d97706); }
.emerald-btn { background: linear-gradient(90deg, #10b981, #059669); }
.purple-btn { background: linear-gradient(90deg, #a855f7, #7c3aed); }

.copy-url-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-url-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent);
}

/* Footer */
.hub-footer {
    text-align: center;
}

.footer-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: #000;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 9999;
}
