:root {
    --bg-base: #0f172a;
    --bg-surface: rgba(30, 41, 59, 0.7);
    --bg-surface-hover: rgba(30, 41, 59, 0.9);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-glow: rgba(56, 189, 248, 0.15);
    --accent-primary: #38bdf8;
    --accent-primary-hover: #0ea5e9;
    --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background Effects */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 50% 50%, var(--accent-glow) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(129, 140, 248, 0.1) 0%, transparent 40%);
    z-index: -1;
    animation: pulse 15s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(-2%, 2%); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
}

.logo-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    background: white;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeUp 0.8s ease-out forwards;
}

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

.hero-subtitle {
    font-size: clamp(1.125rem, 4vw, 1.5rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

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

/* Apps Section */
.apps-section {
    padding: 40px 0 100px;
    flex-grow: 1;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 48px;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 25%;
    width: 50%;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 4px;
}

/* Glassmorphic Cards */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

.app-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    animation: fadeUp 0.5s ease-out forwards;
    opacity: 0;
}

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

.app-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
}

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

.app-title-group h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.app-price {
    font-size: 0.875rem;
    color: var(--accent-primary);
    font-weight: 500;
    background: rgba(56, 189, 248, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

a.app-price:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}

.app-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.screenshots-preview {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-base);
}

.screenshots-preview::-webkit-scrollbar {
    height: 4px;
}
.screenshots-preview::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}
.screenshots-preview::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

.screenshot-thumb {
    height: 140px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: var(--transition);
}

.screenshot-thumb:hover {
    transform: scale(1.03);
    border-color: var(--accent-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-family: var(--font-heading);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    width: 100%;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255,255,255,0.3);
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-backdrop.show {
    opacity: 1;
}

.modal {
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.show .modal {
    transform: translateY(0) scale(1);
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}

.close-modal:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.modal-content {
    padding: 40px;
}

.modal-full-desc {
    color: var(--text-secondary);
    white-space: pre-line;
    margin: 24px 0;
}

/* States */
.loading-state, .error-state {
    text-align: center;
    padding: 60px 0;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 40px 0;
    background: rgba(15, 23, 42, 0.9);
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-nav a:hover {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .hero { padding: 80px 0 60px; }
    .apps-grid { grid-template-columns: 1fr; }
    .modal-content { padding: 24px; }
    .footer-content { flex-direction: column; text-align: center; }
}
