/* Color Theme - Yellow */
:root {
    --primary-color: #FFDE21;
    --primary-dark: #FFD700;
    --primary-light: #FFEB59;
    --primary-gradient: linear-gradient(135deg, #FFDE21 0%, #FFD700 100%);
    --secondary-color: #F7D917;
    --text-color: #333;
    --text-light: #6c757d;
}

/* Dark Mode Color Scheme */
html.dark-mode {
    --text-color: #e0e0e0;
    --text-light: #b0b0b0;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

html.dark-mode body {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Tab styles */
.tab-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.tab-header {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.tab-button {
    flex: 1;
    padding: 20px;
    border: none;
    background: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
}

.tab-button:hover {
    background: #e9ecef;
    color: #495057;
}

.tab-button.active {
    background: white;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.tab-content {
    padding: 40px;
}

/* Service section styles */
.service-section {
    text-align: center;
}

.service-title {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.service-description {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 30px;
}

/* Upload area styles */
.upload-area {
    border: 3px dashed #dee2e6;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    margin: 30px 0;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: #e3f2fd;
    transform: scale(1.02);
}

.upload-area.disabled {
    pointer-events: none;
    opacity: 0.7;
    cursor: not-allowed;
}

.upload-area i {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 20px;
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #495057;
}

.upload-area p {
    color: #6c757d;
    margin-bottom: 20px;
}

/* Button styles */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,123,255,0.4);
}

.btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

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

.btn-secondary {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* File list styles */
.file-list {
    margin: 20px 0;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    font-size: 1.5rem;
}

.file-name {
    font-weight: 600;
    color: #495057;
}

.file-size {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Progress and result styles */
.progress {
    display: none;
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    background: #e3f2fd;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.progress.active {
    display: block;
}

.progress-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result {
    margin: 20px 0;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.result:empty {
    display: none;
}

.result h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.result p {
    margin: 0 0 30px 0;
    font-weight: 500;
    font-size: 1rem;
}

.result button {
    margin-top: 15px;
    min-width: 200px;
}

.result.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.result.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.result.error h3 {
    margin-bottom: 15px;
}

.result.error p {
    margin: 0 0 20px 0;
}

/* File info box styles */
.file-info-box {
    display: none;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

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

.file-info-box .file-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    word-break: break-all;
}

.file-info-box .file-size {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.file-info-box .remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.file-info-box .remove-btn:hover {
    background: #c82333;
}

/* Features grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature-card {
    background: white;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.feature-card h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.feature-card p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 50px;
    color: white;
    opacity: 0.8;
}

/* Ad Placeholder Styles */
.ad-slot {
    margin: 20px auto;
    text-align: center;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder {
    color: #6c757d;
    font-family: Arial, sans-serif;
    padding: 10px;
}

.ad-placeholder span {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.ad-placeholder small {
    font-size: 12px;
    color: #adb5bd;
}

/* Ad Sizes */
.ad-leaderboard {
    max-width: 728px;
    height: 90px;
}

.ad-medium-rectangle {
    max-width: 300px;
    height: 250px;
}

.ad-banner {
    max-width: 468px;
    height: 60px;
}

/* Hide all ad slots for now (do not delete - just hidden) */
.ad-slot {
    display: none !important;
}

.ad-skyscraper {
    width: 160px;
    height: 600px;
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Navigation Styles */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    gap: 16px;
    background: white;
    border-bottom: 3px solid var(--primary-color);
    border-radius: 0 0 25px 25px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.logo a {
    font-size: 1.35rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: #e74c3c;
    font-size: 1.8rem;
}

/* Nav drawer: contains menu (center) + dark mode (right) */
.nav-drawer {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.nav-menu {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    align-items: center;
}

.nav-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* Blog + theme toggle: same vertical center line as nav dropdowns */
.nav-actions .blog-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 6px 14px;
    margin: 0;
    line-height: 1.2;
    box-sizing: border-box;
}

.nav-actions .dark-mode-toggle {
    margin: 0;
    flex-shrink: 0;
}

.nav-link {
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    font-size: 0.9rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 2px solid transparent;
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 222, 33, 0.3);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
}

/* Dropdown Styles */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.dropdown-toggle:after {
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-toggle {
    background: var(--primary-light) !important;
    color: #333 !important;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background: white;
    min-width: 220px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    top: 100%;
    left: 0;
    z-index: 2000;
    border: 1px solid #e9ecef;
    overflow: hidden;
    animation: slideDown 0.2s ease;
    /* No gap: menu starts flush under trigger. Padding keeps hover over .nav-dropdown when moving slowly to submenu */
    padding-top: 8px;
}

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

.nav-dropdown:hover .dropdown-menu {
    display: block !important;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f3f5;
    white-space: nowrap;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover:not(.disabled) {
    background: var(--primary-light);
    color: #333;
    padding-left: 25px;
}

.dropdown-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: #f8f9fa;
}

.dropdown-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    background: transparent !important;
    border: 2px solid var(--primary-color) !important;
    border-radius: 50% !important;
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
    background: var(--primary-light) !important;
    transform: scale(1.1);
}

.dark-mode-toggle i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* ==================== DARK MODE STYLES ==================== */

/* Dark Mode Body */
html.dark-mode {
    color-scheme: dark;
}

/* Dark Mode Container Elements */
html.dark-mode .container {
    background: transparent;
}

/* Dark Mode Header */
html.dark-mode .site-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    border-bottom: 3px solid var(--primary-color);
    box-shadow: 0 2px 15px rgba(0,0,0,0.5);
}

html.dark-mode .main-nav {
    background: #1a1a1a;
    border-bottom-color: var(--primary-color);
}

html.dark-mode .logo a {
    color: var(--primary-color) !important;
}

html.dark-mode .nav-link {
    color: #e0e0e0 !important;
    border-radius: 30px;
}

html.dark-mode .nav-link:hover {
    background: var(--primary-color) !important;
    color: #333 !important;
    box-shadow: 0 4px 12px rgba(255, 222, 33, 0.4) !important;
}

/* Primary pill states use yellow background — use dark text in dark mode for contrast */
html.dark-mode .nav-link.active {
    color: #1a1a1a !important;
}

html.dark-mode .nav-link.active i {
    color: #1a1a1a !important;
}

html.dark-mode .dropdown-toggle:hover {
    background: var(--primary-light) !important;
    color: #333 !important;
}

html.dark-mode .dropdown-menu {
    background: #0f0f0f;
    border: 2px solid var(--primary-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
}

html.dark-mode .dropdown-item {
    color: #e0e0e0;
    border-bottom-color: #333;
}

html.dark-mode .dropdown-item i {
    color: var(--primary-color);
}

html.dark-mode .dropdown-item:hover:not(.disabled) {
    background: var(--primary-color);
    color: #333;
}

html.dark-mode .dropdown-item:hover:not(.disabled) i {
    color: #333 !important;
}

html.dark-mode .dropdown-item.disabled {
    background: #1a1a1a;
    color: #666;
}

/* Dark Mode Cards and Containers */
html.dark-mode .tool-card {
    background: #2a2a2a;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

html.dark-mode .tool-card:hover {
    box-shadow: 0 15px 40px rgba(255, 222, 33, 0.1);
}

html.dark-mode .tool-card h3 {
    color: #e0e0e0;
}

html.dark-mode .tool-card p {
    color: #b0b0b0;
}

html.dark-mode .feature-card {
    background: #2a2a2a;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    border-top-color: var(--primary-color);
}

html.dark-mode .feature-card:hover {
    box-shadow: 0 15px 40px rgba(255, 222, 33, 0.15);
}

html.dark-mode .feature-card h4 {
    color: #e0e0e0;
}

html.dark-mode .feature-card p {
    color: #b0b0b0;
}

html.dark-mode .feature-icon {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: 0 8px 20px rgba(255, 222, 33, 0.2);
}

html.dark-mode .section-header h2 {
    color: #e0e0e0;
}

html.dark-mode .section-header p {
    color: #b0b0b0;
}

/* Dark Mode Features Section */
html.dark-mode .features {
    background: #2a2a2a;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    border-color: var(--primary-color);
}

/* Dark Mode Upload Area */
html.dark-mode .upload-area {
    border-color: #444;
    background: #2a2a2a;
    color: #e0e0e0;
}

html.dark-mode .upload-area:hover {
    border-color: var(--primary-color);
    background: #333333;
}

html.dark-mode .upload-area h3 {
    color: #e0e0e0;
}

html.dark-mode .upload-area p {
    color: #b0b0b0;
}

/* Dark Mode File List */
html.dark-mode .file-item {
    background: #3a3a3a;
    border-left-color: var(--primary-color);
}

html.dark-mode .file-name {
    color: #e0e0e0;
}

html.dark-mode .file-size {
    color: #b0b0b0;
}

/* Dark Mode Progress and Result */
html.dark-mode .progress {
    background: rgba(255, 222, 33, 0.05);
    border-left-color: var(--primary-color);
}

html.dark-mode .progress p {
    color: #e0e0e0;
}

html.dark-mode .result {
    background: #3a3a3a;
    border-left-color: var(--primary-color);
}

html.dark-mode .result.success {
    background: rgba(40, 167, 69, 0.15);
    color: #6dd58e;
    border-left-color: #28a745;
}

html.dark-mode .result.error {
    background: rgba(220, 53, 69, 0.15);
    color: #ff6b7a;
    border-left-color: #dc3545;
}

/* Dark Mode File Info Box */
html.dark-mode .file-info-box {
    background: #3a3a3a;
    border-color: #4a4a4a;
}

html.dark-mode .file-info-box .file-name {
    color: #e0e0e0;
}

html.dark-mode .file-info-box .file-size {
    color: #b0b0b0;
}

html.dark-mode .file-info-box .remove-btn {
    background: #dc3545;
}

html.dark-mode .file-info-box .remove-btn:hover {
    background: #c82333;
}

/* Dark Mode Forms */
html.dark-mode input[type="text"],
html.dark-mode input[type="number"],
html.dark-mode select,
html.dark-mode textarea {
    background: #3a3a3a !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

html.dark-mode input[type="text"]:focus,
html.dark-mode input[type="number"]:focus,
html.dark-mode select:focus,
html.dark-mode textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(255, 222, 33, 0.1) !important;
}

/* Dark Mode Page Title */
html.dark-mode .tool-page h1 {
    color: #e0e0e0;
}

html.dark-mode .tool-page h2 {
    color: #e0e0e0;
}

html.dark-mode .page-description {
    color: #b0b0b0;
}

/* Dark Mode Tips Section */
html.dark-mode .tips-section {
    background: #2a2a2a;
    border-left-color: var(--primary-color);
}

html.dark-mode .tips-section h3 {
    color: #e0e0e0;
}

html.dark-mode .tips-section li {
    color: #b0b0b0;
}

/* Dark Mode Hero Section */
html.dark-mode .hero {
    color: #e0e0e0;
}

html.dark-mode .hero-tagline {
    color: white !important;
}

html.dark-mode .hero-subtitle {
    color: #b0b0b0;
}

/* Dark Mode Footer */
html.dark-mode .site-footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    border-top-color: var(--primary-color);
}

html.dark-mode .site-footer p {
    color: #b0b0b0;
}

html.dark-mode .site-footer a {
    color: #888;
}

html.dark-mode .site-footer a:hover {
    color: var(--primary-color);
}

/* Dark Mode Ad Slots */
html.dark-mode .ad-slot {
    background: #3a3a3a;
    border-color: #444;
}

html.dark-mode .ad-placeholder {
    color: #888;
}

/* Dark Mode Monitoring Dashboard */
html.dark-mode .dashboard-grid {
    gap: 20px;
}

html.dark-mode .dashboard-card {
    background: #2a2a2a;
    color: #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border-left-color: var(--primary-color) !important;
}

html.dark-mode .dashboard-card h3 {
    color: #e0e0e0;
}

html.dark-mode .dashboard-card .value {
    color: var(--primary-color);
}

html.dark-mode .dashboard-card .label {
    color: #b0b0b0;
}

html.dark-mode .metrics-table {
    color: #e0e0e0;
}

html.dark-mode .metrics-table th {
    background: #1f1f1f;
    color: #e0e0e0;
    border-bottom-color: #444;
}

html.dark-mode .metrics-table td {
    color: #e0e0e0;
    border-bottom-color: #444;
}

html.dark-mode .metrics-table tr:hover {
    background: #333;
}

html.dark-mode .service-grid {
    gap: 10px;
}

html.dark-mode .service-item {
    background: #1f1f1f;
    color: #e0e0e0;
}

html.dark-mode .service-item .name {
    color: #e0e0e0;
}

html.dark-mode .progress-bar {
    background: #1f1f1f;
}

html.dark-mode .progress-fill {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
}

html.dark-mode .auto-refresh {
    background: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    color: #e0e0e0;
}

html.dark-mode .refresh-btn {
    background: var(--primary-color);
    color: #333;
    border: none;
}

html.dark-mode .refresh-btn:hover {
    background: var(--primary-dark);
}

html.dark-mode .dependency-check {
    background: #1f1f1f;
    color: #e0e0e0;
}

html.dark-mode .status-badge {
    color: inherit;
}

html.dark-mode .status-badge.ok {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

html.dark-mode .status-badge.warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

html.dark-mode .status-badge.error {
    background: rgba(220, 53, 69, 0.2);
    color: #ff5252;
}

html.dark-mode select,
html.dark-mode .form-select {
    background: #2a2a2a;
    color: #e0e0e0;
    border-color: #444;
}

html.dark-mode select:hover,
html.dark-mode .form-select:hover {
    border-color: var(--primary-color);
}

html.dark-mode select:focus,
html.dark-mode .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 222, 33, 0.15);
}

html.dark-mode .option-group label {
    color: #e0e0e0;
}

html.dark-mode .option-group small {
    color: #b0b0b0;
}

html.dark-mode .split-options {
    background: #2a2a2a;
    border-color: #444;
}

/* Watermark options - dark mode */
html.dark-mode .watermark-options-container {
    background: #2a2a2a !important;
    border-color: #444 !important;
}

html.dark-mode .watermark-options .option-row label {
    color: #e0e0e0 !important;
}

html.dark-mode .watermark-options .option-row .form-control {
    background: #1a1a1a !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
}

html.dark-mode .watermark-options .watermark-option-hint {
    color: #b0b0b0 !important;
}

html.dark-mode .watermark-options h3 {
    color: #e0e0e0 !important;
}


/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .tab-button {
        padding: 15px 10px;
        font-size: 1rem;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }

    .upload-area.file-selected {
        padding: 40px 20px;
        min-height: 0;
    }
    
    .file-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Utility classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Ad Placeholder Styles */
.ad-slot {
    margin: 20px auto;
    text-align: center;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder {
    color: #6c757d;
    font-family: Arial, sans-serif;
    padding: 10px;
}

.ad-placeholder span {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.ad-placeholder small {
    font-size: 12px;
    color: #adb5bd;
}

/* Ad Sizes */
.ad-leaderboard {
    max-width: 728px;
    height: 90px;
}

.ad-medium-rectangle {
    max-width: 300px;
    height: 250px;
}

.ad-banner {
    max-width: 468px;
    height: 60px;
}

/* Hide all ad slots for now (do not delete - just hidden) */
.ad-slot {
    display: none !important;
}

.ad-skyscraper {
    width: 160px;
    height: 600px;
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Responsive Ads */
@media (max-width: 768px) {
    .ad-skyscraper {
        display: none;
    }
    
    .ad-leaderboard {
        max-width: 320px;
        height: 100px;
    }
}

/* Header Styles */
.site-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 5000;
    border-bottom: 3px solid var(--primary-color);
    transition: all 0.3s ease;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: #e74c3c;
}

/* Footer Styles */
.site-footer {
    background: linear-gradient(135deg, #333333 0%, #1a1a1a 100%);
    color: white;
    margin-top: 50px;
    padding: 30px 0;
    border-top: 3px solid var(--primary-color);
}

.footer-content {
    text-align: center;
    margin-top: 20px;
}

.footer-content p {
    color: #e0e0e0;
    font-size: 0.9rem;
}

.footer-content strong {
    color: var(--primary-color);
}

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

.footer-links a {
    color: #adb5bd;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Nav brand wrapper (desktop: inline with logo only; mobile: logo + hamburger) */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Hamburger button - hidden on desktop */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: 2px solid var(--primary-dark);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5010;
}

.hamburger-btn:hover {
    background: var(--primary-light);
}

.hamburger-bar {
    display: block;
    width: 22px;
    height: 2.5px;
    background: #333;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

html.dark-mode .hamburger-bar {
    background: var(--primary-color);
}

/* Mobile menu overlay - hidden on desktop */
.nav-overlay {
    display: none;
}

/* ==================== MOBILE HAMBURGER MENU (max-width: 768px only) ==================== */
@media (max-width: 768px) {
    .main-nav {
        flex-wrap: wrap;
        position: relative;
    }

    .nav-brand {
        flex: 1;
        justify-content: space-between;
        min-width: 0;
    }

    .hamburger-btn {
        display: flex;
    }

    .hamburger-btn[aria-expanded="true"] .hamburger-bar:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }
    .hamburger-btn[aria-expanded="true"] .hamburger-bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger-btn[aria-expanded="true"] .hamburger-bar:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }

    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 4998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .main-nav.mobile-menu-open .nav-overlay {
        opacity: 1;
        visibility: visible;
        display: block;
    }

    .nav-drawer {
        position: fixed;
        top: 0;
        left: 0;
        width: min(320px, 100%);
        max-height: 100vh;
        overflow-y: auto;
        flex-direction: column;
        gap: 0;
        padding: 70px 0 24px 0;
        background: white;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
        z-index: 4999;
        display: flex;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-right: 3px solid var(--primary-color);
        align-items: stretch;
    }

    .main-nav.mobile-menu-open .nav-drawer {
        transform: translateX(0);
    }

    .nav-drawer .nav-link,
    .nav-drawer .nav-dropdown .dropdown-toggle {
        width: 100%;
        padding: 14px 20px;
        font-size: 1rem;
        border-radius: 0;
        border-bottom: 1px solid #eee;
        justify-content: flex-start;
    }

    .nav-drawer .nav-dropdown {
        display: block;
        position: static;
    }

    .nav-drawer .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        margin-left: 0;
        padding-left: 0;
        padding-top: 0; /* Revert desktop fix: no extra top padding in mobile drawer */
        min-width: 100%;
        max-height: 0;
        overflow: hidden;
        animation: none;
        background: #f8f9fa;
    }

    .nav-drawer .nav-dropdown.active .dropdown-menu {
        display: block;
        max-height: 80vh;
        overflow-y: auto;
    }

    .nav-drawer .dropdown-item {
        padding: 12px 20px 12px 36px;
        border-bottom: 1px solid #eee;
    }

    .nav-drawer .dark-mode-toggle {
        margin: 0;
        width: 44px !important;
        height: 44px !important;
    }

    .nav-drawer .nav-actions {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        padding: 16px 20px 12px;
        margin-top: 8px;
        border-top: 1px solid #eee;
        width: 100%;
        box-sizing: border-box;
    }

    .nav-drawer .nav-actions .blog-nav-link {
        flex: 1;
        min-height: 44px;
        justify-content: flex-start;
        border-radius: 8px;
    }
}

/* Dark mode mobile menu */
@media (max-width: 768px) {
    html.dark-mode .nav-drawer {
        background: #1a1a1a;
        border-right-color: var(--primary-color);
    }

    html.dark-mode .nav-drawer .nav-link,
    html.dark-mode .nav-drawer .dropdown-toggle {
        border-bottom-color: #333;
        color: #e0e0e0 !important;
    }

    html.dark-mode .nav-drawer .dropdown-menu {
        background: #0f0f0f;
    }

    html.dark-mode .nav-drawer .dropdown-item {
        border-bottom-color: #333;
        color: #e0e0e0;
    }

    /* Yellow hover/active on drawer toggles: need dark text (drawer .nav-link color was winning over global :hover) */
    html.dark-mode .nav-drawer .nav-link:hover,
    html.dark-mode .nav-drawer .nav-dropdown .dropdown-toggle:hover,
    html.dark-mode .nav-drawer .nav-dropdown.active > .dropdown-toggle {
        background: var(--primary-color) !important;
        color: #1a1a1a !important;
        box-shadow: none !important;
        transform: none !important;
    }

    html.dark-mode .nav-drawer .nav-link:hover i,
    html.dark-mode .nav-drawer .nav-dropdown .dropdown-toggle:hover i,
    html.dark-mode .nav-drawer .nav-dropdown.active > .dropdown-toggle i {
        color: #1a1a1a !important;
    }

    html.dark-mode .nav-drawer .nav-link.active {
        background: var(--primary-color) !important;
        color: #1a1a1a !important;
        border-color: transparent !important;
    }

    html.dark-mode .nav-drawer .nav-link.active i {
        color: #1a1a1a !important;
    }

    html.dark-mode .nav-drawer .nav-link:focus-visible,
    html.dark-mode .nav-drawer .nav-dropdown .dropdown-toggle:focus-visible {
        background: var(--primary-color) !important;
        color: #1a1a1a !important;
        outline: 2px solid var(--primary-dark);
        outline-offset: -2px;
    }

    html.dark-mode .nav-drawer .nav-actions {
        border-top-color: #333;
    }

    .nav-drawer .nav-links {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-drawer .nav-menu {
        flex-direction: column;
    }
}

/* Tool Page Specific Styles */
.tool-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Privacy, Terms, Contact */
.legal-page {
    max-width: 720px;
    text-align: left;
}

.legal-page h2 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-page h2 i {
    color: var(--primary-dark);
    flex-shrink: 0;
}

.legal-page ul {
    margin: 0 0 1rem 1.25rem;
    line-height: 1.75;
}

.legal-page p {
    line-height: 1.75;
    margin-bottom: 1rem;
}

.legal-page a {
    color: var(--primary-dark);
    font-weight: 600;
}

.legal-page .legal-back {
    margin-top: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.legal-contact-box h2 {
    margin-top: 0;
}

.page-description {
    text-align: left;
    color: #6c757d;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.option-group {
    margin: 20px 0;
    text-align: center;
}

.option-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #495057;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.option-group small {
    display: block;
    margin-top: 8px;
    color: #6c757d;
    font-size: 0.9rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
    width: 100%;
    max-width: 400px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #495057;
}

.form-select:hover {
    border-color: var(--primary-color);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 222, 33, 0.1);
}

select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #495057;
}

select:hover {
    border-color: var(--primary-color);
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 222, 33, 0.1);
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
    display: block;
    margin: 20px auto;
}

.coming-soon {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px dashed #dee2e6;
}

.coming-soon i {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 20px;
}

.coming-soon h3 {
    color: #495057;
    margin-bottom: 15px;
}

.coming-soon a {
    color: var(--primary-color);
    text-decoration: none;
}

.coming-soon a:hover {
    text-decoration: underline;
}

/* Split Options Styles */
.split-options {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.option-group {
    margin-bottom: 20px;
}

.option-group:last-child {
    margin-bottom: 0;
}

.option-group label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
    margin-bottom: 0;
}

.radio-group input[type="radio"] {
    cursor: pointer;
    width: auto;
}

.input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.input-row input {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    flex: 1;
    min-width: 120px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #495057;
}

.input-row input:hover {
    border-color: var(--primary-color);
}

.input-row input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 222, 33, 0.1);
}

html.dark-mode .input-row input {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

html.dark-mode .input-row input:hover {
    border-color: var(--primary-color);
}

html.dark-mode .input-row input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 222, 33, 0.15);
}

.input-row span {
    color: #6c757d;
    font-weight: 600;
}

.split-options small {
    display: block;
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 5px;
}

.margin-custom-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.margin-custom-row input,
.margin-custom-row select {
    padding: 8px 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .input-row {
        flex-direction: column;
    }
    
    .input-row input {
        min-width: 100%;
    }
}

/* ==================== PDF PREVIEW STYLES ==================== */

.file-item {
    position: relative;
}

.file-preview {
    width: 120px;
    height: 160px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.file-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.file-preview.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.file-preview.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
}

/* Updated file-item layout to include preview */
.file-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 15px;
}

.file-item .file-info {
    flex: 1;
}

.file-item .file-icon {
    display: none;
}

.file-item-content {
    display: flex;
    gap: 15px;
    width: 100%;
}

.file-preview-container {
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    word-break: break-word;
}

.file-size {
    font-size: 0.85rem;
    color: #6c757d;
}

.file-item button {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 5px;
}

/* ==================== HERO SECTION ==================== */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 60px 0;
    margin-bottom: 80px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #FFDE21 0%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.hero-tagline .highlight {
    color: var(--primary-color);
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    line-height: 1.8;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 400px;
}

.hero-icon-stack {
    position: relative;
    width: 300px;
    height: 300px;
}

.icon-item {
    position: absolute;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 10px 30px rgba(255, 222, 33, 0.2);
    animation: float 3s ease-in-out infinite;
}

.icon-1 {
    top: 0;
    left: 0;
    animation-delay: 0s;
}

.icon-2 {
    top: 50px;
    right: 0;
    animation-delay: 0.5s;
}

.icon-3 {
    bottom: 50px;
    left: 30px;
    animation-delay: 1s;
}

.icon-4 {
    bottom: 0;
    right: 30px;
    animation-delay: 1.5s;
}

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

/* ==================== TOOLS SECTION ==================== */
.tools-grid {
    margin-bottom: 80px;
}

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

/* Tool section headers - accent border on top only + tinted background */
.tools-grid .section-header {
    border: none;
    border-top: 3px solid var(--primary-color);
    border-radius: 12px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(255, 222, 33, 0.22) 0%, rgba(255, 235, 89, 0.1) 50%, rgba(255, 255, 255, 0.65) 100%);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

html.dark-mode .tools-grid .section-header {
    background: linear-gradient(135deg, rgba(255, 222, 33, 0.18) 0%, rgba(60, 60, 60, 0.95) 55%, #2a2a2a 100%);
    border-top-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: #6c757d;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.grid-container.grid-small {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    max-width: 900px;
    margin: 0 auto 40px;
}

.grid-container.grid-small.grid-three {
    max-width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.tool-card {
    background: white;
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(255, 222, 33, 0.15);
}

.tool-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-light) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.tool-card:hover:before {
    opacity: 0.05;
}

.tool-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.tool-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.tool-card p {
    color: #6c757d;
    margin-bottom: 25px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.tool-card .btn {
    margin-top: auto;
}

/* ==================== FEATURES SECTION ==================== */
.features {
    background: white;
    padding: 60px 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 80px;
    border: 2px solid var(--primary-color);
}

.features .section-header {
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature-card {
    text-align: center;
    padding: 40px 30px;
    transition: all 0.3s ease;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border-top: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 15px 40px rgba(255, 222, 33, 0.2);
}

.feature-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-light) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.feature-card:hover:before {
    opacity: 0.05;
}

.feature-icon {
    font-size: 3rem;
    color: white;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    width: 80px;
    height: 80px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 8px 20px rgba(255, 222, 33, 0.15);
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(255, 222, 33, 0.25);
}

.feature-card h4 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 12px;
    font-weight: 700;
}

.feature-card p {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==================== BUTTONS ==================== */
.btn-large {
    padding: 15px 40px !important;
    font-size: 1.1rem !important;
}

.btn-secondary {
    background: #f0f0f0 !important;
    color: #333 !important;
    border: 2px solid var(--primary-color) !important;
}

.btn-secondary:hover {
    background: var(--primary-light) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 222, 33, 0.3) !important;
}

/* Update existing button styles */
.btn-primary {
    background: var(--primary-gradient) !important;
    color: #333 !important;
    box-shadow: 0 4px 15px rgba(255, 222, 33, 0.3) !important;
}

.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 222, 33, 0.4) !important;
}

.btn-primary:disabled {
    background: #d0d0d0 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ==================== HEADER & FOOTER ==================== */
.site-header {
    background: #FFDE21;
    border-bottom: 3px solid var(--primary-dark);
    box-shadow: 0 2px 8px rgba(255, 222, 33, 0.1);
}

.site-header .container {
    padding: 15px 28px;
}

.logo a {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem !important;
}

.logo i {
    color: var(--primary-color) !important;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 40px 0;
        margin-bottom: 60px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 1.4rem;
    }

    .hero-image {
        height: 250px;
    }

    .hero-icon-stack {
        width: 200px;
        height: 200px;
    }

    .icon-item {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    .features {
        padding: 40px 20px;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
    }

}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .tool-icon {
        font-size: 2.5rem;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .file-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .file-item-content {
        flex-direction: column;
    }
    
    .file-preview {
        width: 100px;
        height: 140px;
    }
}

/* Editor Toolbar Styles for PDF Signing */
.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    flex-direction: column;
}

.toolbar-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.toolbar-section:last-child {
    border-bottom: none;
}

.toolbar-section h4 {
    margin: 0;
    font-weight: 600;
    min-width: 120px;
    color: #333;
}

.toolbar-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
}

.toolbar-group label {
    font-size: 12px;
    font-weight: 500;
    color: #555;
}

.toolbar-group.checkbox {
    flex-direction: row;
    align-items: center;
    min-width: auto;
    margin-top: 5px;
}

.toolbar-group.checkbox input[type="checkbox"] {
    margin-right: 5px;
}

.toolbar-group.checkbox label {
    margin: 0;
}

.form-control-small {
    max-width: 120px !important;
}

.editor-content {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    min-height: 400px;
}

.preview-canvas-wrapper {
    max-width: 100%;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#addTextBtn, #addImageBtn {
    border-bottom: 3px solid transparent;
    transition: border-color 0.3s;
}

#addTextBtn.active, #addImageBtn.active {
    border-bottom-color: #4CAF50;
}
/* Password Protection Settings */
.protection-settings {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(255, 222, 33, 0.1);
}

.protection-settings h2 {
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px !important;
}

.protection-settings h2 i {
    color: var(--primary-color);
}

.password-group {
    margin-bottom: 25px;
    padding: 20px;
    background: #f9f9f9;
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.password-group:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.password-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.password-group label i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.password-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.password-group input[type="password"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 222, 33, 0.15);
    outline: none;
}

.password-group small {
    color: #666;
    margin-top: 8px;
    display: block;
    line-height: 1.5;
}

.password-tips {
    background: linear-gradient(135deg, rgba(255, 222, 33, 0.05) 0%, rgba(255, 215, 0, 0.05) 100%);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    margin-bottom: 30px;
}

.password-tips strong {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.password-tips strong i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.password-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-tips li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #555;
    line-height: 1.6;
}

.password-tips li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Tips Section Spacing */
.tips-section {
    margin-top: 50px;
    padding: 25px;
    background: #f9f9f9;
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tips-section h3 {
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tips-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-section li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    color: #555;
    line-height: 1.7;
    border-bottom: 1px solid #e0e0e0;
}

.tips-section li:last-child {
    border-bottom: none;
}

.tips-section li:before {
    content: "→";
    position: absolute;
    left: 8px;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.tips-section li strong {
    color: #333;
}

/* Dark Mode Styles for Password Protection */
html.dark-mode .protection-settings {
    background: #2a2a2a;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(255, 222, 33, 0.15);
}

html.dark-mode .protection-settings h2 {
    color: #f0f0f0;
}

html.dark-mode .password-group {
    background: #3a3a3a;
    border-left-color: var(--primary-color);
}

html.dark-mode .password-group:hover {
    background: #404040;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

html.dark-mode .password-group label {
    color: #f0f0f0;
}

html.dark-mode .password-group input[type="password"] {
    background: #3a3a3a;
    border-color: #555;
    color: #f0f0f0;
}

html.dark-mode .password-group input[type="password"]::placeholder {
    color: #f0f0f0;
}

html.dark-mode .password-group input[type="password"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 222, 33, 0.2);
}

html.dark-mode .password-group small {
    color: #f0f0f0;
}

html.dark-mode .password-tips {
    background: rgba(255, 222, 33, 0.08);
    border-left-color: var(--primary-color);
}

html.dark-mode .password-tips strong {
    color: #f0f0f0;
}

html.dark-mode .password-tips li {
    color: #f0f0f0;
}

html.dark-mode .tips-section {
    background: #2a2a2a;
    border-left-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

html.dark-mode .tips-section h3 {
    color: #f0f0f0;
}

html.dark-mode .tips-section li {
    color: #f0f0f0;
    border-bottom-color: #444;
}

html.dark-mode .tips-section li strong {
    color: #f0f0f0;
}

/* File Selected State - dashed border, light background, hover feedback, same size as initial */
.upload-area.file-selected {
    background: rgb(250, 251, 252);
    background-color: rgb(250, 251, 252);
    border: 2.4px dashed rgb(222, 226, 230);
    border-radius: 12px;
    padding: 60px 40px;
    margin: 30px 0;
    min-height: 262px;
    cursor: default;
    transition: 0.3s;
}

.upload-area.file-selected:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.upload-area.file-selected i {
    color: #28a745;
}

.upload-area.file-selected h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgb(51, 51, 51);
}

.upload-area.file-selected p {
    font-size: 1rem;
    color: #6c757d;
}

/* File Item Styling */
.file-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 15px;
    align-items: center;
}

.file-preview {
    width: 80px;
    height: 100px;
    border-radius: 6px;
    background: #f0f0f0;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-name {
    font-weight: 600;
    color: #333;
    margin: 0;
    word-break: break-word;
}

.file-size {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.9rem;
    width: auto;
}

/* Dark Mode File Item */
html.dark-mode .upload-area.file-selected {
    background: #2a2a2a;
    border: 2.4px dashed #444;
}

html.dark-mode .upload-area.file-selected:hover {
    border-color: var(--primary-color);
    background: #333;
}

html.dark-mode .upload-area.file-selected i {
    color: #4ade80;
}

html.dark-mode .upload-area.file-selected h3 {
    color: #e0e0e0;
}

html.dark-mode .upload-area.file-selected p {
    color: #b0b0b0;
}

html.dark-mode .file-item {
    background: #3a3a3a;
    border-color: #444;
}

html.dark-mode .file-preview {
    background: #2a2a2a;
    border-color: #444;
}

html.dark-mode .file-name {
    color: #e0e0e0;
}

html.dark-mode .file-size {
    color: #b0b0b0;
}

/* ==================== BLOG ==================== */
.blog-hero {
    text-align: center;
    padding: 2rem 0 1rem;
    max-width: 720px;
    margin: 0 auto;
}

.blog-hero h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.blog-hero p {
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.6;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0 3rem;
}

.blog-card {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

html.dark-mode .blog-card {
    background: #2a2a2a;
    border-color: #444;
}

.blog-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.blog-card h2 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.blog-card h2 a {
    color: inherit;
    text-decoration: none;
}

.blog-card h2 a:hover {
    color: var(--primary-dark);
}

.blog-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.55;
    flex: 1;
    margin-bottom: 1rem;
}

.blog-card .btn {
    align-self: flex-start;
}

.blog-post {
    max-width: 760px;
    margin: 0 auto;
    padding: 1rem 0 3rem;
}

.blog-breadcrumb {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.25rem;
}

.blog-breadcrumb a {
    color: var(--primary-dark);
    text-decoration: none;
}

.blog-breadcrumb a:hover {
    text-decoration: underline;
}

.blog-post h1 {
    font-size: 2rem;
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

.blog-meta {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.blog-post-body h2 {
    font-size: 1.35rem;
    margin: 2rem 0 0.75rem;
    color: var(--text-color);
}

.blog-post-body p,
.blog-post-body li {
    line-height: 1.75;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.blog-post-body ul,
.blog-post-body ol {
    margin: 0 0 1rem 1.25rem;
}

.blog-post-body .example-box {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    border-radius: 0 8px 8px 0;
}

html.dark-mode .blog-post-body .example-box {
    background: #333;
}

.blog-post-body .tip {
    background: rgba(255, 222, 33, 0.15);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.blog-cta {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

html.dark-mode .blog-cta {
    border-top-color: #444;
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 1.6rem;
    }
    .blog-post h1 {
        font-size: 1.6rem;
    }
}
