:root {
    --primary-color: #2563eb;
    --secondary-color: #fbbf24;
    --bg-dark: #0f172a;
    --surface-dark: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

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

header h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.brand-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 15px rgba(37, 99, 235, 0.3));
}

/* App Grid */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    justify-items: center;
}

.app-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.app-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-color);
}

.app-icon {
    width: 120px;
    height: 120px;
    background: var(--surface-dark);
    border-radius: 1.2rem;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.app-icon img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.app-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Form Styles */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--glass-bg);
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid var(--glass-border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--surface-dark);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: white;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary-color);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.submit-btn:hover {
    opacity: 0.9;
}

/* Utilities */
.hidden {
    display: none;
}

/* Scroll to Top Button */
#scrollToTopBtn {
    position: fixed;
    bottom: 3rem;
    right: 2rem;
    z-index: 99;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 2.8rem;
    height: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.3s ease, background 0.3s;
}

#scrollToTopBtn svg {
    width: 1.25rem;
    height: 1.25rem;
}

#scrollToTopBtn.show {
    opacity: 1;
    pointer-events: auto;
    animation: softPulse 2.5s infinite;
}

#scrollToTopBtn:hover {
    transform: translateY(-5px) scale(1.05);
    animation: none;
    /* Pause pulse to focus on hover */
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.8), 0 0 20px var(--secondary-color);
}

@keyframes softPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 99, 235, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

/* ─── Responsive / Mobile ─── */
html,
body {
    overflow-x: hidden;
}

.container {
    width: 100%;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    .brand-logo {
        width: 80px;
        height: 80px;
    }

    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.6rem;
    }

    .app-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .app-card {
        padding: 1rem;
    }

    .app-icon {
        width: 80px;
        height: 80px;
    }

    .app-name {
        font-size: 0.9rem;
    }
}