:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --info: #4895ef;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --border: #dee2e6;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* هدر */
.header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.logo i {
    font-size: 1.8rem;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

/* بخش اصلی */
.main {
    padding: 40px 0;
}

.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 50px;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    line-height: 1.2;
}

.highlight {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 25px;
}

.hero-features {
    display: flex;
    gap: 20px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    font-size: 0.9rem;
}

.feature i {
    color: var(--primary);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-cart {
    font-size: 8rem;
    color: var(--primary);
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* کارت خرید */
.purchase-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
}

.card-header {
    background: var(--gradient);
    color: white;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.card-header h2 {
    font-size: 1.5rem;
}

.payment-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-label i {
    color: var(--primary);
    width: 16px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.custom-select {
    position: relative;
}

.select-arrow {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    pointer-events: none;
}

.error-message {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.submit-btn {
    width: 100%;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.3);
}

/* نتیجه */
.result {
    display: none;
    padding: 30px;
    background: #f8f9ff;
    border-top: 1px solid var(--border);
}

.success-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    color: #28a745;
}

.success-header i {
    font-size: 1.5rem;
}

.account-details {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--dark);
}

.detail-value {
    color: var(--gray);
}

.copy-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 6px 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: var(--primary-dark);
}

.format-text {
    font-family: monospace;
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 4px;
}

.success-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
    padding: 15px;
    background: #e7f4ff;
    border-radius: 10px;
    color: var(--info);
}

.success-note i {
    margin-top: 2px;
}

/* فوتر */
.footer {
    background: var(--dark);
    color: white;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: white;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

.footer-text {
    color: #adb5bd;
    margin-bottom: 20px;
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

.social-link:hover {
    background: var(--primary);
}

.bank-logos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.bank-logo {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    border-radius: 5px;
    text-align: center;
    font-size: 0.9rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #adb5bd;
}

.contact-item i {
    color: var(--primary);
    width: 16px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #adb5bd;
    font-size: 0.9rem;
}

.recovery-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recovery-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s;
}

.recovery-link:hover {
    color: var(--primary);
}

.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 12px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    transition: all 0.3s ease;
}

.toast.success {
    background: #28a745;
    color: white;
}

.toast.error {
    background: #dc3545;
    color: white;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--dark);
    min-width: 150px;
}

.detail-value {
    color: var(--gray);
    text-align: left;
    flex: 1;
}

/* هایلایت تاریخ انقضا */
.detail-item:nth-last-child(4) .detail-value {
    color: #e74c3c;
    font-weight: bold;
}

.detail-item:nth-last-child(3) .detail-value {
    color: #e74c3c;
    font-weight: bold;
}

/* رسپانسیو */
@media (max-width: 768px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-features {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-cart {
        font-size: 5rem;
    }
    
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav {
        gap: 20px;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .footer-sections {
        grid-template-columns: 1fr;
    }
}