:root {
    --primary-color: #4CAF50; /* سبز */
    --secondary-color: #78909C; /* توسی کمرنگ */
    --background-color: #ffffff;
    --text-color: #333333;
    --header-bg: #f5f5f5;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --success-color: #4CAF50;
    --warning-color: #ff9800;
    --error-color: #f44336;
}

.dark-mode {
    --primary-color: #4CAF50;
    --secondary-color: #78909C;
    --background-color: #121212;
    --text-color: #e0e0e0;
    --header-bg: #1e1e1e;
    --card-bg: #1e1e1e;
    --border-color: #333333;
    --shadow: 0 2px 10px rgba(0,0,0,0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: var(--header-bg);
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 24px;
}

.site-title h1 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.tagline {
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: normal;
}

.banner-ad {
    height: 90px;
    flex: 1;
    max-width: 728px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 100;
}

.theme-toggle i {
    color: white;
    font-size: 20px;
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

.hero-section {
    text-align: center;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 36px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.hero-section p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto 30px;
    color: var(--secondary-color);
}

/* Barcode Generator */
.barcode-generator {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 16px;
}

input, select, textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 16px;
    transition: border-color 0.3s;
    resize: vertical;
}

/* فیلد بزرگ برای QR Code */
.large-input {
    min-height: 80px;
    resize: vertical;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Input with example */
.input-with-example {
    position: relative;
}

.example-text {
    font-size: 12px;
    color: var(--secondary-color);
    margin-top: 5px;
    font-style: italic;
}

/* Data requirements */
.data-requirements {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: rgba(76, 175, 80, 0.1);
    border-left: 3px solid var(--primary-color);
}

.data-requirements i {
    color: var(--primary-color);
}

.data-requirements.error {
    background-color: rgba(244, 67, 54, 0.1);
    border-left-color: var(--error-color);
}

.data-requirements.error i {
    color: var(--error-color);
}

.data-requirements.success {
    background-color: rgba(76, 175, 80, 0.1);
    border-left-color: var(--success-color);
}

.data-requirements.success i {
    color: var(--success-color);
}

/* Input validation states */
input.success, textarea.success {
    border-color: var(--success-color);
}

input.error, textarea.error {
    border-color: var(--error-color);
}

/* Format Selector */
.format-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.format-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.format-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.format-option.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.format-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.format-option span {
    font-weight: 600;
    font-size: 14px;
}

/* Color Picker */
.color-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    margin-bottom: 12px;
}

.color-label i {
    color: var(--primary-color);
}

.large-color-picker {
    width: 100%;
    height: 60px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    padding: 5px;
}

.large-color-picker:hover {
    border-color: var(--primary-color);
}

.generate-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.generate-btn:hover {
    background-color: #3d8b40;
}

/* Stats Section */
.stats-section {
    display: flex;
    justify-content: space-around;
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 14px;
    color: var(--secondary-color);
}

/* Banner Ad Section */
.banner-ad-section {
    margin: 40px 0;
    text-align: center;
}

.large-banner {
    width: 100%;
    max-width: 1168px;
    height: 350px;
    margin: 0 auto;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.large-banner:hover {
    transform: translateY(-5px);
}

/* استایل جدید برای بنر متوسط */
.medium-banner {
    width: 100%;
    max-width: 1168px;
    height: 150px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    margin: 20px auto;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.medium-banner:hover {
    transform: translateY(-5px);
}

/* استایل جدید برای بخش قیمت‌گذاری تبلیغات */
.ad-price-section {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin: 40px 0;
    text-align: center;
}

.ad-price-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.ad-price-content {
    max-width: 800px;
    margin: 0 auto;
}

.ad-price-content p {
    font-size: 16px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.ad-price-content .contact-email {
    margin-top: 20px;
}

.ad-price-content .contact-email a {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.ad-price-content .contact-email a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--header-bg);
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.contact-email {
    color: var(--primary-color);
    font-weight: 600;
}

/* Social Links Styles */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.social-link:hover {
    transform: translateY(-2px);
}

.social-link.discord {
    background-color: #5865F2;
}

.social-link.instagram {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
}

.social-link.telegram {
    background-color: #0088cc;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-color);
    font-size: 14px;
}

.copyright p {
    margin: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
}

.barcode-preview {
    margin: 20px 0;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.download-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
}

.close-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    /* Responsive images inside banner-ad */
    .banner-ad img {
        max-width: 100%;
        height: auto;
        display: block;
    }


    .format-selector {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .format-option {
        padding: 15px 5px;
    }

    .format-icon {
        font-size: 20px;
    }

    .format-option span {
        font-size: 12px;
    }

    .stats-section {
        flex-direction: column;
        gap: 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    
    .large-banner {
        max-width: 100%;
        height: auto;
        display: block;
    }

    .medium-banner img {
        max-width: 100%;
        height: auto;
        display: block;
    }

    .modal-actions {
        flex-direction: column;
    }

    .hero-section h1 {
        font-size: 28px;
    }

    .hero-section p {
        font-size: 16px;
    }

    .barcode-generator {
        padding: 20px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .ad-price-section {
        padding: 20px;
    }

    .ad-price-section h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .format-selector {
        grid-template-columns: repeat(3, 1fr);
    }

    .container {
        padding: 0 15px;
    }

    .logo-section {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .site-title h1 {
        font-size: 20px;
    }

     /* Responsive images inside banner-ad */
    .banner-ad img {
        max-width: 100%;
        height: auto;
        display: block;
    }

    .format-option {
        padding: 12px 5px;
    }

    .format-icon {
        font-size: 18px;
    }

    .format-option span {
        font-size: 11px;
    }

    .large-banner img {
        max-width: 100%;
        height: auto;
        display: block;
    }

    .medium-banner img{
        max-width: 100%;
        height: auto;
        display: block;
    }

    .ad-price-section h2 {
        font-size: 22px;
    }

    .ad-price-content p {
        font-size: 14px;
    }
}