@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --accent: #0066cc;
    --accent-hover: #0077ed;
    --card-border: rgba(0, 0, 0, 0.05);
    --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 5%;
    background: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-img {
    height: 60px;
    width: auto;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.3px;
}


.auth-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid #d2d2d7;
}

.btn-ghost:hover {
    background: #f5f5f7;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    display: none;
    position: relative;
    cursor: pointer;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    padding: 8px 0;
    min-width: 200px;
    display: none;
    flex-direction: column;
    z-index: 200;
}

.profile-dropdown.show {
    display: flex;
}

.dropdown-item {
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    border: none;
    background: transparent;
    text-align: left;
    width: 100%;
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--bg-primary);
}

.dropdown-item.danger {
    color: #e74c3c;
}


.hero {
    text-align: center;
    padding: 80px 20px 60px;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
    color: #1d1d1f;
}

.hero p {
    font-size: 21px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
    letter-spacing: -0.2px;
}


.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 20px 80px;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.software-card {
    background: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    padding: 32px;
    box-shadow: var(--shadow-subtle);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.software-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.software-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    margin-bottom: 24px;
    object-fit: contain;
}

.software-title {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.software-desc {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 24px;
    flex-grow: 1;
}

.software-meta {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    align-items: center;
    margin-bottom: 24px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.meta-tag {
    background: var(--bg-primary);
    padding: 4px 12px;
    border-radius: 12px;
}

.software-card .btn {
    text-align: center;
    width: 100%;
}


.footer {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    color: var(--text-secondary);
    font-size: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    margin-top: auto;
}

.footer a {
    color: var(--text-primary);
    text-decoration: none;
}

#vanta-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.footer a:hover {
    text-decoration: underline;
}

app-footer {
    margin-top: auto;
    width: 100%;
}


.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e5e5;
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s ease-in-out infinite;
}

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


.error-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.error-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
}

.error-content h1 {
    font-size: 120px;
    font-weight: 700;
    letter-spacing: -4px;
    color: #d2d2d7;
    margin-bottom: 0;
    line-height: 1;
}

.error-content h2 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
    margin-top: 10px;
}

.error-content p {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 32px;
}

/* Main Navigation */
.main-nav {
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 0 20px;
    position: relative;
}

.nav-indicator {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(0, 102, 204, 0.15); /* var(--accent) with opacity */
    border-radius: 20px;
    z-index: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1.2), width 0.4s cubic-bezier(0.4, 0, 0.2, 1.2), height 0.4s cubic-bezier(0.4, 0, 0.2, 1.2);
    pointer-events: none;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
    padding: 8px 16px;
    border-radius: 8px;
    position: relative;
    z-index: 1;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--accent);
    background: transparent !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
        padding: 16px 20px;
        text-align: left;
    }
    .main-nav {
        position: fixed;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%);
        width: max-content;
        min-width: 250px;
        background: rgba(255, 255, 255, 0.65);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        border: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
        border-radius: 40px;
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 10px 20px;
        z-index: 1000;
        margin: 0 !important;
    }
    .main-nav a {
        font-size: 14px;
        padding: 8px 16px;
        background: transparent !important;
    }
    .footer {
        padding-bottom: 90px;
    }
    .auth-section {
        flex-direction: row;
        width: auto;
        gap: 10px;
    }
    .hero {
        padding: 40px 20px 30px;
    }
    .hero h1 {
        font-size: 36px;
    }
    .hero p {
        font-size: 16px;
    }
    .software-grid {
        grid-template-columns: 1fr;
    }
    .software-card {
        padding: 24px;
    }
    .error-content h1 {
        font-size: 80px;
    }
    .error-content h2 {
        font-size: 24px;
    }
}