:root {
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --focus-ring: #60a5fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background effects for premium look */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59,130,246,0.4) 0%, rgba(15,23,42,0) 70%);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139,92,246,0.3) 0%, rgba(15,23,42,0) 70%);
    bottom: -200px;
    right: -100px;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 4rem;
    background: rgba(30, 41, 59, 0.4);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-content {
    text-align: left;
    flex: 1;
}

.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid var(--card-border);
}

.qr-container img {
    width: 130px;
    height: 130px;
    background: white;
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.qr-container p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

h1 span {
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Grid Layout */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding-bottom: 4rem;
}

/* Card Styling - TV Optimized */
.app-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    outline: none;
}

.app-icon {
    font-size: 3.5rem;
    background: rgba(255, 255, 255, 0.05);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.05);
}

.app-info {
    flex: 1;
}

.app-info h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.app-info p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.app-code {
    display: inline-block;
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* TV D-PAD FOCUS & HOVER EFFECTS (CRITICAL FOR TV) */
.app-card:hover, 
.app-card:focus {
    transform: translateY(-8px) scale(1.02);
    background: rgba(45, 60, 85, 0.9);
    border-color: var(--focus-ring);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-glow);
}

.app-card:focus {
    /* Thick ring for TV remote visibility */
    outline: 4px solid var(--focus-ring);
    outline-offset: 4px;
}

.app-card:active {
    transform: translateY(0) scale(0.98);
}

@media (max-width: 768px) {
    .app-grid {
        grid-template-columns: 1fr;
    }
    h1 {
        font-size: 2.5rem;
    }
    header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    .header-content {
        text-align: center;
    }
}
