/* ============================
   Base Styles
============================ */
body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================
   Tool Header
============================ */
.bg-tool {
    background-color: #E5322D;
    color: #fff;
    padding: 40px 20px;
    text-align: center;
    border-radius: 10px;
}

.bg-tool h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.bg-tool strong {
    font-size: 1rem;
    display: block;
    margin-top: 5px;
}

/* ============================
   Ads Section
============================ */
#ads {
    margin: 20px 0;
}

/* ============================
   Tool Area
============================ */
.toolarea-pdf {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Drag & Drop Area */
#dragDropArea {
    border: 2px dashed #CA0505;
    border-radius: 12px;
    padding: 40px 20px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
}

#dragDropArea:hover {
    background-color: rgba(232, 50, 45, 0.05);
    border-color: #E5322D;
}

#dragDropArea p {
    font-size: 1rem;
    margin: 10px 0 0;
}

.upload-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

#pdfInput {
  display: none;
}

/* Options / Buttons */
#options {
    display: none;
    text-align: center;
    margin-top: 20px;
}

#options button {
    background-color: #CA0505;
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s;
}

#options button:hover {
    background-color: #E5322D;
    transform: scale(1.05);
}

/* Select Dropdown */
#positionSelect {
    padding: 8px 12px;
    margin: 10px 0;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

/* Progress Bar */
#progressBar {
    width: 90%;
    height: 25px;
    background-color: #eee;
    border-radius: 50px;
    margin: 20px auto;
    overflow: hidden;
    display: none;
}


#uploadProgress {
  height: 8px;
  width: 0%;
  background-color: #3f51b5;
  transition: width 0.3s ease;
}


#progressBarFill {
    height: 100%;
    width: 0;
    background-color: #CA0505;
    border-radius: 50px;
    transition: width 0.3s;
}

/* Download Link */
#downloadLink {
    display: none;
    margin: 15px auto;
    padding: 12px 25px;
    background-color: #CA0505;
    color: #fff;
    border-radius: 50px;
    text-align: center;
    font-weight: bold;
    transition: transform 0.3s, background-color 0.3s;
}

#downloadLink:hover {
    background-color: #E5322D;
    transform: scale(1.05);
}

/* Success Message */
#successMessage {
    color: #28a745;
    margin-top: 15px;
    font-weight: bold;
}

/* ============================
   SEO / Content Section
============================ */
.text-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.section-heading {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.section-subheading {
  color: #555;
  font-size: 1.2rem;
}

.section-description {
  line-height: 1.6;
  color: #444;
  max-width: 800px;
  margin: 0 auto;
}

.text-section h2 {
    font-size: 1.75rem;
    margin-bottom: 10px;
    color: #E5322D;
}

.text-section h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.text-section p {
    font-size: 1rem;
    line-height: 1.6;
}

/* ============================
   Back To Top Button
============================ */
#backToTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    background-color: #E5322D;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px;
    font-size: 22px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, transform 0.3s;
}

#backToTopBtn.show {
    opacity: 1;
    visibility: visible;
}

#backToTopBtn:hover {
    background-color: #CA0505;
    transform: translateY(-3px);
}



/* Drag & Drop */
.drag-drop {
    border: 2px dashed #ccc;
    padding: 40px;
    border-radius: 10px;
    cursor: pointer;
    margin: 20px auto;
    max-width: 600px;
    transition: border 0.3s;
}

.drag-drop:hover {
    border-color: #D50E0F;
}

.upload-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}

/* Canvas */
#image-canvas {
    max-width: 100%;
    border: 1px solid #ccc;
    margin-bottom: 10px;
}

/* Buttons */
.btn-red {
    background-color: #D50E0F;
    color: #fff;
    padding: 8px 22px;
    border-radius: 50px;
    cursor: pointer;
    border: none;
    margin: 10px 0;
}

/* Progress bar */
#progress-bar {
    width: 90%;
    background-color: #f1f1f1;
    margin: 10px auto;
    border-radius: 50px;
    overflow: hidden;
    height: 25px;
}

#progress-fill {
    height: 100%;
    background-color: #D50E0F;
    width: 0%;
    text-align: center;
    line-height: 25px;
    color: #fff;
}

/* Options */
.options {
    margin: 10px 0;
}

.options label, .options select {
    margin: 0 10px 10px 0;
}


#text-content, #output {
  background-color: #f9f9f9;       /* خلفية فاتحة وواضحة */
  color: #222;                     /* لون نص غامق */
  border: 1px solid #ddd;          /* إطار ناعم */
  border-radius: 8px;              /* حواف ناعمة */
  padding: 15px;
  margin-top: 15px;
  white-space: pre-wrap;
  text-align: left;
  max-height: 400px;
  overflow-y: auto;                /* سكرول عمودي */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}



/* ============================
   Responsive
============================ */
@media (max-width: 768px) {
    .bg-tool h1 {
        font-size: 1.5rem;
    }
    .bg-tool strong {
        font-size: 0.9rem;
    }

    #downloadLink, #options button {
        width: 90%;
    }

    #dragDropArea {
        padding: 25px 10px;
    }
}

@media (max-width: 480px) {
    .bg-tool h1 {
        font-size: 1.3rem;
    }
    .bg-tool strong {
        font-size: 0.85rem;
    }
}
