/* Watermark PDF Tool */
.tool-breadcrumb { background: var(--gray-100); padding: 12px 0; }
.tool-breadcrumb .breadcrumb { margin: 0; font-size: 0.85rem; }
.tool-breadcrumb .breadcrumb-item a { color: var(--primary); }
.tool-header { padding: 50px 0 40px; background: linear-gradient(135deg, #e0f2f1, #b2dfdb); }
.tool-icon-large { width: 80px; height: 80px; border-radius: 20px; background: linear-gradient(135deg, #1abc9c, #16a085); display: inline-flex; align-items: center; justify-content: center; color: white; font-size: 2rem; margin-bottom: 20px; box-shadow: 0 8px 25px rgba(26,188,156,0.3); }
.tool-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.tool-desc { font-size: 1.05rem; color: var(--gray-600); max-width: 700px; margin: 0 auto; line-height: 1.7; }
.tool-workspace { padding: 40px 0 60px; }
.workspace-card { background: white; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); padding: 40px; max-width: 950px; margin: 0 auto; }

.upload-zone { border: 3px dashed var(--gray-300); border-radius: 16px; padding: 60px 30px; text-align: center; transition: all 0.3s; cursor: pointer; background: var(--gray-100); }
.upload-zone:hover, .upload-zone.dragover { border-color: #1abc9c; background: rgba(26,188,156,0.03); }
.upload-icon { font-size: 3.5rem; color: var(--gray-400); margin-bottom: 16px; }
.upload-zone:hover .upload-icon { color: #1abc9c; }
.upload-zone h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.upload-zone p { color: var(--gray-500); margin-bottom: 16px; }
.upload-hint { font-size: 0.8rem; color: var(--gray-500); margin-top: 16px; margin-bottom: 0; }
.btn-upload { background: #1abc9c; color: white; padding: 12px 28px; border-radius: 30px; font-weight: 600; cursor: pointer; }
.btn-upload:hover { background: #16a085; color: white; }

.opt-file-bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--gray-100); border-radius: 12px; margin-bottom: 20px; }
.opt-file-bar > i { font-size: 1.5rem; color: #e74c3c; }
.opt-file-bar strong { display: block; font-size: 0.9rem; }
.opt-file-bar span { font-size: 0.78rem; color: var(--gray-500); }
.opt-file-bar div { flex: 1; }

/* Tabs */
.wm-tabs { display: flex; gap: 0; margin-bottom: 20px; border: 2px solid var(--gray-200); border-radius: 12px; overflow: hidden; }
.wm-tab { flex: 1; padding: 12px; text-align: center; background: white; border: none; font-weight: 600; font-size: 0.88rem; color: var(--gray-600); cursor: pointer; transition: all 0.2s; }
.wm-tab:not(:last-child) { border-right: 2px solid var(--gray-200); }
.wm-tab.active { background: #1abc9c; color: white; }
.wm-panel { display: none; } .wm-panel.active { display: block; }

/* Text format bar */
.text-format-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.text-format-bar .form-control { border-radius: 8px; }
.fmt-btn { width: 36px; height: 36px; border: 2px solid var(--gray-200); border-radius: 8px; background: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; transition: all 0.2s; }
.fmt-btn:hover { border-color: var(--gray-400); }
.fmt-btn.active { border-color: #1abc9c; color: #1abc9c; background: rgba(26,188,156,0.05); }
.color-pick { width: 36px; height: 36px; border: 2px solid var(--gray-200); border-radius: 8px; padding: 2px; cursor: pointer; }

/* Image upload */
.img-upload-area { text-align: center; padding: 20px; border: 2px dashed var(--gray-200); border-radius: 12px; }
.img-preview { display: inline-block; position: relative; margin-bottom: 12px; }
.img-preview img { max-height: 100px; border-radius: 8px; border: 1px solid var(--gray-200); }
.img-preview button { position: absolute; top: -8px; right: -8px; }

/* Common options */
.common-opts { margin-top: 20px; padding-top: 20px; border-top: 2px solid var(--gray-200); }
.opts-row { display: flex; gap: 24px; flex-wrap: wrap; }
.opt-col { flex: 1; min-width: 250px; }

.pos-grid { display: grid; grid-template-columns: repeat(3, 40px); gap: 4px; margin-bottom: 10px; }
.pos-btn { width: 40px; height: 40px; border: 2px solid var(--gray-200); border-radius: 8px; background: white; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.pos-btn:hover { border-color: var(--gray-400); }
.pos-btn.active { border-color: #1abc9c; background: rgba(26,188,156,0.1); color: #1abc9c; }

.chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; padding: 6px 14px; border: 2px solid var(--gray-200); border-radius: 20px; cursor: pointer; font-size: 0.8rem; font-weight: 600; color: var(--gray-600); transition: all 0.2s; }
.chip:hover { border-color: var(--gray-400); }
.chip.active { border-color: #1abc9c; color: #1abc9c; background: rgba(26,188,156,0.05); }

.page-range-row { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; margin-bottom: 8px; }
.page-range-row .form-control { border-radius: 8px; }

.btn-convert { background: linear-gradient(135deg, #1abc9c, #16a085); color: white; padding: 16px 48px; border-radius: 30px; font-weight: 700; font-size: 1.05rem; border: none; box-shadow: 0 4px 20px rgba(26,188,156,0.35); transition: all 0.3s; }
.btn-convert:hover { transform: translateY(-2px); color: white; }

.progress-area { padding: 40px 20px; }
.spinner-wrapper { position: relative; width: 100px; height: 100px; margin: 0 auto 24px; }
.spinner { width: 100px; height: 100px; border: 4px solid var(--gray-200); border-top-color: #1abc9c; border-radius: 50%; animation: spin 1s linear infinite; }
.spinner-wrapper > i { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 2rem; color: #1abc9c; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-area h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.progress-bar-wrapper { max-width: 500px; margin: 0 auto; }
.progress-bar-wrapper .progress { height: 12px; border-radius: 10px; background: var(--gray-200); }
.progress-bar-wrapper .progress-bar { background: linear-gradient(90deg, #1abc9c, #2ecc71); border-radius: 10px; transition: width 0.3s; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; color: white; }

.download-area { padding: 40px 20px; }
.download-icon { font-size: 4rem; color: #2ecc71; margin-bottom: 20px; }
.download-area h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.download-area > p { color: var(--gray-600); margin-bottom: 24px; }
.btn-download { background: linear-gradient(135deg, #2ecc71, #27ae60); color: white; padding: 16px 40px; border-radius: 30px; font-weight: 700; display: inline-flex; align-items: center; transition: all 0.3s; box-shadow: 0 4px 20px rgba(46,204,113,0.35); }
.btn-download:hover { color: white; transform: translateY(-2px); }
.download-info { margin-top: 24px; }
.countdown-wrapper { font-size: 0.95rem; margin-bottom: 8px; }
.countdown-wrapper strong { color: var(--primary); font-size: 1.1rem; font-family: monospace; }
.download-warning { font-size: 0.82rem; color: var(--gray-500); }
.error-area { padding: 40px 20px; }
.error-icon { font-size: 4rem; color: var(--primary); margin-bottom: 20px; }

.tool-howto { padding: 60px 0; background: var(--gray-100); }
.tool-howto h2 { font-size: 1.6rem; font-weight: 800; }
.howto-step { text-align: center; padding: 24px; }
.howto-number { width: 48px; height: 48px; background: #1abc9c; color: white; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; margin-bottom: 16px; }
.howto-step h4 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.howto-step p { font-size: 0.9rem; color: var(--gray-600); line-height: 1.6; }

@media (max-width: 767.98px) { .workspace-card { padding: 24px 16px; } .upload-zone { padding: 40px 20px; } .btn-convert { width: 100%; } .tool-header h1 { font-size: 1.5rem; } .opts-row { flex-direction: column; } }
