@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-main: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    --bg: #05070f;
    --bg-soft: #0c1220;
    --surface: rgba(16, 24, 42, 0.78);
    --surface-strong: #151f35;
    --surface-alt: #101a30;
    --text: #f8fbff;
    --text-muted: #a6b3cf;
    --line: rgba(152, 176, 224, 0.2);
    --primary: #684BD8;
    --primary-rgb: 104, 75, 216;
    --primary-2: #F85045;
    --primary-2-rgb: 248, 80, 69;
    --success: #32d583;
    --shadow: 0 20px 45px rgba(2, 8, 20, 0.45);
    --radius-xl: 22px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 10px;
    --transition: 0.24s ease;
    --color-card: var(--surface-strong);
    --color-border: var(--line);
    --color-bg: var(--bg-soft);
    --color-primary: var(--primary);
    --color-primary-hover: #7b63e0;
    --color-text: var(--text);
    --shadow-lg: var(--shadow);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

html {
    font-size: 16px;
}

body {
    position: relative;
    font-family: var(--font-main);
    color: var(--text);
    background:
        radial-gradient(900px 520px at 86% -18%, rgba(var(--primary-2-rgb), 0.24) 0%, rgba(var(--primary-2-rgb), 0) 56%),
        radial-gradient(760px 460px at 8% 0%, rgba(var(--primary-rgb), 0.22) 0%, rgba(var(--primary-rgb), 0) 58%),
        linear-gradient(150deg, #04060d 0%, #070d18 50%, #090f1d 100%);
    line-height: 1.7;
    overflow-x: hidden;
}

.bg-orb {
    position: fixed;
    border-radius: 999px;
    filter: blur(75px);
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}

.orb-one {
    width: 420px;
    height: 420px;
    top: -170px;
    right: -120px;
    background: var(--primary-2);
}

.orb-two {
    width: 380px;
    height: 380px;
    bottom: -160px;
    left: -120px;
    background: var(--primary);
}

.main,
.footer {
    position: relative;
    z-index: 1;
}

.header {
    position: relative;
    z-index: 1;
    border-bottom: 1px solid rgba(129, 156, 216, 0.2);
    background: rgba(9, 15, 28, 0.88);
    backdrop-filter: blur(8px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    min-height: 72px;
}

.main {
    padding: 2.25rem 0 1rem;
}

.container {
    width: min(1120px, 100% - 2rem);
    margin: 0 auto;
}

.hero-card {
    margin-bottom: 1.5rem;
    padding: 1.6rem 1.7rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(130deg, rgba(28, 42, 74, 0.92) 0%, rgba(17, 25, 45, 0.9) 100%);
    border: 1px solid rgba(121, 149, 211, 0.28);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.hero-kicker {
    margin: 0 0 0.55rem;
    color: #ff9d96;
    letter-spacing: 0.3px;
    font-size: 0.95rem;
}

.hero-title {
    margin: 0;
    font-size: clamp(1.55rem, 2.2vw, 2rem);
    line-height: 1.4;
}

.hero-subtitle {
    margin: 0.75rem 0 0;
    color: var(--text-muted);
    font-size: 0.96rem;
}

.tabs-wrapper {
    margin-bottom: 1.1rem;
}

.tabs-nav {
    display: flex;
    gap: 0.75rem;
    overflow: visible;
    padding: 0.15rem 0.15rem 0.7rem;
    width: 100%;
}

.tab-btn {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border: 1px solid rgba(129, 156, 216, 0.28);
    border-radius: 999px;
    padding: 0.62rem 1.02rem;
    background: rgba(17, 26, 44, 0.75);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition), color var(--transition), background var(--transition), box-shadow var(--transition);
}

.tab-btn:hover {
    color: #dce9ff;
    border-color: rgba(var(--primary-2-rgb), 0.6);
    transform: translateY(-1px);
}

.tab-btn.active {
    color: #ffffff;
    border-color: rgba(var(--primary-2-rgb), 0.72);
    background: linear-gradient(120deg, rgba(var(--primary-rgb), 0.88), rgba(var(--primary-2-rgb), 0.78));
    box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.3);
}

.tab-label {
    white-space: nowrap;
}

.tab-panel {
    display: none;
    animation: fadeUp 0.28s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(18, 27, 48, 0.9) 0%, rgba(12, 19, 34, 0.9) 100%);
    border: 1px solid rgba(129, 156, 216, 0.2);
    padding: 1.15rem;
    margin-bottom: 0.95rem;
    box-shadow: var(--shadow);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 1rem;
    font-size: 1.06rem;
    font-weight: 400;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.platform-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    border-radius: var(--radius-md);
    border: 1px solid rgba(129, 156, 216, 0.22);
    background: linear-gradient(150deg, rgba(22, 33, 58, 0.92), rgba(13, 22, 39, 0.92));
    color: var(--text);
    padding: 0.85rem 0.85rem;
    min-height: 76px;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.platform-item:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--primary-2-rgb), 0.75);
    box-shadow: 0 14px 28px rgba(19, 34, 67, 0.55);
    background: linear-gradient(150deg, rgba(51, 37, 92, 0.96), rgba(68, 23, 43, 0.94));
}

.platform-icon-wrap {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(48, 70, 116, 0.66);
    border: 1px solid rgba(136, 167, 232, 0.36);
    flex-shrink: 0;
}

.platform-meta {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
    flex: 1;
}

.platform-name {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.platform-hint {
    color: #89a0d1;
    font-size: 0.79rem;
}

.platform-arrow {
    width: 18px;
    opacity: 0.9;
    flex-shrink: 0;
}

.files-list {
    display: grid;
    gap: 0.65rem;
}

.file-item-wrapper {
    display: flex;
    align-items: stretch;
    gap: 0.45rem;
}

.file-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-md);
    border: 1px solid rgba(129, 156, 216, 0.24);
    background: var(--surface-alt);
    padding: 0.78rem;
    transition: border-color var(--transition), background var(--transition);
}

.file-item:hover {
    border-color: rgba(var(--primary-2-rgb), 0.72);
    background: rgba(40, 27, 68, 0.94);
}

.file-info {
    display: grid;
    gap: 0.1rem;
    flex: 1;
    min-width: 0;
}

.file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-desc {
    color: #8ea1cc;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-download-icon {
    width: 18px;
    opacity: 0.9;
}

.btn-copy {
    width: 44px;
    border-radius: 12px;
    border: 1px solid rgba(129, 156, 216, 0.3);
    background: rgba(18, 31, 55, 0.95);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

.btn-copy:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--primary-rgb), 0.85);
    background: rgba(44, 31, 76, 0.95);
}

.tutorial-content {
    color: #d4def4;
    white-space: pre-line;
}

.tips-card {
    margin-top: 0.4rem;
}

.tips-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.7rem;
}

.tips-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    border-radius: var(--radius-sm);
    background: rgba(21, 34, 59, 0.66);
    border: 1px solid rgba(129, 156, 216, 0.16);
    padding: 0.6rem 0.72rem;
}

.tip-icon {
    width: 17px;
    margin-top: 0.2rem;
    flex-shrink: 0;
    filter: saturate(1.15);
}

.footer {
    margin-top: auto;
    padding: 0.7rem 0 1.5rem;
}

.footer p {
    margin: 0;
    text-align: center;
    color: #90a3ce;
    font-size: 0.85rem;
}

.footer a {
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.footer a:hover {
    color: #ff9d96;
    border-bottom-color: #ff9d96;
}

.icon-svg {
    width: 20px;
    height: 20px;
    display: block;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.icon-svg-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    filter: none;
    color: #ffffff;
}

.icon-svg-inline svg {
    width: 100%;
    height: 100%;
    display: block;
}

.icon-svg-inline svg * {
    fill: currentColor;
    stroke: currentColor;
}

.tab-icon {
    width: 18px;
    height: 18px;
}

.platform-icon {
    width: 21px;
    height: 21px;
}

.file-icon,
.card-icon,
.copy-icon {
    width: 20px;
    height: 20px;
}

.toast-container {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1.15rem;
    display: grid;
    gap: 0.55rem;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    padding: 0.8rem 0.92rem;
    border-radius: 11px;
    font-size: 0.88rem;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(17, 26, 44, 0.95);
    box-shadow: var(--shadow);
    animation: toastIn 0.26s ease;
    pointer-events: auto;
}

.toast.success {
    background: rgba(30, 92, 66, 0.95);
}

.toast.warning {
    background: rgba(107, 75, 30, 0.95);
}

.empty-state p {
    margin: 0;
    color: var(--text-muted);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 860px) {
    .platform-grid {
        grid-template-columns: 1fr;
    }

    .hero-card {
        padding: 1.4rem;
    }
}

@media (max-width: 640px) {
    .main {
        padding-top: 1.2rem;
    }

    .container {
        width: min(1120px, 100% - 1.2rem);
    }

    .hero-title {
        font-size: 1.36rem;
    }

    .tab-btn {
        padding: 0.55rem 0.86rem;
        font-size: 0.82rem;
        gap: 0.35rem;
    }

    .card {
        padding: 0.92rem;
    }

    .platform-item {
        min-height: 68px;
    }

    .toast-container {
        left: 0.65rem;
        right: 0.65rem;
    }
}

@media (min-width: 641px) {
    .toast-container {
        right: auto;
        width: min(360px, calc(100vw - 2rem));
    }
}
