* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* RTL Support for Arabic */
html[dir="rtl"] body {
    text-align: right;
}

html[dir="rtl"] .header-content,
html[dir="rtl"] .app-stats,
html[dir="rtl"] .features-grid,
html[dir="rtl"] .platform-buttons {
    direction: rtl;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Language Bar */
.language-bar {
    display: flex;
    justify-content: flex-end;
    padding: 10px 20px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
}

.language-bar select {
    appearance: none;
    background: white;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    padding: 8px 35px 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.language-bar select:hover {
    border-color: #4CAF50;
}

.language-bar select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

/* Header Styles */
.app-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.app-info {
    flex: 1;
    min-width: 200px;
}

.app-name {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 5px;
}

.app-developer {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.app-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.stars {
    color: #ff9800;
    font-size: 18px;
}

.rating-count {
    color: #666;
    font-size: 14px;
}

/* Install Button */
.install-button {
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.primary-install {
    background-color: #4CAF50;
    color: white;
}

.primary-install:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* App Stats */
.app-stats {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 15px;
}

.stat {
    text-align: center;
    min-width: 80px;
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* Screenshots */
.screenshots-section {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    overflow: hidden;
}

.screenshots-section h2 {
    margin-bottom: 20px;
    font-size: 22px;
}

/* Swiper Screenshots Slider */
.screenshots-swiper {
    width: 100%;
    padding-bottom: 10px;
}

.screenshots-swiper .swiper-slide {
    width: auto;
    height: auto;
}

.screenshot {
    height: 400px;
    width: auto;
    border-radius: 12px;
    transition: transform 0.3s ease;
    display: block;
    object-fit: contain;
}

.screenshot:hover {
    transform: scale(1.02);
}

/* Legacy container styles (kept for backwards compatibility) */
.screenshots-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.screenshots-container::-webkit-scrollbar {
    height: 6px;
}

.screenshots-container::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.screenshots-container::-webkit-scrollbar-thumb {
    background: #d2d2d7;
    border-radius: 3px;
}

/* Description */
.description-section {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

.description-section h2 {
    margin-bottom: 15px;
    font-size: 22px;
}

.app-description {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.show-more {
    color: #4CAF50;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
    transition: color 0.3s ease;
}

.show-more:hover {
    color: #45a049;
}

/* Features */
.features-section {
    padding: 20px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
}

.features-section h2 {
    margin-bottom: 20px;
    font-size: 22px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-2px);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #4CAF50;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

/* Download Section */
.download-section {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.download-section h2 {
    margin-bottom: 20px;
    font-size: 22px;
}

.platform-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.platform-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    background-color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    text-align: left;
}

.platform-btn:hover {
    border-color: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.platform-btn img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

/* Reviews Section */
.reviews-section {
    padding: 20px;
}

.reviews-section h2 {
    margin-bottom: 20px;
    font-size: 22px;
}

/* Reviews Container */
.reviews-container {
    margin-bottom: 30px;
}

.review {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.review:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.reviewer-name {
    font-weight: 600;
    color: #333;
}

.review-rating {
    color: #ff9800;
    font-size: 16px;
}

.review-text {
    color: #666;
    line-height: 1.6;
}

/* Rating Summary */
.rating-summary {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 12px;
    flex-wrap: wrap;
}

.rating-overview {
    text-align: center;
    min-width: 150px;
}

.average-rating {
    font-size: 48px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 10px;
}

.rating-stars {
    color: #ff9800;
    font-size: 20px;
    margin-bottom: 10px;
}

.total-reviews {
    color: #666;
    font-size: 14px;
}

.rating-breakdown {
    flex: 1;
    min-width: 200px;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.rating-bar span:first-child {
    width: 30px;
    font-size: 14px;
    color: #666;
}

.bar {
    flex: 1;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background-color: #ff9800;
    transition: width 0.5s ease;
}

.rating-bar span:last-child {
    width: 60px;
    text-align: right;
    font-size: 12px;
    color: #666;
}

/* Write Review Section */
.write-review-section {
    margin-bottom: 30px;
    text-align: center;
}

.write-review-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.write-review-btn svg {
    width: 18px;
    height: 18px;
}

.write-review-btn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.modal h3 {
    margin-bottom: 20px;
    color: #333;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal input,
.modal textarea {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.modal input:focus,
.modal textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

.modal textarea {
    min-height: 100px;
    resize: vertical;
}

.modal button[type="submit"] {
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal button[type="submit"]:hover {
    background-color: #45a049;
}

/* Star Rating Input */
.rating-input {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.star-rating {
    display: flex;
    gap: 5px;
}

.star {
    font-size: 30px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
}

.star:hover,
.star.active {
    color: #ff9800;
}

.review-date {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background-color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    border-color: #4CAF50;
    background-color: #4CAF50;
    color: white;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-weight: 600;
    color: #666;
}

/* Responsive Design */

/* Large tablets */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .platform-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media (max-width: 768px) {
    .header-content {
        text-align: center;
        flex-direction: column;
    }
    
    .app-icon {
        margin: 0 auto;
    }
    
    .app-info {
        text-align: center;
        width: 100%;
    }
    
    .app-rating {
        justify-content: center;
    }
    
    .install-button {
        width: 100%;
        margin-top: 10px;
    }
    
    .app-stats {
        justify-content: space-around;
        padding: 15px;
    }
    
    .screenshots-container {
        scroll-snap-type: x mandatory;
    }
    
    .screenshot {
        scroll-snap-align: center;
        height: 300px;
        min-width: 180px;
    }
    
    .rating-summary {
        flex-direction: column;
        text-align: center;
    }
    
    .rating-overview {
        width: 100%;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .platform-buttons {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-direction: column;
        gap: 10px;
    }
    
    .page-btn {
        width: 100%;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
        padding: 20px;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .language-bar {
        padding: 8px 15px;
    }
    
    .language-bar select {
        font-size: 13px;
        padding: 6px 30px 6px 10px;
    }
    
    .app-header {
        padding: 15px;
    }
    
    .app-icon {
        width: 64px;
        height: 64px;
    }
    
    .app-name {
        font-size: 22px;
    }
    
    .app-developer {
        font-size: 13px;
    }
    
    .stars {
        font-size: 16px;
    }
    
    .install-button {
        padding: 10px 30px;
        font-size: 15px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .screenshots-section,
    .description-section,
    .features-section,
    .download-section,
    .reviews-section {
        padding: 15px;
    }
    
    .screenshots-section h2,
    .description-section h2,
    .features-section h2,
    .download-section h2,
    .reviews-section h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .screenshot {
        height: 250px;
        min-width: 150px;
    }
    
    .app-description {
        font-size: 14px;
    }
    
    .show-more {
        font-size: 14px;
    }
    
    .feature {
        padding: 12px;
        gap: 10px;
    }
    
    .feature-icon {
        width: 32px;
        height: 32px;
    }
    
    .feature-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .feature span:last-child {
        font-size: 14px;
    }
    
    .platform-btn {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .platform-btn img {
        width: 28px;
        height: 28px;
    }
    
    .rating-summary {
        padding: 15px;
    }
    
    .average-rating {
        font-size: 36px;
    }
    
    .rating-stars {
        font-size: 18px;
    }
    
    .write-review-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .review {
        padding: 15px;
    }
    
    .page-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .page-info {
        font-size: 14px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .app-name {
        font-size: 20px;
    }
    
    .app-icon {
        width: 56px;
        height: 56px;
    }
    
    .screenshot {
        height: 200px;
        min-width: 130px;
    }
    
    .average-rating {
        font-size: 32px;
    }
}