/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --accent-color: #a78bfa;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.6);
    --border-color: rgba(148, 163, 184, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    --gradient-card: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(167, 139, 250, 0.1) 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background: #0a0f1a;
    background-image: 
        radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(167, 139, 250, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(167, 139, 250, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Grid Background */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image: 
        linear-gradient(rgba(139, 92, 246, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.4;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Availability Badge */
.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--primary-light);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Header Styles */
.header {
    text-align: center;
    padding: 120px 20px 80px;
    position: relative;
    margin-bottom: 100px;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.title {
    font-size: 5.5rem;
    font-weight: 900;
    margin-bottom: 0;
    letter-spacing: -0.05em;
    line-height: 1.1;
    animation: fadeInUp 0.8s ease-out;
}

.title-violet {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-line {
    display: block;
    color: #ffffff;
}

.title span:not(.title-violet) {
    color: #ffffff;
}

.title-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-slogan {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-top: 20px;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-align: center;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

/* Apps Section */
.apps-section {
    padding: 0 20px 100px;
}

.apps-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
    align-items: center;
}

.app-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
    max-width: 400px;
    width: 100%;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-card);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

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

.app-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: var(--shadow-xl);
}

.app-icon-container {
    position: relative;
    z-index: 1;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.app-icon {
    font-size: 4rem;
    filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.3));
    transition: transform 0.3s ease;
}

.app-icon-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 18px;
    filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.3));
    transition: transform 0.3s ease;
    background: rgba(30, 41, 59, 0.5);
    padding: 12px;
}

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

.app-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
    text-align: center;
}

.app-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    line-height: 1.6;
    text-align: center;
}

.app-link-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.app-link-arrow {
    transition: transform 0.3s ease;
}

.app-card:hover .app-link-arrow {
    transform: translateX(6px);
}

/* CTA Section */
.cta-section {
    padding: 100px 20px;
    position: relative;
}

.cta-card {
    max-width: 900px;
    margin: 0 auto;
    background: var(--gradient-primary);
    border-radius: 32px;
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.cta-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: white;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

.cta-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: #000000;
    color: white;
}

.btn-primary:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 16px 32px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.2);
}

.btn-app-store {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: #000000;
    padding: 14px 24px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    line-height: 1;
}

.btn-app-store svg {
    color: #000000;
    flex-shrink: 0;
    align-self: center;
    margin-top: 0;
    margin-bottom: 0;
    position: relative;
    top: 0;
}

.btn-app-store span {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.btn-app-store:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

.btn-divider {
    width: 1px;
    height: 20px;
    background: rgba(0, 0, 0, 0.2);
    margin: 0 12px;
}

.btn-free {
    font-weight: 600;
    color: #000000;
}

/* Footer */
.footer {
    padding: 60px 20px 40px;
    border-top: 1px solid var(--border-color);
    margin-top: 80px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    line-height: 1;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .apps-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.125rem;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .app-card {
        padding: 35px 30px;
    }
    
    .header {
        padding: 80px 20px 60px;
        margin-bottom: 60px;
    }
    
    .cta-card {
        padding: 50px 30px;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2.25rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .app-card {
        padding: 30px 25px;
    }
    
    .header {
        padding: 60px 15px 50px;
    }
    
    .cta-card {
        padding: 40px 25px;
        border-radius: 24px;
    }
    
    .cta-title {
        font-size: 1.75rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Touch-friendly */
@media (hover: none) and (pointer: coarse) {
    .app-card:active {
        transform: translateY(-4px);
    }
}
