/* ============================================
   Main Styles
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.8;
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: var(--primary);
    color: var(--secondary-dark);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ============================================
   Theme Switcher
   ============================================ */

.theme-switcher {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--background-card);
    padding: 12px 8px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
}

.theme-btn {
    width: 45px;
    height: 32px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    background: transparent;
}

.theme-btn:hover {
    transform: scale(1.2);
}

.theme-dot {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
}

/* ============================================
   Navigation
   ============================================ */

.navbar-custom {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
/*    padding: 15px 0;*/
    transition: all 0.3s ease;
}

.navbar-custom.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-card);
}

.brand-icon {
    font-size: 2rem;
    color: var(--primary);
    filter: drop-shadow(0 0 10px rgba(var(--primary-rgb), 0.5));
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-custom .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 10px 20px !important;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-custom .nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    right: 20px;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--primary);
}

.navbar-custom .nav-link:hover::after,
.navbar-custom .nav-link.active::after {
    width: calc(100% - 40px);
}

.navbar-toggler {
    border-color: var(--border-color);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(212, 175, 55, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* ============================================
   Buttons
   ============================================ */

.btn-primary-custom {
    background: var(--gradient-primary);
    border: none;
    color: var(--secondary-dark);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-primary);
    color: var(--secondary-dark);
}

.btn-primary-custom:hover::before {
    left: 100%;
}

.btn-outline-custom {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
    padding: 10px 28px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background: var(--primary);
    color: var(--secondary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-primary);
}

/* ============================================
   Hero Section
   ============================================ */

.hero-section {
    position: relative;
    background: var(--background);
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    z-index: 1;
}

.hero-section .container {
    z-index: 2;
}

.min-vh-75 {
    min-height: 75vh;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid var(--border-color);
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.hero-badge i {
    font-size: 1.2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 500px;
}

.hero-circle {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.15) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 6s ease-in-out infinite;
}

.floating-card {
    position: absolute;
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    animation: float 4s ease-in-out infinite;
}

.floating-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-primary);
    border-color: var(--border-glow);
}

.floating-card i {
    font-size: 2rem;
    color: var(--primary);
}

.floating-card span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.floating-card strong {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.card-1 {
    top: 10%;
    right: 20%;
    animation-delay: 0s;
}

.card-2 {
    top: 45%;
    right: 5%;
    animation-delay: 1s;
}

.card-3 {
    bottom: 15%;
    right: 40%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Hero Wave */
.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2;
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: 120px;
}

.hero-wave path {
    fill: var(--background-light);
}

/* ============================================
   Section Styles
   ============================================ */

.section-header {
    margin-bottom: 60px;
}

.section-badge {
    display: inline-block;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid var(--border-color);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Rates Section
   ============================================ */

.rates-section {
    background: var(--background-light);
    padding: 100px 0;
}

.rate-card {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.rate-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-primary);
    border-color: var(--border-glow);
}

.rate-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 25px;
    background: rgba(var(--primary-rgb), 0.05);
    border-bottom: 1px solid var(--border-color);
}

.rate-icon {
    width: 55px;
    height: 55px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.currency-icon {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    color: white;
}

.gold-icon {
    background: var(--gradient-primary);
    color: var(--secondary-dark);
}

.coin-icon {
    background: linear-gradient(135deg, #FFB300, #FFC107);
    color: var(--secondary-dark);
}

.melted-icon {
    background: linear-gradient(135deg, #FF6F00, #FF9800);
    color: white;
}

.parsian-icon {
    background: linear-gradient(135deg, #7B1FA2, #9C27B0);
    color: white;
}

.chart-icon {
    background: linear-gradient(135deg, #1976D2, #42A5F5);
    color: white;
}

.rate-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.rate-card-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.update-badge {
    margin-right: auto;
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.update-badge i {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rate-card-body {
    padding: 20px;
}

/* Rate Table */
.rate-table {
    width: 100%;
    border-collapse: collapse;
}

.rate-table th {
    text-align: right;
    padding: 12px 15px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
}

.rate-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.05);
    font-size: 0.95rem;
}

.rate-table tr:last-child td {
    border-bottom: none;
}

.rate-table tr {
    transition: background 0.3s ease;
}

.rate-table tr:hover {
    background: rgba(var(--primary-rgb), 0.05);
}

.currency-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.currency-name img {
    border-radius: 3px;
}

.price-buy {
    color: var(--success);
    font-weight: 600;
}

.price-sell {
    color: var(--primary);
    font-weight: 600;
}

.change-up {
    color: var(--success);
    font-size: 0.85rem;
}

.change-down {
    color: var(--danger);
    font-size: 0.85rem;
}

/* Item Badges */
.item-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

.gold-badge {
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary);
}

.coin-badge {
    background: rgba(255, 193, 7, 0.15);
    color: #FFB300;
}

.melted-badge {
    background: rgba(255, 152, 0, 0.15);
    color: #FF9800;
}

.parsian-badge {
    background: rgba(156, 39, 176, 0.15);
    color: #9C27B0;
}

/* Chart Controls */
.chart-controls {
    margin-right: auto;
    display: flex;
    gap: 5px;
}

.chart-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chart-btn:hover,
.chart-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--secondary-dark);
}

.chart-card .rate-card-body {
    padding: 25px;
    height: 300px;
}

/* ============================================
   About Section
   ============================================ */

.about-section {
    padding: 100px 0;
    background: var(--background);
}

.about-image-wrapper {
    position: relative;
}

.about-image {
    position: relative;
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 60px;
    overflow: hidden;
}

.about-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 2px 2px, rgba(var(--primary-rgb), 0.15) 1px, transparent 0);
    background-size: 30px 30px;
}

.about-content-box {
    position: relative;
    text-align: center;
    padding: 60px 40px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid var(--border-color);
    border-radius: 20px;
}

.about-content-box i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 20px;
    display: block;
}

.about-content-box h4 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.about-content-box p {
    color: var(--text-muted);
}

.about-badge-box {
    position: absolute;
    bottom: -30px;
    right: 30px;
}

.about-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gradient-primary);
    color: var(--secondary-dark);
    padding: 15px 25px;
    border-radius: 15px;
    font-weight: 600;
    box-shadow: var(--shadow-primary);
}

.about-badge i {
    font-size: 1.5rem;
}

.about-content {
    padding-right: 30px;
}

.about-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.about-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
    line-height: 2;
}

.about-features {
    display: grid;
    gap: 25px;
}

.feature-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.feature-icon {
    width: 55px;
    height: 55px;
    min-width: 55px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
}

.feature-content h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.feature-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================
   Contact Section
   ============================================ */

.contact-section {
    padding: 100px 0;
    background: var(--background-light);
}

.contact-card {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-primary);
    border-color: var(--border-glow);
}

.contact-icon {
    width: 80px;
    height: 80px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    margin: 0 auto 20px;
}

.contact-card h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.contact-card p {
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--secondary-dark);
    padding: 80px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.footer-brand i {
    font-size: 2rem;
}

.footer-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 45px;
    height: 45px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary);
    color: var(--secondary-dark);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
    padding-right: 10px;
}

.trust-badges {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid var(--border-color);
    padding: 15px 20px;
    border-radius: 12px;
}

.trust-badge i {
    font-size: 1.5rem;
    color: var(--primary);
}

.trust-badge span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-bottom {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    margin: 0;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-visual {
        display: none;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .about-content {
        padding-right: 0;
        margin-top: 60px;
    }
    
    .theme-switcher {
        top: auto;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .rate-card-header {
        flex-wrap: wrap;
    }
    
    .update-badge {
        margin-right: 0;
        margin-top: 10px;
    }
    
    .chart-controls {
        margin-right: 0;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
    
    .rate-table {
        font-size: 0.85rem;
    }
    
    .rate-table th,
    .rate-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 576px) {
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .navbar-custom .navbar-collapse {
        background: var(--background-card);
        padding: 20px;
        margin-top: 15px;
        border-radius: 15px;
        border: 1px solid var(--border-color);
    }
    
    .navbar-custom .navbar-nav {
        gap: 5px;
    }
    
    .navbar-custom .d-flex {
        flex-direction: column;
        gap: 15px;
    }
    
    .live-indicator {
        justify-content: center;
    }
    .about-content-box {
        padding: 10px 20px;
    }
}
