
/* =========================================
   WSI HUB - THEME VARIABLES
========================================= */

:root {
    --primary: #2ec5f4;
    --primary-hover: #18b5e5;
    --primary-soft: rgba(46, 197, 244, 0.10);

    --bg: #101113;
    --surface: rgba(25, 28, 32, 0.75);
    --surface-hover: rgba(35, 39, 44, 0.90);

    --text: #f5f6f7;
    --text-secondary: #a0a4ab;
    --text-muted: #717780;

    --border: rgba(255, 255, 255, 0.10);
    --header-bg: rgba(16, 17, 19, 0.75);
    --input-bg: rgba(25, 28, 32, 0.85);

    --shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    --glow: 0 8px 35px rgba(46, 197, 244, 0.08);

    --radius: 14px;
    --transition: 0.25s ease;
    --max-width: 1200px;

    color-scheme: dark;
}


/* =========================================
   LIGHT THEME
========================================= */

html[data-theme="light"] {
    --bg: #f4f7f9;
    --surface: rgba(255, 255, 255, 0.80);
    --surface-hover: rgba(255, 255, 255, 0.98);

    --text: #16191d;
    --text-secondary: #686b6d;
    --text-muted: #858b91;

    --border: rgba(0, 0, 0, 0.09);
    --header-bg: rgba(244, 247, 249, 0.80);
    --input-bg: rgba(255, 255, 255, 0.90);

    --primary-soft: rgba(46, 197, 244, 0.12);

    --shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    --glow: 0 8px 35px rgba(46, 197, 244, 0.12);

    color-scheme: light;
}


/* =========================================
   GLOBAL RESET
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);

    font-family: "Poppins", sans-serif;
    font-size: 14px;
    line-height: 1.6;

    overflow-x: hidden;

    transition:
        background var(--transition),
        color var(--transition);
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

[hidden] {
    display: none !important;
}

::selection {
    background: var(--primary);
    color: #000;
}


/* =========================================
   INTERACTIVE PARTICLE BACKGROUND
========================================= */

#particleCanvas {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    z-index: 0;
    pointer-events: none;

    background: transparent;
}


/* =========================================
   PAGE WRAPPER
========================================= */

.page-wrapper {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;

    min-height: 100vh;
}


/* =========================================
   HEADER
========================================= */

.header {
    position: sticky;
    top: 0;
    z-index: 100;

    width: 100%;

    background: var(--header-bg);
    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.header-container {
    max-width: var(--max-width);
    min-height: 80px;

    margin: 0 auto;
    padding: 16px 32px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* =========================================
   BRAND / LOGO
========================================= */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    display: block;

    width: auto;
    height: 42px;
    max-width: 150px;

    object-fit: contain;

    background: transparent;
    border: none;
    box-shadow: none;
}

.brand-divider {
    width: 1px;
    height: 34px;

    background: var(--border);
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-name {
    font-size: 21px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 4px;
}

.brand-caption {
    margin-top: 3px;

    color: var(--text-muted);

    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.4px;
}


/* =========================================
   HEADER ACTIONS
========================================= */

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    background: var(--surface);
    color: var(--text-secondary);

    border: 1px solid var(--border);
    border-radius: 10px;

    font-size: 16px;

    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary);
    background: var(--primary-soft);
    border-color: var(--primary);

    transform: translateY(-2px);
}

.theme-toggle:active {
    transform: scale(0.95);
}


/* =========================================
   MAIN CONTENT
========================================= */

.main-content {
    flex: 1;

    width: 100%;
    max-width: var(--max-width);

    margin: 0 auto;
    padding: 0 32px 70px;
}


/* =========================================
   HERO SECTION
========================================= */

.hero {
    position: relative;

    padding: 90px 0 65px;

    text-align: center;

    animation: fadeUp 0.7s ease both;
}

.hero-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    margin-bottom: 22px;

    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3px;
}

.hero-line {
    display: inline-block;

    width: 28px;
    height: 1px;

    background: var(--primary);
    opacity: 0.7;
}

.hero h1 {
    margin-bottom: 20px;

    font-size: clamp(36px, 5vw, 62px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -2.5px;
}

.hero h1 span {
    color: var(--primary);
}

.hero-description {
    max-width: 580px;

    margin: 0 auto;

    color: var(--text-secondary);

    font-size: 14px;
    font-weight: 400;
    line-height: 1.9;
}


/* =========================================
   SEARCH BAR
========================================= */

.search-container {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;
    max-width: 480px;

    margin: 32px auto 0;

    background: var(--input-bg);

    border: 1px solid var(--border);
    border-radius: 12px;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    transition: var(--transition);
}

.search-container:focus-within {
    border-color: var(--primary);

    box-shadow:
        0 0 0 4px var(--primary-soft);
}

.search-icon {
    position: absolute;
    left: 19px;

    color: var(--text-muted);

    font-size: 15px;
    pointer-events: none;
}

.search-container:focus-within .search-icon {
    color: var(--primary);
}

#searchInput {
    width: 100%;
    height: 54px;

    padding: 0 48px;

    background: transparent;
    color: var(--text);

    border: none;
    outline: none;

    font-size: 13px;
}

#searchInput::placeholder {
    color: var(--text-muted);
}

#searchInput::-webkit-search-cancel-button {
    display: none;
}

#searchInput:focus-visible {
    outline: none;
}

.clear-search {
    position: absolute;
    right: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;

    background: transparent;
    color: var(--text-muted);

    border: none;
    border-radius: 6px;

    transition: var(--transition);
}

.clear-search:hover {
    color: var(--text);
    background: var(--primary-soft);
}


/* =========================================
   APPLICATIONS SECTION
========================================= */

.applications-section {
    animation: fadeUp 0.7s 0.15s ease both;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 24px;
}

.section-heading h2 {
    margin-bottom: 5px;

    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.section-heading p {
    color: var(--text-muted);
    font-size: 12px;
}

.application-count {
    display: flex;
    align-items: center;
    gap: 6px;

    color: var(--text-muted);

    font-size: 11px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

#applicationCount {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
}


/* =========================================
   CATEGORY FILTERS
========================================= */

.category-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;

    margin-bottom: 26px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 9px 17px;

    background: var(--surface);
    color: var(--text-secondary);

    border: 1px solid var(--border);
    border-radius: 8px;

    font-size: 11px;
    font-weight: 500;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transition: var(--transition);
}

.filter-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.filter-btn.active {
    background: var(--primary-soft);
    color: var(--primary);

    border-color: rgba(46, 197, 244, 0.40);
}


/* =========================================
   APPLICATION GRID
========================================= */

.applications-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}


/* =========================================
   APPLICATION CARD
========================================= */

.app-card {
    position: relative;

    display: flex;
    flex-direction: column;

    min-height: 220px;

    padding: 24px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    box-shadow: var(--shadow);

    overflow: hidden;
    cursor: pointer;

    transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}

.app-card::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    height: 2px;

    background: linear-gradient(
        90deg,
        transparent,
        var(--primary),
        transparent
    );

    opacity: 0;

    transition: opacity var(--transition);
}

.app-card:not(.unavailable):hover {
    transform: translateY(-6px);

    background: var(--surface-hover);
    border-color: rgba(46, 197, 244, 0.55);

    box-shadow: var(--glow);
}

.app-card:not(.unavailable):hover::before {
    opacity: 1;
}

.app-card:not(.unavailable):active {
    transform: translateY(-2px);
}


/* =========================================
   CARD TOP
========================================= */

.app-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    margin-bottom: 22px;
}

.app-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;

    background: var(--primary-soft);
    color: var(--primary);

    border: 1px solid rgba(46, 197, 244, 0.12);
    border-radius: 12px;

    font-size: 22px;

    transition: var(--transition);
}

.app-card:not(.unavailable):hover .app-icon {
    background: var(--primary);
    color: #101113;

    transform: scale(1.06);
}

.app-arrow {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    color: var(--text-muted);

    font-size: 13px;

    transition: var(--transition);
}

.app-card:not(.unavailable):hover .app-arrow {
    color: var(--primary);

    transform: translate(2px, -2px);
}


/* =========================================
   CARD CONTENT
========================================= */

.app-card-content {
    flex: 1;
}

.app-card-content h3 {
    margin-bottom: 7px;

    color: var(--text);

    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.app-card-content p {
    color: var(--text-secondary);

    font-size: 12px;
    font-weight: 400;
    line-height: 1.8;
}


/* =========================================
   CARD FOOTER
========================================= */

.app-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    margin-top: 22px;
    padding-top: 16px;

    border-top: 1px solid var(--border);
}

.app-category {
    color: var(--text-muted);

    font-size: 10px;
    font-weight: 500;
}

.app-launch {
    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--primary);

    font-size: 11px;
    font-weight: 500;
}

.app-launch i {
    font-size: 10px;

    transition: transform var(--transition);
}

.app-card:hover .app-launch i {
    transform: translateX(3px);
}


/* =========================================
   UNAVAILABLE APPLICATION
========================================= */

.app-card.unavailable {
    cursor: not-allowed;
}

.app-card.unavailable .app-icon {
    opacity: 0.65;
}

.app-unavailable {
    color: var(--text-muted);

    font-size: 10px;
    font-weight: 400;
}


/* =========================================
   EMPTY SEARCH STATE
========================================= */

.empty-state {
    padding: 65px 20px;

    text-align: center;
}

.empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 72px;
    height: 72px;

    margin: 0 auto 20px;

    background: var(--primary-soft);
    color: var(--primary);

    border-radius: 20px;

    font-size: 28px;
}

.empty-state h3 {
    margin-bottom: 8px;

    font-size: 18px;
    font-weight: 500;
}

.empty-state p {
    margin-bottom: 22px;

    color: var(--text-secondary);

    font-size: 13px;
}

.reset-btn {
    padding: 11px 20px;

    background: var(--primary);
    color: #101113;

    border: none;
    border-radius: 8px;

    font-size: 12px;
    font-weight: 600;

    transition: var(--transition);
}

.reset-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}


/* =========================================
   FOOTER
========================================= */

.footer {
    width: 100%;

    background: var(--header-bg);

    border-top: 1px solid var(--border);

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    max-width: var(--max-width);

    margin: 0 auto;
    padding: 22px 32px;
}

.footer-copyright,
.footer-credit {
    color: var(--text-muted);

    font-size: 11px;
    font-weight: 400;
}

.footer-divider {
    margin: 0 5px;
    opacity: 0.5;
}

.footer-credit {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-credit i {
    color: var(--primary);
}


/* =========================================
   ANIMATIONS
========================================= */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================
   CUSTOM SCROLLBAR
========================================= */

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}


/* =========================================
   RESPONSIVE - TABLET
========================================= */

@media (max-width: 900px) {

    .applications-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .hero {
        padding: 75px 0 55px;
    }

    .hero h1 {
        font-size: 48px;
    }

    .main-content {
        padding: 0 25px 50px;
    }

    .header-container,
    .footer-container {
        padding-left: 25px;
        padding-right: 25px;
    }

}


/* =========================================
   RESPONSIVE - MOBILE
========================================= */

@media (max-width: 600px) {

    .header-container {
        min-height: 68px;
        padding: 12px 18px;
    }

    .brand {
        gap: 10px;
    }

    .brand-logo {
        height: 32px;
        max-width: 110px;
    }

    .brand-divider {
        height: 28px;
    }

    .brand-name {
        font-size: 17px;
        letter-spacing: 3px;
    }

    .brand-caption {
        font-size: 9px;
    }

    .theme-toggle {
        width: 37px;
        height: 37px;

        font-size: 14px;
    }

    .main-content {
        padding: 0 18px 40px;
    }

    .hero {
        padding: 55px 0 42px;
    }

    .hero-label {
        gap: 8px;

        margin-bottom: 18px;

        font-size: 9px;
        letter-spacing: 2px;
    }

    .hero-line {
        width: 15px;
    }

    .hero h1 {
        margin-bottom: 16px;

        font-size: 36px;
        letter-spacing: -1.5px;
    }

    .hero-description {
        font-size: 12px;
        line-height: 1.8;
    }

    .search-container {
        margin-top: 25px;
    }

    #searchInput {
        height: 49px;
        font-size: 12px;
    }

    .section-header {
        align-items: flex-start;
        margin-bottom: 18px;
    }

    .section-heading h2 {
        font-size: 19px;
    }

    .section-heading p {
        font-size: 11px;
    }

    .application-count {
        margin-top: 5px;
        font-size: 10px;
    }

    .category-filters {
        gap: 7px;
        margin-bottom: 18px;
    }

    .filter-btn {
        padding: 7px 11px;
        font-size: 10px;
    }

    .applications-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .app-card {
        min-height: 205px;
        padding: 16px;
        border-radius: 12px;
    }

    .app-card-top {
        margin-bottom: 16px;
    }

    .app-icon {
        width: 43px;
        height: 43px;

        font-size: 18px;
        border-radius: 10px;
    }

    .app-arrow {
        width: 22px;
        height: 22px;

        font-size: 11px;
    }

    .app-card-content h3 {
        font-size: 13px;
    }

    .app-card-content p {
        font-size: 11px;
        line-height: 1.6;
    }

    .app-card-footer {
        flex-wrap: wrap;

        margin-top: 16px;
        padding-top: 12px;
    }

    .app-category,
    .app-launch,
    .app-unavailable {
        font-size: 9px;
    }

    .footer-container {
        flex-direction: column;
        justify-content: center;
        gap: 8px;

        padding: 20px 15px;

        text-align: center;
    }

    .footer-copyright,
    .footer-credit {
        font-size: 10px;
    }

}


/* =========================================
   RESPONSIVE - SMALL MOBILE
========================================= */

@media (max-width: 360px) {

    .applications-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 30px;
    }

    .app-card {
        min-height: 185px;
    }

    .brand-caption {
        display: none;
    }

}


/* =========================================
   REDUCED MOTION ACCESSIBILITY
========================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

}
