/* style.css - استایل کامل پروژه */

/* تنظیمات اصلی */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --dark-gradient: linear-gradient(135deg, #141e30 0%, #243b55 100%);
    --success-gradient: linear-gradient(135deg, #42e695 0%, #3bb2b8 100%);
    --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --info-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --danger-color: #ef476f;
    --info-color: #7209b7;
    --light-color: #f8f9fa;
    --dark-color: #1a1a2e;
    --gray-color: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fb;
}

/* صفحه احراز هویت */
.auth-page {
    min-height: 100vh;
    background: var(--dark-gradient);
    display: flex;
    align-items: center;
    padding: 20px 0;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

/* کارت‌ها */
.card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.shadow-3d {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15),
                0 1px 8px rgba(0, 0, 0, 0.1);
}

/* هدر کارت */
.card-header {
    border-bottom: none;
    padding: 1.5rem;
}

.bg-gradient-primary {
    background: var(--primary-gradient) !important;
}

.bg-dark-gradient {
    background: var(--dark-gradient) !important;
}

/* ناوبری */
.nav-pills .nav-link {
    color: var(--gray-color);
    border-radius: 10px;
    padding: 15px 20px;
    margin: 0 5px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.nav-pills .nav-link.active {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* آواتار */
.avatar-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.avatar-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.avatar-circle-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

/* نمایش عبارت بازیابی */
.mnemonic-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    font-family: 'Vazirmatn', monospace;
    font-size: 1.2rem;
    line-height: 2;
    text-align: center;
    border: 3px solid #dc3545;
    position: relative;
    overflow: hidden;
}

.mnemonic-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #dc3545, #fd7e14);
}

.mnemonic-display-large {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    border: 2px dashed #dc3545;
}

/* ورودی‌ها */
.form-control {
    border-radius: 12px;
    padding: 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
}

.form-control-lg {
    padding: 18px;
    font-size: 1.1rem;
}

.input-group-text {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 12px 0 0 12px;
    min-width: 50px;
    justify-content: center;
}

/* دکمه‌ها */
.btn {
    border-radius: 12px;
    padding: 14px 28px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-gradient);
}

.btn-success {
    background: var(--success-gradient);
}

.btn-warning {
    background: var(--warning-gradient);
    color: white;
}

.btn-info {
    background: var(--info-gradient);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef476f 0%, #ff9a5a 100%);
    color: white;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(-1px);
}

/* آیکون‌ها */
.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: inline-block;
}

/* استاتوس */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.connected,
.status-indicator.active {
    background: #42e695;
    box-shadow: 0 0 10px #42e695;
}

.status-indicator.disconnected {
    background: #f5576c;
}

/* انیمیشن‌ها */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes slideInDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate__animated {
    animation-duration: 0.6s;
    animation-fill-mode: both;
}

.animate__fadeInDown {
    animation-name: slideInDown;
}

.animate__fadeInUp {
    animation-name: slideInUp;
}

/* گرادیانت متن */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* شبکه نودها */
.network-visualization {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.network-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    z-index: 2;
}

.network-nodes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.network-node-visual {
    position: absolute;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.network-node-visual.active {
    background: var(--success-color);
    color: white;
    box-shadow: 0 5px 15px rgba(76, 201, 240, 0.3);
}

.network-node-visual.inactive {
    opacity: 0.5;
}

/* قرار دادن نودها در دایره */
.network-node-visual:nth-child(1) { top: 10%; left: 50%; transform: translateX(-50%); }
.network-node-visual:nth-child(2) { top: 25%; left: 85%; transform: translateX(-50%); }
.network-node-visual:nth-child(3) { top: 50%; left: 90%; transform: translateY(-50%); }
.network-node-visual:nth-child(4) { top: 75%; left: 85%; transform: translateX(-50%); }
.network-node-visual:nth-child(5) { top: 90%; left: 50%; transform: translateX(-50%); }
.network-node-visual:nth-child(6) { top: 75%; left: 15%; transform: translateX(-50%); }
.network-node-visual:nth-child(7) { top: 50%; left: 10%; transform: translateY(-50%); }
.network-node-visual:nth-child(8) { top: 25%; left: 15%; transform: translateX(-50%); }

/* هشدارها */
.alert {
    border-radius: 15px;
    border: none;
    padding: 20px;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #dc3545;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border: 2px solid #17a2b8;
}

/* جدول‌ها */
.table {
    border-radius: 15px;
    overflow: hidden;
}

.table thead th {
    background: var(--dark-gradient);
    color: white;
    border: none;
    padding: 20px;
    font-weight: 600;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

.table td {
    padding: 15px 20px;
    vertical-align: middle;
    border-color: #e9ecef;
}

/* نمودارها */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* صفحه داشبورد */
.dashboard-page {
    background: #f5f7fb;
    min-height: 100vh;
}

.navbar {
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.sidebar {
    background: white;
    min-height: calc(100vh - 73px);
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.main-content {
    padding: 20px;
}

.dashboard-header {
    background: white;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* لیست گروه‌ها */
.list-group-item {
    border: none;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 12px !important;
    transition: all 0.3s ease;
    background: #f8f9fa;
    border-left: 4px solid transparent;
}

.list-group-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(10px);
    border-left-color: var(--primary-color);
}

.list-group-item i {
    transition: all 0.3s ease;
}

.list-group-item:hover i {
    transform: scale(1.2);
}

/* پیشرفت‌بار */
.progress {
    border-radius: 10px;
    height: 12px;
    background: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    border-radius: 10px;
    background: var(--primary-gradient);
}

/* فوتو */
.footer {
    margin-top: 50px;
    padding: 20px 0;
    background: var(--dark-gradient);
    color: white;
}

/* مودال */
.modal-content {
    border-radius: 20px;
    border: none;
    overflow: hidden;
}

.modal-header {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 25px;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    border: none;
    padding: 25px;
    background: #f8f9fa;
}

/* پاسخگو */
@media (max-width: 768px) {
    .auth-page {
        padding: 10px;
    }
    
    .card {
        margin: 10px;
    }
    
    .mnemonic-input-grid {
        grid-template-columns: 1fr !important;
    }
    
    .avatar-circle {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .btn {
        padding: 12px 20px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .main-content {
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
}

/* اسکرول‌بار سفارشی */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* وضعیت‌های مختلف */
.online-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #42e695;
    margin-right: 5px;
    animation: pulse 2s infinite;
}

.offline-status {
    background: #f5576c;
}

/* انیمیشن‌های ویژه */
.coin-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotateY(0); }
    100% { transform: rotateY(360deg); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* افکت‌های ویژه */
.glow {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 10px var(--primary-color); }
    to { box-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--secondary-color); }
}

/* بارگذاری */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* تایپوگرافی */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* ابزارک‌ها */
.tooltip {
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 0.9rem;
}

/* نمایش کد */
code {
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    color: #e83e8c;
}

/* جداکننده */
hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 30px 0;
}

/* شبکه */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* فاصله‌ها */
.mt-6 { margin-top: 4rem; }
.mb-6 { margin-bottom: 4rem; }
.pt-6 { padding-top: 4rem; }
.pb-6 { padding-bottom: 4rem; }

/* سایه‌ها */
.shadow-sm { box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.shadow-md { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 8px 32px rgba(0,0,0,0.15); }
.shadow-xl { box-shadow: 0 16px 48px rgba(0,0,0,0.2); }

/* شفافیت */
.opacity-75 { opacity: 0.75; }
.opacity-50 { opacity: 0.5; }
.opacity-25 { opacity: 0.25; }

/* نمایش‌های خاص */
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-none { display: none; }

/* موقعیت‌ها */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }

/* تراز */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* اندازه فونت */
.fs-sm { font-size: 0.875rem; }
.fs-base { font-size: 1rem; }
.fs-lg { font-size: 1.125rem; }
.fs-xl { font-size: 1.25rem; }
.fs-2xl { font-size: 1.5rem; }
.fs-3xl { font-size: 1.875rem; }
.fs-4xl { font-size: 2.25rem; }

/* وزن فونت */
.fw-light { font-weight: 300; }
.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }
.fw-extrabold { font-weight: 800; }

/* رنگ متن */
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }
.text-info { color: var(--info-color); }
.text-light { color: var(--light-color); }
.text-dark { color: var(--dark-color); }
.text-muted { color: var(--gray-color); }

/* رنگ پس‌زمینه */
.bg-primary { background-color: var(--primary-color); }
.bg-secondary { background-color: var(--secondary-color); }
.bg-success { background-color: var(--success-color); }
.bg-warning { background-color: var(--warning-color); }
.bg-danger { background-color: var(--danger-color); }
.bg-info { background-color: var(--info-color); }
.bg-light { background-color: var(--light-color); }
.bg-dark { background-color: var(--dark-color); }

/* حاشیه */
.border { border: 1px solid #e9ecef; }
.border-top { border-top: 1px solid #e9ecef; }
.border-end { border-right: 1px solid #e9ecef; }
.border-bottom { border-bottom: 1px solid #e9ecef; }
.border-start { border-left: 1px solid #e9ecef; }

/* گردی */
.rounded { border-radius: 0.375rem; }
.rounded-sm { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 1rem; }
.rounded-2xl { border-radius: 1.5rem; }
.rounded-3xl { border-radius: 2rem; }
.rounded-full { border-radius: 9999px; }

/* نمایش در دستگاه‌های مختلف */
@media (max-width: 640px) {
    .sm\:grid-1 { grid-template-columns: 1fr; }
    .sm\:d-block { display: block; }
    .sm\:d-none { display: none; }
}

@media (min-width: 641px) and (max-width: 768px) {
    .md\:grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .lg\:grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1025px) {
    .xl\:grid-4 { grid-template-columns: repeat(4, 1fr); }
}