:root {
  --color-text: #333;
  --color-bg: #fff;
  --color-border: #e0e0e0;
  --color-hover-bg: #f5f5f5;
  --color-accent: #4CAF50;
  --color-down: #F44336;
  --shadow-light: rgba(0, 0, 0, 0.05);
  --font-base: 'Helvetica Neue', Arial, sans-serif;
  --radius: 6px;
  --spacing: 0.75rem;
}

/* عام: زرار التصويت */
.vote-container {
  display: flex;
  align-items: center;
  gap: var(--spacing);
  font-size: 0.8rem;
  color: #444;
}

.vote-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  user-select: none;
  border-radius: var(--radius);
  transition: color 0.2s, background-color 0.2s, transform 0.2s;
}

.vote-btn.up {
  background-color: rgba(76, 175, 80, 0.2);
  color: #2e7d32;
}

.vote-btn.down {
  background-color: rgba(244, 67, 54, 0.2);
  color: #d32f2f;
}

.vote-btn.up:hover {
  color: var(--color-accent);
  background-color: rgba(76, 175, 80, 0.1);
  transform: translateY(-2px);
}

.vote-btn.down:hover {
  color: var(--color-down);
  background-color: rgba(244, 67, 54, 0.1);
  transform: translateY(2px);
}

.vote-btn.up.active {
  color: var(--color-accent);
  background-color: rgba(76, 175, 80, 0.15);
}

.vote-btn.down.active {
  color: var(--color-down);
  background-color: rgba(244, 67, 54, 0.15);
}

.count {
  margin: 0 0.25rem;
  font-weight: 600;
  font-size: 0.85rem;
}

/* القائمة: عرض محدود ومحاذاة في الوسط */
.bold-list {
  list-style: none;
  margin: 1rem auto;
  padding: 0 0.5rem;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  font-family: var(--font-base);
  color: var(--color-text);
}

@media (max-width: 768px) {
  .bold-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .bold-list {
    grid-template-columns: 1fr;
  }
}

.bold-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  transition: background-color 0.3s, box-shadow 0.3s;
  min-height: auto;
  line-height: 1.2;
}

.bold-list li:hover {
  background-color: var(--color-hover-bg);
  box-shadow: 0 2px 6px var(--shadow-light);
}

.bold-list .vote-container {
  margin-left: 1rem;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

/* جدول نصي أنيق */
.bold-table {
  width: 100%;
  border-collapse: collapse;
  margin: 25px 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  font-family: var(--font-base);
}

.bold-table th {
  background-color: var(--color-accent);
  color: #fff;
  text-align: center;
  padding: 12px;
  font-weight: bold;
  font-size: 0.9rem;
}

.bold-table td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.bold-table tr:last-child td {
  border-bottom: none;
}

.bold-table tr:nth-child(even) {
  background-color: #fafafa;
}

.bold-table tr:hover {
  background-color: #f1f1f1;
}

/* كروت بشاشة عائمة */
.bold-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.bold-card .vote-container {
  margin-top: auto;
  justify-content: center;
}

/* شبكة كروت */
.grid,
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  margin: 25px 0;
}

.bold-grid,
.bold-card {
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-align: center;
  background-color: var(--color-bg);
  font-family: var(--font-base);
  font-size: 0.85rem;
  position: relative;
  box-shadow: 0 2px 5px var(--shadow-light);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 80px;
}

.bold-grid .vote-container,
.bold-card .vote-container {
  position: static;
  margin-top: 10px;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

/* زر التوليد */
#generateBtn {
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 12px 24px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

#generateBtn:hover {
  background-color: #0069d9;
}
/* تخصيص متقدم لمنطقة الإرسال */
.vr-submission-box {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.vr-submission-box:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.vr-submission-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.vr-submission-input:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04), 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.vr-submission-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.vr-submission-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.25);
}

.vr-submission-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.vr-submission-btn:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.vr-submission-thanks {
    color: #10b981;
    font-weight: 600;
    margin-left: 12px;
    font-size: 15px;
}

.pending-submission {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px dashed #f59e0b !important;
    color: #92400e;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    font-style: italic;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

/* تأثيرات الضغط على العناصر عند النقر للنسخ */
ul.bold-list > li, .bold-grid, .bold-card, .bold-table td {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

ul.bold-list > li:active, .bold-grid:active, .bold-card:active, .bold-table td:active {
    transform: scale(0.97);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

/* تأثير النسخ المخصص */
@keyframes pressCopy {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
    50% { 
        transform: scale(0.97);
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.2);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.copied-effect {
    animation: pressCopy 0.6s ease;
    background-color: rgba(59, 130, 246, 0.1) !important;
}

/* نص "Copied" الذي يظهر عند النسخ */
.copied-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(16, 185, 129, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    z-index: 100;
    animation: fadeInOut 1s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

/* تحسين تأثير الـ hover */
ul.bold-list > li:hover, .bold-grid:hover, .bold-card:hover, .bold-table td:hover {
    background-color: #f8f9fa !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* تلميح عند التواجد فوق العنصر */
ul.bold-list > li:hover::after, 
.bold-grid:hover::after, 
.bold-card:hover::after, 
.bold-table td:hover::after {
    content: "Click to copy";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
}

ul.bold-list > li:hover::before,
.bold-grid:hover::before,
.bold-card:hover::before,
.bold-table td:hover::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
    z-index: 100;
    pointer-events: none;
}

/* الإشعارات */
.vr-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    min-width: 280px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.vr-notification-visible {
    opacity: 1;
    transform: translateX(0);
}

.vr-notification-success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.vr-notification-error {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
}

.vr-notification-warning {
    background: linear-gradient(135deg, #ffc107, #ff922b);
    color: #212529;
}

.vr-notification-info {
    background: linear-gradient(135deg, #17a2b8, #339af0);
}

.vr-notification-icon {
    margin-right: 12px;
    font-weight: bold;
    font-size: 18px;
}