/* ============================================
   أداة دمج الملفات - حميز نت
   تصميم متطابق مع الموقع الرئيسي
   ============================================ */

:root {
    /* الألوان الرئيسية */
    --primary: #00a651;
    --primary-dark: #006837;
    --primary-light: #22c55e;
    --primary-gradient: linear-gradient(135deg, #00a651, #22c55e);

    /* الألوان الثانوية */
    --secondary: #3399ff;
    --accent: #ffd700;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --info: #0ea5e9;

    /* ألوان الخلفية */
    --background: #000000;
    --background-secondary: #111111;
    --background-tertiary: #1a1a1a;
    --background-card: #1e1e1e;

    /* ألوان النص */
    --text: #ffffff;
    --text-muted: #cccccc;
    --text-secondary: #b3b3b3;

    /* ألوان الحدود */
    --border: #333333;
    --border-light: #404040;

    /* الظلال */
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.5);
    --shadow-primary: 0 8px 25px rgba(0, 166, 81, 0.3);

    /* القياسات */
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: 0.3s ease;

    /* الزجاج المضبب */
    --glass-bg: rgba(26, 26, 26, 0.9);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, var(--background-secondary) 50%, var(--background) 100%);
    color: var(--text);
    min-height: 100vh;
    padding: 2rem;
    direction: rtl;
    position: relative;
    overflow-x: hidden;
}

/* خلفية متحركة */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 20%, rgba(0, 166, 81, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(51, 153, 255, 0.1) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundFloat 20s ease-in-out infinite;
}

@keyframes backgroundFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.header {
    text-align: center;
    color: var(--text);
    margin-bottom: 3rem;
    animation: fadeIn 0.6s ease;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header h1 i {
    color: var(--primary);
    -webkit-text-fill-color: var(--primary);
}

.header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    margin-bottom: 2rem;
    transition: all var(--transition);
    animation: slideUp 0.6s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-primary);
    border-color: rgba(0, 166, 81, 0.3);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title i {
    color: var(--accent);
    font-size: 1.75rem;
}

.upload-area {
    border: 2px dashed var(--primary);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 1rem;
    transition: all var(--transition);
    cursor: pointer;
    background: rgba(0, 166, 81, 0.05);
}

.upload-area:hover {
    border-color: var(--primary-light);
    background: rgba(0, 166, 81, 0.1);
    transform: scale(1.02);
}

.upload-area.dragover {
    border-color: var(--accent);
    background: rgba(255, 215, 0, 0.1);
    transform: scale(1.05);
}

.upload-area i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
}

.upload-area p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 0;
}

input[type="file"] {
    display: none;
}

.file-info {
    background: rgba(0, 166, 81, 0.05);
    border: 1px solid rgba(0, 166, 81, 0.2);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
    display: none;
    animation: fadeIn 0.3s ease;
}

.file-info.show {
    display: block;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
    transition: all var(--transition);
}

.file-item:hover {
    border-color: var(--primary);
    transform: translateX(-5px);
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-primary);
}

.file-name {
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
}

.btn {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 166, 81, 0.4);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 166, 81, 0.4);
}

.btn-warning {
    background: var(--warning);
    color: var(--background);
}

.btn-warning:hover {
    background: #ea580c;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

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

.actions .btn {
    flex: 1;
    min-width: 200px;
}

.alert {
    padding: 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: none;
    animation: slideDown 0.3s ease;
    border-left: 4px solid;
}

.alert.show {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    border-color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-color: var(--danger);
}

.alert-info {
    background: rgba(14, 165, 233, 0.15);
    color: var(--info);
    border-color: var(--info);
}

.alert i {
    font-size: 1.5rem;
}

.stored-file {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
    display: none;
    animation: fadeIn 0.3s ease;
}

.stored-file.show {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--border);
    border-radius: 5px;
    overflow: hidden;
    margin: 1.5rem 0;
    display: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar.show {
    display: block;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(0, 166, 81, 0.5);
}

/* خيارات المعالجة */
.cleanup-options {
    background: rgba(0, 166, 81, 0.05);
    border: 1px solid rgba(0, 166, 81, 0.2);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
}

.option-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.option-header i {
    font-size: 1.5rem;
    color: var(--accent);
}

.option-description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 1rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--background-card);
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition);
}

.radio-option:hover {
    border-color: var(--primary);
    background: rgba(0, 166, 81, 0.05);
    transform: translateX(-5px);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: var(--primary);
    background: var(--primary);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    transform: scale(1);
}

.radio-option input[type="radio"]:checked ~ .radio-content .radio-title {
    color: var(--primary);
}

.radio-option:has(input[type="radio"]:checked) {
    border-color: var(--primary);
    background: rgba(0, 166, 81, 0.1);
    box-shadow: 0 0 20px rgba(0, 166, 81, 0.2);
}

.radio-custom {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all var(--transition);
}

.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.radio-content {
    flex: 1;
}

.radio-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color var(--transition);
}

.radio-title i {
    color: var(--primary);
}

.radio-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.cleanup-details {
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
    display: block;
    animation: fadeIn 0.3s ease;
}

.details-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.details-title i {
    color: var(--info);
}

.cleanup-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cleanup-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 166, 81, 0.05);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: all var(--transition);
}

.cleanup-item:hover {
    background: rgba(0, 166, 81, 0.1);
    transform: translateX(-3px);
}

.cleanup-item i {
    color: var(--success);
    font-size: 1rem;
}

.cleanup-item strong {
    color: var(--primary);
    font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .header p {
        font-size: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .upload-area i {
        font-size: 2.5rem;
    }

    .actions {
        flex-direction: column;
    }

    .actions .btn {
        width: 100%;
        min-width: auto;
    }

    .radio-option {
        padding: 1rem;
    }

    .radio-title {
        font-size: 1rem;
    }

    .cleanup-options {
        padding: 1.5rem;
    }

    .file-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.75rem;
    }

    .header h1 {
        font-size: 1.75rem;
    }

    .card {
        padding: 1rem;
    }

    .upload-area {
        padding: 1.5rem 1rem;
    }

    .cleanup-options {
        padding: 1rem;
    }

    .radio-option {
        padding: 0.875rem;
    }
}
