/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #4A90E2;
    --primary-pink: #FF6B9D;
    --primary-yellow: #FFD93D;
    --dark-blue: #2C5F8D;
    --light-bg: #F5F7FA;
    --white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --border-color: #E1E8ED;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    text-align: right;
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.header-nav {
    margin-top: 1rem;
}

.shop-link {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.shop-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.logo-link {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.9;
}

.tagline {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-pink) 50%, var(--primary-yellow) 100%);
    padding: 4rem 0;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.hero-description {
    font-size: 1.3rem;
    font-weight: 400;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* Section Styles */
section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-pink));
    border-radius: 2px;
}

/* About Section */
.about {
    background-color: var(--white);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.1rem;
    line-height: 2;
    color: var(--text-dark);
    text-align: justify;
}

/* Screenshots Section */
.screenshots {
    background-color: var(--light-bg);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.screenshot-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--white);
}

.screenshot-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.screenshot-item:hover img {
    transform: scale(1.05);
}

/* Download Section */
.download {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: var(--white);
    text-align: center;
}

.download .section-title {
    color: var(--white);
}

.download .section-title::after {
    background: rgba(255, 255, 255, 0.5);
}

.download-content {
    max-width: 600px;
    margin: 0 auto;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.shop-button {
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-yellow) 100%);
    color: var(--text-dark);
}

.shop-button:hover {
    background: linear-gradient(135deg, var(--primary-yellow) 0%, var(--primary-pink) 100%);
    color: var(--text-dark);
}

.shop-icon {
    width: 28px;
    height: 28px;
}

.download-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--white);
    color: var(--primary-blue);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.download-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background-color: var(--primary-yellow);
    color: var(--text-dark);
}

.play-icon {
    width: 28px;
    height: 28px;
}

/* Contact Section */
.contact {
    background-color: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: var(--light-bg);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-blue);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.contact-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-info p {
    font-size: 1rem;
    color: var(--text-light);
}

/* Social Media Section */
.social {
    background-color: var(--light-bg);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
    background-color: var(--white);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    min-width: 120px;
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.social-link:nth-child(1):hover {
    background: linear-gradient(135deg, #E4405F, #C13584);
    color: var(--white);
}

.social-link:nth-child(2):hover {
    background: linear-gradient(135deg, #0088cc, #229ED9);
    color: var(--white);
}

.social-link:nth-child(3):hover {
    background: linear-gradient(135deg, #1DA1F2, #0d8bd9);
    color: var(--white);
}

.social-link:nth-child(4):hover {
    background: linear-gradient(135deg, #1877F2, #0e6ae0);
    color: var(--white);
}

.social-link:nth-child(5):hover {
    background: linear-gradient(135deg, #FF0000, #cc0000);
    color: var(--white);
}

.social-icon {
    width: 36px;
    height: 36px;
    transition: transform 0.3s ease;
}

.social-link:hover .social-icon {
    transform: scale(1.1);
}

.social-link span {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

.footer-text {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .about-text {
        font-size: 1rem;
    }

    .screenshots-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .download-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .download-buttons {
        flex-direction: column;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .social-links {
        gap: 1rem;
    }

    .social-link {
        min-width: 100px;
        padding: 1.25rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    section {
        padding: 3rem 0;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.4rem;
        margin-bottom: 2rem;
    }

    .download-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .play-icon {
        width: 24px;
        height: 24px;
    }
}

/* Image Lazy Loading */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Products Section */
.products-section {
    background-color: var(--white);
    min-height: 60vh;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-blue);
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-pink) 50%, var(--primary-yellow) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
}

.product-image-bg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.product-image-overlay {
    width: 60%;
    height: 60%;
    object-fit: contain;
    object-position: center;
    display: block;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image-overlay {
    transform: scale(1.1);
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-grow: 1;
}

.product-category {
    display: inline-block;
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    width: fit-content;
}

.product-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.product-quantity {
    font-size: 1rem;
    color: var(--text-light);
    margin: 0;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0.5rem 0;
}

.product-select-btn {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: var(--white);
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    margin-top: auto;
}

.product-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-blue) 100%);
}

.no-products {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.2rem;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-right: 4px solid #c62828;
    text-align: right;
    font-weight: 500;
}

/* User Form Section */
.user-form-section {
    background-color: var(--light-bg);
    padding: 4rem 0;
}

.user-form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.selected-product-info {
    margin-bottom: 2rem;
}

.selected-product-card {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-pink) 100%);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.selected-product-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.selected-price {
    font-size: 1.5rem;
    font-weight: 700;
    opacity: 0.95;
}

.user-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-input {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.3s ease;
    direction: ltr;
    text-align: left;
}

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

.form-help {
    font-size: 0.85rem;
    color: var(--text-light);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.btn-secondary {
    background-color: var(--light-bg);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
}

/* Payment Result Section */
.payment-result-section {
    background-color: var(--light-bg);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.payment-success,
.payment-failed,
.payment-error {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.success-icon,
.error-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
}

.success-icon svg,
.error-icon svg {
    width: 100%;
    height: 100%;
}

.result-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.success-title {
    color: #4CAF50;
}

.error-title {
    color: #F44336;
}

.result-message {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.payment-details {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    text-align: right;
}

.payment-details h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    text-align: center;
}

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

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

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

.detail-value {
    color: var(--primary-blue);
    font-weight: 500;
    direction: ltr;
    text-align: left;
}

.result-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.result-actions .btn-primary,
.result-actions .btn-secondary {
    flex: 1;
    min-width: 150px;
}

/* Responsive Design for Shop and Payment Pages */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .user-form-container {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .payment-success,
    .payment-failed,
    .payment-error {
        padding: 2rem 1.5rem;
    }

    .result-title {
        font-size: 1.6rem;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions .btn-primary,
    .result-actions .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .product-card {
        margin: 0;
    }

    .product-image {
        height: 150px;
    }

    .user-form-container {
        padding: 1.25rem;
    }

    .payment-details {
        padding: 1.5rem;
    }

    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .detail-value {
        text-align: right;
        direction: rtl;
    }
}
