/* استایل‌های سفارشی برای وب‌سایت ترندهای گوگل ایران */

/* فونت‌های فارسی */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');

* {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

/* متغیرهای رنگی */
:root {
    --primary-blue: #1a365d;
    --secondary-orange: #ed8936;
    --success-green: #38a169;
    --danger-red: #e53e3e;
    --warning-yellow: #d69e2e;
    --light-gray: #f7fafc;
    --medium-gray: #e2e8f0;
    --dark-gray: #2d3748;
}

/* انیمیشن‌ها */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* کلاس‌های انیمیشن */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* استایل‌های کارت */
.trend-card {
    transition: all 0.3s ease;
    border: 1px solid var(--medium-gray);
}

.trend-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-orange);
}

.trend-card .trend-title {
    color: var(--dark-gray);
    font-weight: 600;
    line-height: 1.4;
}

.trend-card .trend-stats {
    color: #718096;
    font-size: 0.875rem;
}

/* استایل‌های آیکون */
.icon-trending-up {
    color: var(--success-green);
}

.icon-trending-down {
    color: var(--danger-red);
}

.icon-fire {
    color: var(--danger-red);
    animation: pulse 1.5s infinite;
}

/* استایل‌های نمودار */
.chart-container {
    position: relative;
    height: 300px;
    padding: 20px;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* استایل‌های جدول */
.trends-table {
    border-collapse: collapse;
    width: 100%;
}

.trends-table th {
    background-color: var(--light-gray);
    font-weight: 600;
    color: var(--dark-gray);
    padding: 12px 16px;
    text-align: right;
    border-bottom: 2px solid var(--medium-gray);
}

.trends-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--medium-gray);
    vertical-align: middle;
}

.trends-table tr:hover {
    background-color: var(--light-gray);
    transition: background-color 0.2s ease;
}

/* استایل‌های بج */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    gap: 4px;
}

.status-new {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-rising {
    background-color: #dcfce7;
    color: #166534;
}

.status-peak {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-falling {
    background-color: #fef3c7;
    color: #92400e;
}

.status-stable {
    background-color: #f3f4f6;
    color: #374151;
}

/* استایل‌های دکمه */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background-color: #2c5282;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--secondary-orange);
    color: white;
}

.btn-secondary:hover {
    background-color: #c05621;
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-outline:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* استایل‌های فرم */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    background-color: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
}

/* استایل‌های لودینگ */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* استایل‌های ریسپانسیو */
@media (max-width: 768px) {
    .trend-card {
        margin-bottom: 1rem;
    }
    
    .chart-container {
        height: 250px;
        padding: 15px;
    }
    
    .trends-table {
        font-size: 0.875rem;
    }
    
    .trends-table th,
    .trends-table td {
        padding: 8px 12px;
    }
}

@media (max-width: 640px) {
    .chart-container {
        height: 200px;
        padding: 10px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 0.875rem;
    }
    
    .status-badge {
        font-size: 0.625rem;
        padding: 2px 6px;
    }
}

/* استایل‌های اسکرول سفارشی */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--medium-gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* استایل‌های تولتیپ */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: var(--dark-gray);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* استایل‌های مودال */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    animation: fadeInUp 0.3s ease-out;
}

/* استایل‌های نوتیفیکیشن */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1001;
    animation: slideInRight 0.3s ease-out;
}

.notification.success {
    background-color: var(--success-green);
}

.notification.error {
    background-color: var(--danger-red);
}

.notification.warning {
    background-color: var(--warning-yellow);
}

/* استایل‌های کارت آمار */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.stats-card .stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.stats-card .stats-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* استایل‌های سرچ */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border: 2px solid var(--medium-gray);
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.search-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-button:hover {
    background-color: #2c5282;
}

/* استایل‌های فیلتر */
.filter-container {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-weight: 500;
    color: var(--dark-gray);
    font-size: 0.875rem;
}

/* استایل‌های پیجینیشن */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

.pagination-item {
    padding: 8px 12px;
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    color: var(--dark-gray);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-item:hover {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.pagination-item.active {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-item.disabled:hover {
    background-color: transparent;
    color: var(--dark-gray);
    border-color: var(--medium-gray);
}