@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg-color: #09090b;
    --bg-card: rgba(24, 24, 27, 0.7);
    --bg-card-solid: #18181b;
    --bg-card-hover: rgba(39, 39, 42, 0.85);
    --primary-red: #e50914;
    --primary-hover: #b20710;
    --primary-glow: rgba(229, 9, 20, 0.25);
    --text-light: #f4f4f5;
    --text-muted: #a1a1aa;
    --text-dark: #71717a;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(229, 9, 20, 0.4);
    --border-solid: #27272a;
    --success: #10b981;
    --success-hover: #059669;
    --success-glow: rgba(16, 185, 129, 0.2);
    --font-heading: 'Outfit', 'Segoe UI', sans-serif;
    --font-body: 'Inter', sans-serif;
    --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 15px rgba(229, 9, 20, 0.2);
}

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

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(229, 9, 20, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(229, 9, 20, 0.03) 0%, transparent 40%);
    color: var(--text-light);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #09090b;
}
::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-red);
}


/* Header container */

header {
    background-color: #000000;
    border-bottom: 2px solid #e50914;
    padding: 15px 20px;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Yeh logo ko left aur buttons ko right karega */
    max-width: 1200px;
    margin: auto;
}

.logo-box {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    font-size: 28px; /* Wahi font size jo pehle tha */
    font-weight: 900;
}

.nav-logo {
    height: 40px; /* Logo ka size */
    margin-right: 15px;
}

.site-name span { color: #e50914; }

.nav-links a {
    color: #ffffff; /* Button white color */
    text-decoration: none;
    margin-left: 25px;
    font-size: 18px;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #e50914; /* Hover par red color */
}




.logo span {
    color: var(--primary-red);
    text-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

.status-badge {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-badge .dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Main Container */
main {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    flex-grow: 1;
    width: 100%;
}

.hero {
    text-align: center;
    margin-bottom: 50px;
}

h1 {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* Tools Menu Grid */
.tools-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 40px;
}

.tool-btn {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 16px 12px;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tool-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: transform 0.3s;
}

.tool-btn:hover {
    border-color: var(--border-hover);
    background-color: var(--bg-card-hover);
    color: var(--primary-red);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.tool-btn:hover svg {
    transform: scale(1.1);
}

.tool-btn.active {
    border-color: var(--primary-red);
    background-color: rgba(229, 9, 20, 0.15);
    color: var(--text-light);
    box-shadow: var(--shadow-glow), inset 0 0 8px rgba(229,9,20,0.1);
}

/* Dynamic Workspace Section */
.workspace {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 16px;
    display: none;
    box-shadow: var(--shadow-main);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.workspace.active {
    display: block;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.workspace h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.workspace h2 svg {
    width: 28px;
    height: 28px;
    fill: var(--primary-red);
}

.workspace-desc {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 30px;
}

/* Drag & Drop Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-solid);
    padding: 40px 20px;
    border-radius: 12px;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary-red);
    background: rgba(229, 9, 20, 0.03);
    box-shadow: inset 0 0 12px rgba(229, 9, 20, 0.05);
}

.upload-icon {
    width: 48px;
    height: 48px;
    fill: var(--text-muted);
    transition: fill 0.3s, transform 0.3s;
}

.upload-zone:hover .upload-icon, .upload-zone.dragover .upload-icon {
    fill: var(--primary-red);
    transform: translateY(-5px);
}

.upload-zone p {
    font-size: 16px;
    font-weight: 500;
}

.upload-zone span {
    color: var(--text-dark);
    font-size: 13px;
}

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

.upload-label {
    background-color: var(--primary-red);
    color: white;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    display: inline-block;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(229,9,20,0.3);
}

.upload-label:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(229,9,20,0.4);
}

/* File Manager Table/List */
.file-list-container {
    margin-top: 25px;
    border: 1px solid var(--border-solid);
    border-radius: 8px;
    overflow: hidden;
    display: none;
    background: rgba(0,0,0,0.15);
}

.file-list-header {
    background: rgba(255,255,255,0.03);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-solid);
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1.5fr;
    align-items: center;
}

.file-row {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-solid);
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1.5fr;
    align-items: center;
    font-size: 14px;
    transition: background 0.2s;
}

.file-row:last-child {
    border-bottom: none;
}

.file-row:hover {
    background: rgba(255,255,255,0.02);
}

.file-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-name svg {
    width: 16px;
    height: 16px;
    fill: var(--primary-red);
    flex-shrink: 0;
}

.file-size, .file-pages {
    color: var(--text-muted);
}

.file-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.action-icon-btn {
    background: transparent;
    border: 1px solid var(--border-solid);
    color: var(--text-light);
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.action-icon-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.action-icon-btn:hover {
    background: var(--border-solid);
}

.action-icon-btn.btn-delete:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Configuration Panels */
.config-section {
    margin-top: 25px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-solid);
    border-radius: 8px;
    padding: 24px;
    display: none;
}

.config-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-solid);
    padding-bottom: 8px;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-control {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-solid);
    border-radius: 6px;
    color: white;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.3s;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.2);
}

/* Custom Watermark Control Layout */
.watermark-settings-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media(max-width: 768px) {
    .watermark-settings-panel {
        grid-template-columns: 1fr;
    }
}

/* Range Inputs */
.range-slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.range-slider-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    min-width: 35px;
    text-align: right;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-solid);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-red);
    cursor: pointer;
    transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Preset Options (Position Grid) */
.position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 150px;
}

.pos-btn {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-solid);
    border-radius: 4px;
    height: 40px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-btn:hover {
    border-color: var(--primary-red);
    background: rgba(229, 9, 20, 0.05);
}

.pos-btn.active {
    background: var(--primary-red);
    border-color: var(--primary-red);
}

.pos-btn.active svg {
    fill: white;
}

.pos-btn svg {
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
}

/* Page Rotator Grid */
.rotate-pages-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 20px;
    max-height: 350px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--border-solid);
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
}

.page-preview-card {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-solid);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
}

.page-preview-card:hover {
    border-color: var(--border-hover);
}

.page-thumbnail-placeholder {
    height: 100px;
    background: rgba(255,255,255,0.02);
    border: 1px dashed var(--border-solid);
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-dark);
    font-size: 11px;
    font-weight: 500;
    transition: transform 0.3s;
}

.page-thumbnail-placeholder svg {
    width: 24px;
    height: 24px;
    fill: var(--text-dark);
    margin-bottom: 4px;
}

.page-preview-card.rot-90 .page-thumbnail-placeholder { transform: rotate(90deg); }
.page-preview-card.rot-180 .page-thumbnail-placeholder { transform: rotate(180deg); }
.page-preview-card.rot-270 .page-thumbnail-placeholder { transform: rotate(270deg); }

.page-num-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.page-actions-inline {
    display: flex;
    justify-content: center;
    gap: 4px;
}

/* Action Execution Section */
.action-area {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.action-btn {
    background-color: var(--success);
    color: white;
    padding: 14px 36px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: none;
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
    transition: all 0.2s ease;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background-color: var(--success-hover);
    box-shadow: 0 6px 16px rgba(16,185,129,0.4);
    transform: translateY(-1px);
}

.action-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.process-msg {
    font-weight: 600;
    font-size: 15px;
    min-height: 24px;
    text-align: center;
    transition: all 0.3s;
}

/* Progress Bar indicator */
.progress-bar-container {
    width: 100%;
    max-width: 400px;
    height: 6px;
    background: var(--border-solid);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 5px;
    display: none;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--primary-red);
    transition: width 0.2s ease;
}

/* Footer */
footer {
    margin-top: 80px;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    background: rgba(0, 0, 0, 0.2);
}

.footer-links {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--primary-red);
}

/* Alert States */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}

.alert-info {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.alert-info svg {
    fill: #60a5fa;
    width: 18px;
    height: 18px;
}

/* Password input wrapper helper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-btn:hover {
    color: var(--text-muted);
}

.password-toggle-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
/* Logo aur Nav ka color fix */
.logo img {
    height: 40px !important;
}

.nav-links a {
    color: white !important;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #ff4500 !important;
}