:root {
    /* Color Palette - Premium Dark Theme */
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #020617 100%);
    --card-bg: rgba(30, 41, 59, 0.6);
    --card-hover: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;

    /* Brand Colors */
    --primary: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.3);

    /* Spacing */
    --container-width: 1000px;
    /* Slightly narrower for list view readability */
}

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Layout & Container --- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* --- Header & Nav --- */
.site-header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 0 10px;
    flex-wrap: nowrap;
    /* Prevent wrapping on desktop */
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    /* Prevent brand from shrinking */
    text-decoration: none;
}

.brand-logo {
    height: 100px;
    /* Balanced size (80px was too tall for header) */
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    /* Add depth to the PNG */
    /* Removed border and radius for clean transparent PNG look */
}

.brand-text {
    font-size: 32px;
    /* Large and bold for short name */
    font-weight: 900;
    letter-spacing: 1px;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    white-space: nowrap;
    /* Prevent text wrapping */
}

/* Header Search */
.header-search {
    flex: 1;
    max-width: 400px;
    position: relative;
    margin: 0 20px;
}

.header-search input {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    padding: 8px 15px 8px 40px;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.header-search input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary);
}

.header-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.nav-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.glass-select {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

.glass-select option {
    background: #1e293b;
}

/* --- Category Headers --- */
.category-header {
    margin-top: 40px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}

/* --- Premium List Layout (Horizontal Cards) --- */
.dashboard-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.app-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    /* Vertical Center */
    gap: 20px;
    transition: all 0.2s;
}

.app-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(30, 41, 59, 0.8);
}

.app-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Icon default styling */
    color: #fff;
}

.app-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 4px 0;
}

.app-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Right-aligned Actions */
.card-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-card {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

.btn-buy {
    background: var(--primary);
    color: #0f172a;
    border: 1px solid var(--primary);
    font-weight: 600;
}

.btn-buy:hover {
    background: #7dd3fc;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
    transform: translateY(-1px);
}

/* --- Documentation Page Styles (Legacy Support) --- */
.doc-content {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 40px;
    margin-top: 30px;
}

.step-num {
    background: var(--primary);
    color: black;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-block;
    text-align: center;
    margin-right: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th,
td {
    border-bottom: 1px solid var(--glass-border);
    padding: 12px;
    text-align: left;
}

th {
    color: var(--text-muted);
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 12px;
    border-top: 1px solid var(--glass-border);
    margin-top: 60px;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .brand-text {
        display: none;
        /* Hide long text on tablet/mobile */
    }

    .header-search {
        max-width: none;
        /* Search takes available space */
    }
}

@media (max-width: 768px) {
    .brand-logo {
        height: 48px;
        /* Smaller logo on mobile */
    }

    .app-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .app-icon {
        width: 48px;
        height: 48px;
    }

    .card-actions {
        width: 100%;
    }

    .btn-card {
        flex: 1;
    }

    .header-inner {
        flex-wrap: wrap;
    }

    .header-search {
        order: 3;
        min-width: 100%;
        margin: 10px 0 0 0;
    }
}