/* ==================== ROOT VARIABLES ==================== */
:root {
    --bg-primary: #0B1730;
    --bg-secondary: #071226;
    --bg-tertiary: #050C18;
    --bg-panel: rgba(255, 255, 255, 0.05);
    --bg-panel-hover: rgba(255, 255, 255, 0.08);
    --bg-panel-active: rgba(255, 255, 255, 0.12);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-muted: rgba(255, 255, 255, 0.55);
    --accent-blue: #2563EB;
    --accent-cyan: #38BDF8;
    --accent-purple: #7C3AED;
    --accent-green: #16A34A;
    --accent-red: #EF4444;
    --accent-orange: #F59E0B;
    --accent-pink: #EC4899;
    --accent-yellow: #EAB308;
    --gradient-blue: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
    --gradient-header: linear-gradient(90deg, #3B82F6 0%, #2B66E8 35%, #1E40AF 100%);
    --gradient-hero-icon: linear-gradient(180deg, #38BDF8 0%, #2563EB 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.35);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --transition: all 0.3s ease;
}

/* ==================== RESET & BASE ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 45%, var(--bg-tertiary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    direction: rtl;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.18), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==================== DESKTOP ==================== */
.desktop {
    min-height: calc(100vh - 48px);
    padding-bottom: 60px;
    position: relative;
    z-index: 1;
}

/* ==================== HEADER ==================== */
.main-header {
    background: var(--gradient-header);
    padding: 0 24px;
    height: 88px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-icon {
    width: 52px;
    height: 52px;
    background: white;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent-blue);
    box-shadow: var(--shadow-sm);
}

.brand-text h1 {
    font-size: 28px;
    font-weight: 800;
    color: white;
    margin-bottom: 2px;
}

.brand-text p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.btn-login {
    background: white;
    color: var(--bg-primary);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* ==================== HERO SECTION ==================== */
.hero-section {
    text-align: center;
    padding: 48px 0;
}

.hero-icon {
    width: 76px;
    height: 76px;
    background: var(--gradient-hero-icon);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 32px;
    color: white;
    box-shadow: var(--shadow-lg);
}

.hero-section h2 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.4;
}

.hero-section h2 .highlight {
    color: var(--accent-cyan);
}

.hero-section > p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-btn {
    height: 44px;
    padding: 0 20px;
    border: none;
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.cta-btn.green { background: var(--accent-green); }
.cta-btn.purple { background: var(--accent-purple); }
.cta-btn.blue { background: var(--accent-blue); }

/* ==================== STATS SECTION ==================== */
.stats-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    background: var(--bg-panel-hover);
    transform: translateY(-2px);
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.stat-number.cyan { color: var(--accent-cyan); }
.stat-number.purple { color: var(--accent-purple); }
.stat-number.green { color: var(--accent-green); }
.stat-number.blue { color: var(--accent-blue); }

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* ==================== SECTIONS ==================== */
.section-header {
    margin-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.title-icon.gold { background: rgba(245, 158, 11, 0.2); color: var(--accent-orange); }
.title-icon.cyan { background: rgba(56, 189, 248, 0.2); color: var(--accent-cyan); }
.title-icon.purple { background: rgba(124, 58, 237, 0.2); color: var(--accent-purple); }

.section-title h3 {
    font-size: 22px;
    font-weight: 700;
}

.faq-count-badge {
    font-size: 14px;
    color: var(--text-muted);
}

/* ==================== FAQ SECTION ==================== */
.faq-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 40px;
}

.faq-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.faq-search {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.faq-search i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.faq-search input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: white;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}

.faq-search input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.08);
}

.faq-search input::placeholder {
    color: var(--text-muted);
}

.faq-info {
    font-size: 13px;
    color: var(--text-muted);
}

.faq-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-height: 280px;
    overflow-y: auto;
    padding-left: 8px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.faq-item-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    padding-left: 36px;
}

.faq-item-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.faq-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 28px;
    height: 28px;
    background: var(--accent-blue);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* ==================== SYSTEMS SECTION ==================== */
.system-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tab-btn {
    height: 36px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

.tab-btn.active {
    background: rgba(37, 99, 235, 0.25);
    border-color: rgba(37, 99, 235, 0.55);
    color: white;
}

.systems-search {
    position: relative;
    max-width: 300px;
    margin-bottom: 20px;
}

.systems-search i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.systems-search input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: white;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}

.systems-search input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.systems-search input::placeholder {
    color: var(--text-muted);
}

.systems-carousel-wrapper {
    position: relative;
    margin-bottom: 40px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.carousel-btn.prev { right: -20px; }
.carousel-btn.next { left: -20px; }

.systems-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
    scrollbar-width: thin;
}

.system-card {
    min-width: 160px;
    height: 100px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.system-card:hover {
    background: var(--bg-panel-hover);
    transform: translateY(-3px);
    border-color: var(--border-light);
}

.system-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.system-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.system-icon i {
    font-size: 24px;
    color: var(--accent-cyan);
}

.system-name {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.system-url {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ==================== P2P SECTION ==================== */
.p2p-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    margin-bottom: 40px;
}

.p2p-icon {
    width: 72px;
    height: 72px;
    background: rgba(124, 58, 237, 0.2);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: var(--accent-purple);
}

.p2p-panel h4 {
    font-size: 24px;
    margin-bottom: 12px;
}

.p2p-panel > p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.p2p-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-create-room {
    height: 44px;
    padding: 0 24px;
    background: var(--accent-purple);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-create-room:hover {
    background: #6D28D9;
    transform: translateY(-2px);
}

.join-room {
    display: flex;
    gap: 8px;
}

.join-room input {
    width: 140px;
    height: 44px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: white;
    font-family: inherit;
    font-size: 14px;
    text-align: center;
}

.join-room input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.btn-join {
    height: 44px;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-join:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ==================== TASKBAR ==================== */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 1000;
}

.taskbar-left,
.taskbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.taskbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: var(--radius-md);
}

.taskbar-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.taskbar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.start-btn:hover {
    background: rgba(37, 99, 235, 0.3);
}

.taskbar-app {
    width: 44px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
}

.taskbar-app:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.taskbar-app.active {
    color: white;
}

.taskbar-app.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--accent-blue);
    border-radius: 2px;
}

.system-tray {
    display: flex;
    gap: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    padding: 0 12px;
}

.datetime {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.datetime:hover {
    background: rgba(255, 255, 255, 0.1);
}

.datetime .time {
    font-weight: 600;
}

.datetime .date {
    color: rgba(255, 255, 255, 0.7);
}

/* ==================== START MENU ==================== */
.start-menu {
    position: fixed;
    bottom: 60px;
    right: 12px;
    width: 600px;
    max-width: calc(100vw - 24px);
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.25s ease;
}

.start-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.start-menu-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    height: 44px;
    padding: 0 44px 0 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    color: white;
    font-family: inherit;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.start-menu-content {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.pinned-apps h4,
.recommended h4 {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 600;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.app-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.app-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 8px;
    color: white;
}

.app-icon.blue { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.app-icon.green { background: linear-gradient(135deg, #22C55E, #16A34A); }
.app-icon.purple { background: linear-gradient(135deg, #8B5CF6, #7C3AED); }
.app-icon.cyan { background: linear-gradient(135deg, #22D3EE, #06B6D4); }
.app-icon.orange { background: linear-gradient(135deg, #FB923C, #F97316); }
.app-icon.red { background: linear-gradient(135deg, #F87171, #EF4444); }
.app-icon.yellow { background: linear-gradient(135deg, #FCD34D, #EAB308); }
.app-icon.pink { background: linear-gradient(135deg, #F472B6, #EC4899); }

.app-item span {
    font-size: 12px;
    text-align: center;
}

.recommended-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recommended-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.recommended-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.rec-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
}

.rec-info {
    display: flex;
    flex-direction: column;
}

.rec-title {
    font-size: 13px;
    font-weight: 600;
}

.rec-desc {
    font-size: 11px;
    color: var(--text-muted);
}

.start-menu-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.08);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.power-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.power-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
}

/* ==================== CHAT WIDGET ==================== */
.chat-widget {
    position: fixed;
    bottom: 70px;
    left: 24px;
    z-index: 999;
}

.chat-toggle {
    width: 56px;
    height: 56px;
    background: var(--accent-blue);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-window {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 360px;
    height: 520px;
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s ease;
}

.chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    background: var(--gradient-header);
    padding: 16px;
    border-radius: 18px 18px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chat-title h5 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.online-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.online-status i {
    color: #22C55E;
    font-size: 8px;
    margin-left: 4px;
}

.chat-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.message.bot {
    align-self: flex-start;
    background: var(--accent-blue);
}

.message.user {
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.1);
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
}

.quick-reply {
    padding: 8px 14px;
    border: none;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.quick-reply.green { background: var(--accent-green); }
.quick-reply.blue { background: var(--accent-blue); }

.quick-reply:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.chat-input {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.chat-input input {
    flex: 1;
    height: 40px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: white;
    font-family: inherit;
    font-size: 14px;
}

.chat-input input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.chat-input input::placeholder {
    color: var(--text-muted);
}

.send-btn {
    width: 40px;
    height: 40px;
    background: var(--accent-blue);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.send-btn:hover {
    background: #1D4ED8;
}

/* ==================== MODALS ==================== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h4 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: white;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.forgot-link {
    font-size: 13px;
    color: var(--accent-blue);
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-primary {
    height: 44px;
    padding: 0 24px;
    background: var(--accent-blue);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-primary:hover {
    background: #1D4ED8;
}

.btn-primary.full-width {
    width: 100%;
}

.btn-cancel {
    height: 44px;
    padding: 0 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Login Modal Specific */
.login-modal {
    width: 400px;
}

.login-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.login-tab {
    flex: 1;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.login-tab.active {
    background: var(--accent-blue);
    color: white;
}

/* Join Modal */
.join-modal {
    width: 400px;
}

/* P2P Chat Modal */
.p2p-chat-modal {
    width: 700px;
    height: 600px;
    display: flex;
    flex-direction: column;
}

.p2p-header {
    background: linear-gradient(90deg, #7C3AED 0%, #6D28D9 100%);
    padding: 16px 20px;
}

.p2p-room-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.room-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.room-details h4 {
    font-size: 16px;
    margin-bottom: 2px;
}

.room-members {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.p2p-header-actions {
    display: flex;
    gap: 8px;
}

.p2p-action-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.p2p-action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.p2p-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.p2p-message {
    max-width: 70%;
    display: flex;
    flex-direction: column;
}

.p2p-message.sent {
    align-self: flex-end;
}

.p2p-message.received {
    align-self: flex-start;
}

.p2p-sender {
    font-size: 11px;
    color: var(--accent-purple);
    margin-bottom: 4px;
    font-weight: 600;
}

.p2p-message.sent .p2p-sender {
    color: var(--accent-cyan);
    text-align: left;
}

.p2p-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
}

.p2p-message.sent .p2p-bubble {
    background: var(--accent-purple);
    border-bottom-left-radius: 4px;
}

.p2p-message.received .p2p-bubble {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-right-radius: 4px;
}

.p2p-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
    text-align: left;
}

.p2p-message.sent .p2p-time {
    text-align: right;
}

.p2p-reply-preview {
    background: rgba(0, 0, 0, 0.2);
    border-right: 3px solid var(--accent-cyan);
    padding: 6px 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    cursor: pointer;
}

.p2p-reply-preview span {
    font-size: 11px;
    color: var(--accent-cyan);
    font-weight: 600;
}

.p2p-reply-preview p {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reply-btn {
    position: absolute;
    top: 8px;
    opacity: 0;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: opacity 0.2s;
}

.p2p-message.sent .reply-btn {
    right: calc(100% + 8px);
}

.p2p-message.received .reply-btn {
    left: calc(100% + 8px);
}

.p2p-bubble:hover .reply-btn {
    opacity: 1;
}

.reply-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(124, 58, 237, 0.15);
    border-top: 1px solid var(--border-color);
}

.reply-content {
    flex: 1;
}

.reply-to {
    font-size: 12px;
    color: var(--accent-purple);
}

.reply-content p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.cancel-reply {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cancel-reply:hover {
    color: white;
}

.p2p-input {
    display: flex;
    gap: 10px;
    padding: 16px;
    border-top: 1px solid var(--border-color);
    align-items: flex-end;
}

.attach-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}

.attach-btn:hover {
    color: white;
}

.p2p-input textarea {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: white;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    line-height: 1.4;
}

.p2p-input textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
}

.p2p-input textarea::placeholder {
    color: var(--text-muted);
}

.p2p-input .send-btn {
    background: var(--accent-purple);
}

.p2p-input .send-btn:hover {
    background: #6D28D9;
}

/* Panel Modal */
.panel-modal {
    width: 900px;
    height: 600px;
    display: flex;
}

.panel-sidebar {
    width: 240px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.panel-user {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

.panel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panel-user-info h5 {
    font-size: 14px;
    margin-bottom: 2px;
}

.panel-user-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.panel-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.panel-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
    margin-bottom: 4px;
}

.panel-nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.panel-nav-item.active {
    background: rgba(124, 58, 237, 0.22);
    border: 1px solid rgba(124, 58, 237, 0.28);
    color: white;
}

.panel-nav-item i {
    width: 20px;
    text-align: center;
}

.panel-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h4 {
    font-size: 20px;
}

.panel-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-container {
    position: fixed;
    top: 100px;
    left: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 3000;
}

.toast {
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.toast.success .toast-icon {
    background: rgba(22, 163, 74, 0.2);
    color: var(--accent-green);
}

.toast.error .toast-icon {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
}

.toast.info .toast-icon {
    background: rgba(37, 99, 235, 0.2);
    color: var(--accent-blue);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .main-header {
        height: auto;
        padding: 16px;
    }

    .header-container {
        flex-direction: column;
        gap: 12px;
    }

    .hero-section h2 {
        font-size: 28px;
    }

    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .faq-list {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .p2p-actions {
        flex-direction: column;
    }

    .start-menu {
        width: calc(100vw - 24px);
        right: 12px;
        left: 12px;
    }

    .apps-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .chat-window {
        width: calc(100vw - 48px);
        left: 0;
    }

    .modal-content {
        margin: 12px;
    }

    .p2p-chat-modal,
    .panel-modal {
        width: calc(100vw - 24px);
        height: calc(100vh - 100px);
    }

    .panel-modal {
        flex-direction: column;
    }

    .panel-sidebar {
        width: 100%;
        height: auto;
        border-left: none;
        border-bottom: 1px solid var(--border-color);
    }

    .panel-nav {
        display: flex;
        overflow-x: auto;
        padding: 8px;
    }

    .panel-nav-item {
        white-space: nowrap;
        margin-bottom: 0;
        margin-left: 4px;
    }

    .taskbar-center {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-section {
        grid-template-columns: 1fr;
    }

    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .system-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
    }

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