:root {
    --bg-primary: #0A0A0F;
    --bg-secondary: rgba(20, 20, 32, 0.95);
    --bg-card: rgba(26, 26, 46, 0.4);
    --accent-primary: #6366F1;
    --accent-secondary: #8B5CF6;
    --accent-gradient: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0B8;
    --border-color: rgba(99, 102, 241, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* Header */
.site-header {
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 24px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.site-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.5));
    display: block;
    margin: 0 auto;
}

.site-header h1 {
    font-size: 40px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    letter-spacing: -0.5px;
    width: 100%;
    display: block;
    margin: 0 auto;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 60px 0;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 0;
}

.hero h2 {
    font-size: 64px;
    font-weight: 900;
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1.5px;
    line-height: 1.1;
    text-align: center;
}

.hero p {
    font-size: 24px;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.category-card {
    background: var(--bg-card);
    backdrop-filter: blur(40px);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    padding: 32px;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

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

.category-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.25);
}

.category-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 28px;
    transition: transform 0.4s ease;
    box-shadow: var(--shadow-md);
}

.category-card:hover img {
    transform: scale(1.05);
}

.category-card .no-image {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 20px;
    font-weight: 600;
}

.category-card h3 {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 16px;
    color: var(--text-primary);
    text-align: center;
    letter-spacing: -0.5px;
    width: 100%;
    display: block;
}

.category-card p {
    color: var(--text-secondary);
    font-size: 18px;
    text-align: center;
    line-height: 1.8;
    width: 100%;
    display: block;
}

.pin-badge {
    font-size: 14px !important;
    color: var(--accent-primary) !important;
    margin-top: 12px !important;
    font-weight: 600 !important;
}

/* Category Header */
.category-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    background: var(--bg-card);
    backdrop-filter: blur(40px);
    border: 2px solid var(--border-color);
    border-radius: 28px;
    padding: 56px;
    margin-bottom: 60px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.category-logo {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

.category-info {
    text-align: center;
    max-width: 700px;
}

.category-info h2 {
    font-size: 56px;
    font-weight: 900;
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    text-align: center;
}

.category-info p {
    font-size: 22px;
    color: var(--text-secondary);
    line-height: 1.8;
    text-align: center;
}

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

.app-card {
    background: var(--bg-card);
    backdrop-filter: blur(40px);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    padding: 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

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

.app-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.2);
}

.app-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 24px;
    transition: transform 0.4s ease;
    box-shadow: var(--shadow-md);
}

.app-card:hover img {
    transform: scale(1.05);
}

.app-card .no-image {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-weight: 600;
    font-size: 18px;
}

.app-card h3 {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 14px;
    text-align: center;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    width: 100%;
    display: block;
}

.app-card p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 16px;
    text-align: center;
    line-height: 1.8;
    width: 100%;
    display: block;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px 32px;
    background: var(--accent-gradient);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 16px;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    text-align: center;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.6);
}

.download-btn:active {
    transform: translateY(0);
}

/* No Apps Message */
.no-apps {
    text-align: center;
    padding: 100px 40px;
    background: var(--bg-card);
    backdrop-filter: blur(40px);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
}

.no-apps p {
    font-size: 22px;
    color: var(--text-secondary);
    text-align: center;
}

/* PIN Form */
.pin-form {
    max-width: 500px;
    margin: 120px auto;
    background: var(--bg-card);
    backdrop-filter: blur(40px);
    border: 2px solid var(--border-color);
    border-radius: 28px;
    padding: 64px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.pin-form h2 {
    font-size: 40px;
    font-weight: 900;
    margin-bottom: 32px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.pin-form input {
    width: 100%;
    padding: 20px;
    background: rgba(20, 20, 32, 0.9);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 20px;
    margin-bottom: 32px;
    text-align: center;
    transition: all 0.3s ease;
}

.pin-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.pin-form button {
    width: 100%;
    padding: 20px 36px;
    background: var(--accent-gradient);
    color: var(--text-primary);
    border: none;
    border-radius: 16px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.pin-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.6);
}

.error-message {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid rgba(239, 68, 68, 0.4);
    color: #FCA5A5;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 32px;
    font-weight: 600;
    text-align: center;
}

/* Footer */
.site-footer {
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 100px;
}

.site-footer p {
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
}

/* Back Button */
.back-btn {
    display: inline-block;
    margin-bottom: 36px;
    padding: 16px 32px;
    background: var(--bg-card);
    backdrop-filter: blur(40px);
    color: var(--accent-primary);
    text-decoration: none;
    border-radius: 16px;
    border: 2px solid var(--border-color);
    transition: all 0.3s;
    font-weight: 700;
    font-size: 16px;
}

.back-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: var(--accent-primary);
    transform: translateX(-6px);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 42px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .categories-grid,
    .apps-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    
    .category-header {
        padding: 40px 32px;
    }
    
    .category-info h2 {
        font-size: 38px;
    }
    
    .site-header h1 {
        font-size: 30px;
    }
    
    .category-card h3 {
        font-size: 26px;
    }
    
    .app-card h3 {
        font-size: 24px;
    }
}

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

.category-card,
.app-card {
    animation: fadeInUp 0.6s ease-out;
}