
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --dark-bg: #0f0f1a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --transition: all 0.3s ease;

    --arabic-font-primary: 'Almarai', 'Segoe UI', sans-serif;
    --arabic-font-secondary: 'Amiri', serif;
}


body{
font-family: var(--arabic-font-primary);
font-weight: 700;
line-height: 1.8;

}
.game-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: var(--dark-bg);
}

/* رأس اللعبة */
.game-header {
    display: grid;
    grid-template-columns: 200px 1fr;
    margin-bottom: 40px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}
.game-cover {
    display: flex;
    align-items: flex-start;
}

.cover-image {
    width: 50%;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: var(--transition);
}

.game-info {
    display: flex;
    flex-direction: column;
}

.game-title {
    font-size: 2.5rem;
    margin: 0;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: var(--arabic-font-primary);
}


/* معلومات المطور */
.developer-info {
    display: flex;
    align-items: center;
    
}
.uploaded-by-text {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-left:2px;
}

.developer-link {
    display: flex;
    align-items: center;
    padding: 2px 5px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 5px;
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.developer-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

.developer-avatar {
    font-size: 1.2rem;
}


.game-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.meta-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.meta-badge.category {
    background: var(--primary-color);
    color: white;
}

.meta-badge.rating {
    background: var(--warning-color);
    color: #000;
}

.meta-badge.plays {
    background: #6c757d;
    color: white;
}

.meta-badge.likes {
    background: #e83e8c;
    color: white;
}

.meta-badge.featured {
    background: var(--danger-color);
    color: white;
}

/* أزرار التفاعل الرئيسية */
.game-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    align-items: center;
}

.play-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition);
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.play-btn:hover::before {
    left: 100%;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.like-btn.liked {
    background: #e83e8c;
    color: white;
    border-color: #e83e8c;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* إحصائيات سريعة */
.quick-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* أزرار تفاعل إضافية */
.quick-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    font-weight: 600;
}

.quick-action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

/* قائمة المشاركة */
.share-dropdown {
    position: relative;
}

.share-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 5px;
    min-width: 120px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.share-dropdown:hover .share-menu {
    display: flex;
}

.share-option {
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 5px;
    transition: var(--transition);
    text-align: right;
}

.share-option:hover {
    background: var(--primary-color);
}

/* بقية الأنماط تبقى كما هي */
/* ... (استمرار الأنماط السابقة) ... */

/* قسم معرض الصور */
.screenshots-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

/* الصورة الرئيسية */
.cover-image-container {
    text-align: center;
    margin-bottom: 30px;
}

.main-cover-image {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: var(--transition);
    cursor: pointer;
}

.main-cover-image:hover {
    transform: scale(1.02);
}

/* شبكة صور كيفية اللعب */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.screenshot-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.screenshot-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.screenshot-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: var(--transition);
}

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

.screenshot-caption {
    padding: 15px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Lightbox محسن */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.close-btn {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2001;
}

.close-btn:hover {
    background: var(--danger-color);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2001;
}

.lightbox-nav:hover {
    background: var(--primary-color);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

#lightbox-caption {
    color: white;
    margin-top: 15px;
    font-size: 1.1rem;
    text-align: center;
}

/* قسم التقييمات */
.reviews-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}
.ratings{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.add-review {
    border-radius: 10px;
    margin-bottom: 30px;
    
}


.star-label {
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.star-label:hover {
    background: rgba(255, 215, 0, 0.1);
}

.star-label input {
    display: none;
}

.star-label input:checked ~ .star {
    transform: scale(1.2);
    filter: brightness(1.2);
}

.star-number {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.comment-input {
    margin-bottom: 20px;
}

.comment-input label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.comment-input textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    resize: vertical;
    font-family: inherit;
    transition: var(--transition);
}

.comment-input textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.char-count {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.submit-review-btn {
    background: var(--success-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.submit-review-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition);
}

.submit-review-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.submit-review-btn:hover::before {
    left: 100%;
}

/* إحصائيات التقييمات */
.ratings-summary {
    margin-bottom: 30px;
    padding: 20px;
    
}

.average-rating {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.rating-score{
  font-size: 1.5rem;
    font-weight: bold;
}
.score {
    font-size: 2rem;
    font-weight: bold;
    color: var(--warning-color);
}

.rating-stars {
    font-size: 1.5rem;
}

.rating-count {
    color: var(--text-secondary);
}
.rating-bars {
  display: flex;
  flex-direction: column;
  gap: 15px;
  justify-content: center;
}

.rating-bar-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.rating-number {
  color: var(--gray-light);
  font-size: 0.9rem;
  min-width: 70px;
}

.rating-bar {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 100%);
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}
/* اختيار النجوم */
.rating-input {
}

.stars-selector {
  display: flex;
  justify-content: center;
}

.star-radio {
  display: none;
}

.star-label {
  cursor: pointer;
  border-radius: 80px;
  transition: all 0.3s ease;
  text-align: center;
  flex: 1;
}

.star-label:hover {
  background: rgba(255, 255, 255, 0.1);
}

.star-radio:checked + .star-label {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid var(--primary);
}

.star-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 5px;
}

.star-text {
  font-size: 0.8rem;
  color: var(--gray);
}

.star-radio:checked + .star-label .star-icon {
  color: var(--secondary);
}

.star-radio:checked + .star-label .star-text {
  color: var(--light);
}

.rating-preview {
  text-align: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-weight: 600;
  color: var(--light);
}


/* قائمة التقييمات */
.review-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.review-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    font-size: 1.2rem;
}

.user-name {
    font-weight: 600;
    color: var(--primary-color);
}

.your-review-badge {
    background: var(--success-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.review-rating {
    font-size: 1.1rem;
}

.review-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.review-comment {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.no-reviews {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.no-reviews-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* رسائل التنبيه */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.alert-error {
    background: rgba(220, 53, 69, 0.1);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

/* التصميم المتجاوب */
@media (max-width: 768px) {
    .game-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }
    
    .cover-image {
        height: 150px;
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    .game-actions {
        justify-content: center;
    }
    
    .quick-stats {
        justify-content: center;
    }
    
    .quick-actions {
        justify-content: center;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .review-meta {
        width: 100%;
        justify-content: space-between;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .submit-review-btn {
        width: 100%;
    }
    
    .screenshots-grid {
        grid-template-columns: 1fr;
    }
    
    .screenshot-image {
        height: 150px;
    }
    
    .lightbox-content {
        max-width: 95%;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
}
/* أنماط جديدة للتصميم المعدل */

/* رأس اللعبة الجديد */


.stat-item-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-item-compact:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 1.2rem;
}

.stat-value {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* زر الإعجاب المدمج */
.like-btn-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.like-btn-compact.liked {
    color: #e83e8c;
}

.like-btn-compact:hover {
    transform: scale(1.1);
}

/* قسم صورة الغلاف */
.cover-section-new {
    margin-bottom: 30px;
}

.cover-image-wrapper {
    position: relative;
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.game-cover-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: var(--transition);
}

.cover-image-wrapper:hover .game-cover-image {
    transform: scale(1.02);
}

/* زر التشغيل على الصورة */
.play-btn-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.play-btn-overlay:hover {
    background: white;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.play-triangle {
    width: 0;
    height: 0;
    border-left: 20px solid var(--primary-color);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 5px;
}

/* قسم محتوى اللعبة */
.game-content-section {
    
}
.content-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

/* شرح اللعبة */
.game-description {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 10px;
    transition: var(--transition);
}

.game-description.collapsed {
    max-height: 120px;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.read-more-btn {
    background: transparent;
    color: var(--primary-color);
    border: none;
    cursor: pointer;
    font-weight: 600;
    padding: 5px 0;
    transition: var(--transition);
}

.read-more-btn:hover {
    color: var(--secondary-color);
}



.read-more-btn {
    background: transparent;
    color: var(--primary-color);
    border: none;
    cursor: pointer;
    font-weight: 600;
    padding: 8px 0;
    transition: var(--transition);
    font-size: 1rem;
}

.read-more-btn:hover {
    color: var(--secondary-color);
}

/* أزرار التحكم الجديدة */
.control-actions-new {
    display: flex;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.share-dropdown-new {
    position: relative;
}

.action-btn-new {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 1rem;
}

.action-btn-new:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.share-menu-new {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 5px;
    margin-top: 5px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.share-dropdown-new:hover .share-menu-new {
    display: flex;
}

/* التصميم المتجاوب */
@media (max-width: 768px) {
    .game-header{
    display: grid;
    grid-template-columns: 100px 1fr;
    margin-bottom: 40px;
    background: var(--card-bg);
    padding: 8px;
    border-radius: 1px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    
    }
  .game-cover {
    width:100%;
    display: ;
    align-items:;
}
.cover-image {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 0px 0px rgba(0,0,0,0.3);
    transition: var(--transition);
    
}
  
    .game-info{

    }
    .game-title {
        font-size: 1.5rem;
        
    }
    
    .developer-info {
      font-size: 0.5rem;
        justify-content: center;
        
    }
    
    .game-stats-compact {
        justify-content: center;
    }
    
    .game-cover-image {
        height: 300px;
    }
    
    .play-btn-overlay {
        width: 70px;
        height: 70px;
    }
    
    .play-triangle {
        border-left: 16px solid var(--primary-color);
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
    }
    
    .content-title {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}
  .game-description {
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 10px;
    transition: var(--transition);
}
.game-content-section {
    
}
}

@media (max-width: 480px) {
    .game-stats-compact {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stat-item-compact {
        justify-content: center;
    }
}

/* تنسيقات قسم الردود */
.replies-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.show-replies-btn, .add-reply-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    margin-right: 15px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s;
}

.show-replies-btn:hover, .add-reply-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.show-replies-btn.active {
    background: #007bff;
    color: white;
}

.replies-list {
    margin: 10px 0;
    padding-left: 20px;
    border-left: 3px solid #f0f0f0;
}

.reply-item {
    background: #f9f9f9;
    padding: 10px 15px;
    margin: 8px 0;
    border-radius: 8px;
    border-right: 3px solid #007bff;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.reply-text {
    margin: 0;
    color: #555;
    line-height: 1.4;
}

.add-reply-form {
    margin-top: 10px;
}

.reply-input textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    font-family: inherit;
}

.reply-actions {
    margin-top: 8px;
    display: flex;
    gap: 10px;
}

.submit-reply-btn, .cancel-reply-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.submit-reply-btn {
    background: #28a745;
    color: white;
}

.cancel-reply-btn {
    background: #6c757d;
    color: white;
}

.no-replies {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 10px;
}


/* تنسيقات قسم التعليقات الجديد */
.comments-section {
    margin-top: 40px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.comment-thread {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.comment-thread:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.comment-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.comment-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

.main-comment {
    border-left: 4px solid var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.reply{
  display: grid;
  grid-template-columns: 20px 1fr;
}
.reply-indicator {
    color: var(--text-secondary);
    font-size: 1.2rem;
    width: 30px;
}

.reply-comment {
    display: flex;
    align-items: flex-start;
    margin-right: 30px;
    background: rgba(255, 255, 255, 0.01);
}

.reply-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    font-size: 1.1rem;
}

.user-name {
    font-weight: 600;
    color: var(--primary-color);
}

.your-comment-badge {
    background: var(--success-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-date {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.comment-text {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 10px 0;
    font-size: 0.95rem;
}

/* أزرار الرد */
.reply-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.reply-toggle-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.reply-icon {
    font-size: 0.9rem;
}

/* نموذج الرد */
.reply-form-container {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.reply-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    resize: vertical;
    font-family: inherit;
    transition: var(--transition);
}

.reply-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.reply-form .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.submit-reply-btn {
    background: var(--success-color);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.submit-reply-btn:hover {
    background: #218838;
}

.cancel-reply-btn {
    background: var(--danger-color);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.cancel-reply-btn:hover {
    background: #c82333;
}

/* حالة عدم وجود تعليقات */
.no-comments {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.no-comments-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* التصميم المتجاوب */
@media (max-width: 768px) {
    .comments-section {
        padding: 20px;
    }
    
    .reply-comment {
        margin-left: 15px;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .comment-meta {
        width: 100%;
        justify-content: space-between;
    }
    
    .reply-form .form-actions {
        flex-direction: column;
    }
    
    .submit-reply-btn,
    .cancel-reply-btn {
        width: 100%;
    }
}