*{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            background: white;
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
            overflow: hidden;
        }

        .header {
            background: #673ab7;
            color: white;
            padding: 20px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .header h1 {
            font-size: 24px;
        }

        .upload-btn {
            background: #9c27b0;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: background 0.3s;
        }

        .upload-btn:hover {
            background: #7b1fa2;
        }

        .presets-list {
            max-height: calc(100vh - 300px);
            overflow-y: auto;
            padding: 20px;
        }

        .preset-item {
            background: #f5f5f5;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 15px;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .preset-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .preset-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 10px;
        }

        .preset-info h3 {
            color: #333;
            margin-bottom: 8px;
            font-size: 18px;
        }

        .preset-details {
            color: #666;
            font-size: 14px;
            line-height: 1.6;
        }

        .preset-controls {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .control-btn {
            background: #673ab7;
            color: white;
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.3s;
            font-size: 16px;
        }

        .control-btn:hover {
            background: #5e35b1;
        }

        .control-btn:disabled {
            background: #ccc;
            cursor: not-allowed;
        }

        .play-btn {
            background: #4caf50;
        }

        .play-btn:hover {
            background: #45a049;
        }

        .play-btn.playing {
            background: #ff9800;
        }

        .play-btn.playing:hover {
            background: #fb8c00;
        }

        .edit-btn {
            background: #2196f3;
        }

        .edit-btn:hover {
            background: #1976d2;
        }

        .delete-btn {
            background: #f44336;
        }

        .delete-btn:hover {
            background: #d32f2f;
        }

        .status-bar {
            background: #e0e0e0;
            padding: 15px 30px;
            border-top: 1px solid #ccc;
            font-weight: 600;
            color: #333;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: white;
            border-radius: 12px;
            padding: 30px;
            max-width: 500px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
        }

        .modal-header {
            font-size: 22px;
            margin-bottom: 20px;
            color: #333;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: #555;
            font-weight: 500;
        }

        .form-group input {
            width: 100%;
            padding: 12px;
            border: 2px solid #e0e0e0;
            border-radius: 6px;
            font-size: 14px;
            transition: border-color 0.3s;
        }

        .form-group input:focus {
            outline: none;
            border-color: #673ab7;
        }

        .modal-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            margin-top: 20px;
        }

        .btn {
            padding: 12px 24px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            transition: background 0.3s;
        }

        .btn-primary {
            background: #673ab7;
            color: white;
        }

        .btn-primary:hover {
            background: #5e35b1;
        }

        .btn-secondary {
            background: #e0e0e0;
            color: #333;
        }

        .btn-secondary:hover {
            background: #d0d0d0;
        }

        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #999;
        }

        .empty-state svg {
            width: 80px;
            height: 80px;
            margin-bottom: 20px;
            opacity: 0.5;
        }

        input[type="file"] {
            display: none;
        }

        .fab {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 60px;
            height: 60px;
            background: #673ab7;
            border-radius: 50%;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            transition: transform 0.3s, box-shadow 0.3s;
        }

        .fab:hover {
            transform: scale(1.1);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
        }

        .audio-duration {
            font-size: 12px;
            color: #999;
            margin-top: 4px;
        }
 /* شريط التحكم */
/* شريط التحكم */
/* الشريط نفسه شفاف بالكامل */
#titlebar {
  width: 100%;              /* يغطي عرض النافذة */
  height: 36px;             /* على قد الأزرار */
  display: flex;
  justify-content: flex-end; /* يحرك المحتوى لليمين */
  align-items: center;
  margin-bottom: 14px;  /* مسافة صغيرة تحت الشريط */
  padding: 0 5px;            /* مسافة صغيرة من الجوانب */
  background: transparent;    /* شفاف بالكامل */
  border: none;               /* بدون حدود */
  -webkit-app-region: drag;   /* يسمح بسحب النافذة */
}

/* div داخلي فقط خلف الأزرار لو عايز خلفية داكنة */
#buttons {
  display: flex;
  gap: 6px;                   /* مسافة بين الأزرار */
  /* الخلفية داكنة للأزرار فقط */
  background: rgba(0,0,0,0.5);
  padding: 2px;
  border-radius: 5px;
}
