body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    padding-bottom: 60px; /* Space for cookie consent */
}

.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    border-radius: 0.5rem 0.5rem 0 0 !important;
    padding: 1rem 1.25rem;
}

.nav-tabs .nav-link {
    color: #495057;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
}

.nav-tabs .nav-link.active {
    font-weight: 600;
    background-color: #fff;
    border-bottom-color: #fff;
}

.result-textarea {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    width: 100%;
}

.ad-container {
    background-color: #f1f1f1;
    padding: 15px;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.ad-top {
    min-height: 90px;
    width: 728px;
    max-width: 100%;
    margin: 0 auto;
}

.ad-sidebar {
    min-height: 600px;
    width: 300px;
    max-width: 100%;
    margin: 0 auto;
}

.ad-inline {
    min-height: 90px;
    width: 728px;
    max-width: 100%;
    margin: 0 auto;
}

.ad-placeholder {
    color: #666;
    font-size: 0.9rem;
    padding: 10px;
    border: 1px dashed #999;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.quick-tool-btn {
    text-align: left;
    padding: 0.5rem 1rem;
}

.table-responsive {
    max-height: 500px;
    overflow-y: auto;
}

footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #212529;
    color: white;
}

footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: white;
    text-decoration: underline;
}

/* Navbar styles */
.navbar {
    padding: 0.5rem 0;
}

.navbar-dark .navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.85);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: white;
}

/* Blog styles */
.card-post {
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.card-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-post img {
    height: 200px;
    object-fit: cover;
}

/* Contact form styles */
#contactForm .form-control {
    margin-bottom: 1rem;
}

#contactForm .form-check-label {
    font-size: 0.9rem;
}

/* Disclaimer text */
.disclaimer {
    font-size: 0.8rem;
    color: #666;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .ad-sidebar {
        min-height: 250px;
    }
}

@media (max-width: 767.98px) {
    .navbar-nav {
        margin-top: 1rem;
    }
    
    footer .col-md-4 {
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    .ad-sidebar, .ad-top {
        min-height: auto;
    }
    
    .ad-top {
        margin-top: 1rem;
    }
}

@media (max-width: 575.98px) {
    .card-body > .row > [class^="col-"] {
        margin-bottom: 1rem;
    }
    
    .card-body > .row > [class^="col-"]:last-child {
        margin-bottom: 0;
    }
}

/* Signature canvas */
#signatureCanvas {
    background-color: white;
    cursor: crosshair;
    touch-action: none;
}

/* Comparison view */
.comparison-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.comparison-pane {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1rem;
    background-color: white;
}

.difference-highlight {
    background-color: rgba(255, 255, 0, 0.3);
    border: 1px dashed #ffc107;
}

/* PDF preview iframes */
.pdf-preview {
    width: 100%;
    height: 500px;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    background-color: #f8f9fa;
}

/* Watermark preview */
.watermark-preview {
    max-width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

/* Split PDF list */
#splitResultsList a, #compressedFilesList a {
    text-decoration: none;
}

/* Image gallery */
#pdfToJpgGallery .card img {
    max-height: 200px;
    object-fit: contain;
}

/* Rotate controls */
.btn-group.rotate-controls {
    width: 100%;
}

.btn-group.rotate-controls .btn {
    flex: 1;
}

/* Range inputs with labels */
.range-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.range-container input[type="range"] {
    flex: 1;
}

.range-value {
    min-width: 40px;
    text-align: center;
}

/* Responsive adjustments for new tabs */
@media (max-width: 991.98px) {
    .nav-tabs .nav-link {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 767.98px) {
    .nav-tabs {
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
    }
    
    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
    }
}

/* Scans to PDF */
#scansToPdfPreview, #croppedPdfPreview, #pptToPdfPreview {
    background-color: white;
}

/* Crop PDF canvas */
#cropCanvas {
    cursor: crosshair;
    touch-action: none;
    max-width: 100%;
    max-height: 70vh;
}

/* Crop controls */
#uniformCropOptions input, #customCropOptions input {
    text-align: center;
}

/* PowerPoint conversion */
#pptToPdfPreview {
    background-color: white;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    #uniformCropOptions .col-md-3, #customCropOptions .col-md-3 {
        margin-bottom: 0.5rem;
    }
    
    #cropCanvas {
        max-height: 50vh;
    }
}