:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-bg: #0f0f23;
    --card-bg: rgba(25, 25, 46, 0.8);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a8a8b3;
    --success-color: #10b981;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Animated Background */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--dark-bg);
    overflow: hidden;
}

.animated-background::before,
.animated-background::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.animated-background::before {
    background: linear-gradient(135deg, #667eea, #764ba2);
    top: -250px;
    left: -250px;
    animation-delay: 0s;
}

.animated-background::after {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    bottom: -250px;
    right: -250px;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(-30px, 30px) scale(0.9); }
    75% { transform: translate(30px, 50px) scale(1.05); }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 4rem;
    padding-top: 3rem;
}

.title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: fadeInDown 0.8s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.title-emoji {
    font-size: 1em;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(10deg); }
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    font-weight: 400;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

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

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

/* App Card */
.app-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    animation: fadeInUp 0.8s ease-out both;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

/* Card Colors */
.app-card[data-app="wger"]::before { background: linear-gradient(90deg, #667eea, #764ba2); }
.app-card[data-app="ryot"]::before { background: linear-gradient(90deg, #f093fb, #f5576c); }
.app-card[data-app="code"]::before { background: linear-gradient(90deg, #007acc, #00bcf2); }
.app-card[data-app="emulator"]::before { background: linear-gradient(90deg, #ff0000, #cc0000); }

.app-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--shadow-color);
    border-color: rgba(255, 255, 255, 0.2);
}

.app-card:hover::before { transform: scaleX(1); }

/* Status Indicator */
.status-indicator {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 12px;
    height: 12px;
    background: var(--success-color);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* App Icon */
.app-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

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

/* App Name */
.app-name {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* App Description */
.app-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Feature Tags */
.app-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.feature-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.feature-tag:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

/* Launch Button */
.launch-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Button Colors */
.app-card[data-app="wger"] .launch-button { background: linear-gradient(135deg, #667eea, #764ba2); box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4); }
.app-card[data-app="ryot"] .launch-button { background: linear-gradient(135deg, #f093fb, #f5576c); box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4); }
.app-card[data-app="code"] .launch-button { background: linear-gradient(135deg, #007acc, #00bcf2); box-shadow: 0 4px 15px rgba(0, 122, 204, 0.4); }
.app-card[data-app="emulator"] .launch-button { background: linear-gradient(135deg, #ff0000, #cc0000); box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4); }

.launch-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.launch-button:hover::before { left: 100%; }
.launch-button:hover { transform: translateX(4px); }

.launch-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.launch-button:hover .launch-icon { transform: translateX(4px); }

/* Button Group */
.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.button-group .launch-button {
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--card-border);
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.footer-copyright {
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.7;
}

#last-updated {
    color: var(--text-primary);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container { padding: 1rem; }
    .header { padding-top: 2rem; margin-bottom: 2rem; }
    .title { flex-direction: column; gap: 0.5rem; }
    .apps-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .app-card { padding: 1.5rem; }
    .app-icon { font-size: 3rem; }
    .app-name { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .app-features { flex-direction: column; }
    .feature-tag { text-align: center; }
    .button-group { flex-direction: column; gap: 0.75rem; }
    .button-group .launch-button { width: 100%; min-width: 100%; }
    .launch-button { width: 100%; justify-content: center; }
}
