:root {
    --bg-dark: #0a0e17;
    --bg-darker: #05070a;
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --secondary: #8b5cf6;
    --accent: #0ea5e9;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-bg: rgba(15, 23, 42, 0.6);
    --card-border: rgba(51, 65, 85, 0.5);
    --hover-bg: rgba(30, 41, 59, 0.8);
    
    --camera-color: #ef4444;
    --kettle-color: #10b981;
    --torrent-color: #f59e0b;
    --ai-color: #8b5cf6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

/* Background Animated Blobs */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

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

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(14,165,233,0.15) 0%, rgba(10,14,23,0) 70%);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, rgba(10,14,23,0) 70%);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, rgba(10,14,23,0) 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(5%, 10%) scale(1.1); }
    66% { transform: translate(-5%, 5%) scale(0.9); }
    100% { transform: translate(0, -10%) scale(1); }
}

/* Layout Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

/* Header */
header {
    margin-bottom: 4rem;
    text-align: center;
    animation: fadeDown 0.8s ease-out forwards;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 400;
}

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

/* Glassmorphism App Cards */
.app-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.75rem;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease-out forwards;
}

/* Stagger card animations */
.app-card:nth-child(1) { animation-delay: 0.1s; }
.app-card:nth-child(2) { animation-delay: 0.2s; }
.app-card:nth-child(3) { animation-delay: 0.3s; }
.app-card:nth-child(4) { animation-delay: 0.4s; }

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.app-card:hover {
    background: var(--hover-bg);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

.app-card:hover::before {
    transform: translateX(100%);
}

/* Card Icons */
.app-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1.25rem;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

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

.camera-icon { color: var(--camera-color); text-shadow: 0 0 15px rgba(239, 68, 68, 0.5); }
.kettle-icon { color: var(--kettle-color); text-shadow: 0 0 15px rgba(16, 185, 129, 0.5); }
.torrent-icon { color: var(--torrent-color); text-shadow: 0 0 15px rgba(245, 158, 11, 0.5); }
.ai-icon { color: var(--ai-color); text-shadow: 0 0 15px rgba(139, 92, 246, 0.5); }

/* Card Content */
.app-content {
    flex-grow: 1;
}

.app-content h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    transition: color 0.2s;
}

.app-card:hover .app-content h2 {
    color: #fff;
}

.app-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Launch Arrow */
.launch-arrow {
    background: rgba(255, 255, 255, 0.05);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-card:hover .launch-arrow {
    opacity: 1;
    transform: translateX(0);
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Footer */
footer {
    margin-top: 5rem;
    text-align: center;
    color: rgba(148, 163, 184, 0.5);
    font-size: 0.875rem;
    animation: fadeIn 1s ease-out 1s forwards;
    opacity: 0;
}

/* Animations */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive constraints */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .container { padding: 3rem 1.5rem; }
    header { margin-bottom: 3rem; }
}

@media (max-width: 480px) {
    .app-grid { grid-template-columns: 1fr; }
    h1 { font-size: 2rem; }
}
