/* 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: #333;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.tagline {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 300;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.nav-menu a:hover {
    opacity: 0.8;
}

/* Main Content */
.main-content {
    margin-top: 100px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #e8f2ff 0%, #d1e7ff 100%);
    color: #2c3e50;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e8ecf3' fill-opacity='0.3'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.5);
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    opacity: 0.8;
    position: relative;
    z-index: 2;
    color: #34495e;
}

/* Upload Area */
.upload-area {
    background: rgba(255,255,255,0.8);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 4rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(52,73,94,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
}

.upload-box {
    max-width: 500px;
    margin: 0 auto;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.upload-box h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #357abd;
    font-weight: 600;
}

.upload-box p {
    margin-bottom: 2rem;
    opacity: 0.7;
    color: #555;
}

#file-input {
    display: none;
}

.upload-btn {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(74,144,226,0.3);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Tool Grid */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tool-card {
    background: rgba(255,255,255,0.9);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(52,73,94,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    position: relative;
    z-index: 2;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    background: rgba(255,255,255,1);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #357abd;
}

.tool-card p {
    margin-bottom: 1.5rem;
    opacity: 0.8;
    line-height: 1.6;
    color: #555;
}

.tool-btn {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: 2px solid transparent;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(74,144,226,0.2);
}

.tool-btn:hover {
    background: linear-gradient(135deg, #357abd 0%, #2e6a9e 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74,144,226,0.4);
}

/* About Section */
.about-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232c3e50' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.about-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.about-section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    margin: 1rem auto;
    border-radius: 2px;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,0.7);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(44,62,80,0.05);
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

/* Features Section */
.features-section {
    padding: 5rem 0;
    background: #4a90e2;
    color: white;
}

.features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.features-section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: rgba(255,255,255,0.8);
    margin: 1rem auto;
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-item {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease, background 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.15);
}

.feature-item h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-item p {
    line-height: 1.7;
    opacity: 0.9;
}

/* Why Choose Section */
.why-choose-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.why-choose-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%232c3e50' fill-opacity='0.02' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.why-choose-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.why-choose-section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    margin: 1rem auto;
    border-radius: 2px;
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.reason-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.reason-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.reason-number {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(74,144,226,0.3);
}

.reason-item h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
    padding-right: 40px;
}

.reason-item p {
    line-height: 1.7;
    color: #555;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .tool-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .reasons-grid {
        grid-template-columns: 1fr;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .about-section h2,
    .features-section h2,
    .why-choose-section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .upload-box {
        padding: 1rem;
    }
    
    .tool-card,
    .feature-item,
    .reason-item {
        padding: 1.5rem;
    }
    
    .about-section,
    .features-section,
    .why-choose-section,
    .faq-section {
        padding: 3rem 0;
    }
    
    .reasons-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation Effects */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card,
.feature-item,
.reason-item {
    animation: fadeInUp 0.6s ease-out;
}

/* FAQ Section */
.faq-section {
    padding: 5rem 0;
    background: #f8f9fa;
}

.faq-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
    font-weight: 700;
    position: relative;
}

.faq-section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    margin: 1rem auto;
    border-radius: 2px;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.faq-question {
    padding: 1.5rem 2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #e8f2ff 0%, #d1e7ff 100%);
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: linear-gradient(135deg, #d1e7ff 0%, #b8dcff 100%);
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #357abd;
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4a90e2;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 1.5rem 2rem;
    max-height: 200px;
}

.faq-answer p {
    margin: 0;
    color: #555;
    line-height: 1.7;
}

/* PDF Operations Styles */
.pdf-operations {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(74,144,226,0.2);
}

.pdf-operations h3 {
    color: #357abd;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.operations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.operation-btn {
    background: linear-gradient(135deg, #e8f2ff 0%, #d1e7ff 100%);
    border: 2px solid #4a90e2;
    border-radius: 15px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.operation-btn:hover {
    background: linear-gradient(135deg, #d1e7ff 0%, #b8dcff 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74,144,226,0.3);
}

.op-icon {
    font-size: 2rem;
}

.op-text {
    font-weight: 600;
    color: #357abd;
}

.operation-options {
    background: rgba(244,248,255,0.8);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(74,144,226,0.2);
}

.operation-options h4 {
    color: #357abd;
    margin-bottom: 1rem;
}

.operation-options label {
    display: block;
    margin: 0.5rem 0;
    color: #555;
    font-weight: 500;
}

.operation-options input,
.operation-options select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.execute-btn {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(74,144,226,0.3);
}

.execute-btn:hover {
    background: linear-gradient(135deg, #357abd 0%, #2e6a9e 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74,144,226,0.4);
}

.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: rgba(255,255,255,0.7);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(74,144,226,0.2);
}

.file-icon {
    font-size: 1.5rem;
}

.file-name {
    flex: 1;
    color: #357abd;
    font-weight: 500;
}

.file-size {
    color: #666;
    font-size: 0.9rem;
}

.remove-file {
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.remove-file:hover {
    background: #ff5252;
}

.processing-status {
    background: rgba(244,248,255,0.9);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(74,144,226,0.2);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.status-text {
    color: #357abd;
    font-weight: 600;
    margin: 0;
}

.download-area {
    background: rgba(230,255,230,0.8);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(76,175,80,0.3);
}

.download-area h4 {
    color: #2e7d32;
    margin-bottom: 1rem;
}

.download-btn {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    margin: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(76,175,80,0.3);
}

.download-btn:hover {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76,175,80,0.4);
}

.reset-btn {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    margin: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(255,152,0,0.3);
}

.reset-btn:hover {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,152,0,0.4);
}

.upload-box.drag-over {
    border: 2px dashed #4a90e2;
    background: rgba(74,144,226,0.1);
    transform: scale(1.02);
}

#opacity-value {
    color: #357abd;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* PDF Preview Section */
.pdf-preview-section {
    background: rgba(248,250,255,0.9);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(74,144,226,0.2);
}

.pdf-preview-section h4 {
    color: #357abd;
    margin-bottom: 1rem;
    text-align: center;
}

.thumbnail-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.thumbnail-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 0.5rem;
    border-radius: 10px;
    border: 2px solid transparent;
}

.thumbnail-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74,144,226,0.2);
}

.thumbnail-wrapper.selected {
    border-color: #4a90e2;
    background: rgba(74,144,226,0.1);
}

.thumbnail-wrapper canvas {
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 120px;
    max-height: 160px;
}

.page-label {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #555;
    font-weight: 600;
    text-align: center;
}

/* Responsive adjustments for PDF operations */
@media (max-width: 768px) {
    .operations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pdf-operations {
        padding: 1rem;
    }
    
    .thumbnail-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .thumbnail-wrapper canvas {
        max-width: 80px;
        max-height: 120px;
    }
}

@media (max-width: 480px) {
    .operations-grid {
        grid-template-columns: 1fr;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .download-btn, .reset-btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
}

/* PDF Editor Styles */
.pdf-editor-panel {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(74,144,226,0.2);
}

.editor-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    min-height: 600px;
}

.editor-preview {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.preview-container {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: auto;
    min-height: 500px;
    padding: 20px;
}

#pdf-canvas {
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 4px;
    background: white;
}

#editor-canvas {
    position: absolute;
    pointer-events: auto;
    z-index: 2;
    border: 1px solid transparent;
    border-radius: 4px;
}

.canvas-container {
    position: relative;
    display: inline-block;
}

.page-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255,255,255,0.8);
    border-radius: 10px;
}

.page-navigation button {
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s ease;
}

.page-navigation button:hover:not(:disabled) {
    background: #357abd;
}

.page-navigation button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#page-info {
    font-weight: 600;
    color: #357abd;
}

.editor-tools {
    background: rgba(244,248,255,0.8);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(74,144,226,0.2);
}

.editor-tools h4 {
    color: #357abd;
    margin-bottom: 1rem;
    text-align: center;
    border-bottom: 2px solid #4a90e2;
    padding-bottom: 0.5rem;
}

.tool-categories {
    margin-bottom: 2rem;
}

.tool-category {
    margin-bottom: 1.5rem;
}

.tool-category h5 {
    color: #555;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.editor-tool-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #e8f2ff 0%, #d1e7ff 100%);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    color: #357abd;
    font-weight: 500;
}

.editor-tool-btn:hover {
    background: linear-gradient(135deg, #d1e7ff 0%, #b8dcff 100%);
    border-color: #4a90e2;
    transform: translateY(-1px);
}

.editor-tool-btn.active {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border-color: #2e6a9e;
}

.editor-tool-btn span {
    margin-right: 0.5rem;
}

.tool-options {
    background: rgba(255,255,255,0.9);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(74,144,226,0.2);
    min-height: 120px;
}

.tool-options h5 {
    color: #357abd;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.tool-options label {
    display: block;
    margin: 0.8rem 0 0.3rem 0;
    color: #555;
    font-weight: 500;
    font-size: 0.9rem;
}

.tool-options input[type="range"] {
    width: 100%;
    margin-bottom: 0.5rem;
}

.tool-options input[type="color"] {
    width: 60px;
    height: 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.tool-options span {
    color: #357abd;
    font-weight: 600;
    font-size: 0.9rem;
}

.editor-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.action-btn {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: left;
}

.action-btn:hover {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    transform: translateY(-1px);
}

#save-editor {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

#save-editor:hover {
    background: linear-gradient(135deg, #20c997 0%, #1e7e34 100%);
}

#cancel-editor {
    background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
}

#cancel-editor:hover {
    background: linear-gradient(135deg, #bd2130 0%, #721c24 100%);
}

/* Responsive Editor Layout */
@media (max-width: 1024px) {
    .editor-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .pdf-editor-panel {
        padding: 1rem;
    }
    
    .preview-container {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }
    
    .page-navigation {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .editor-tools {
        padding: 1rem;
    }
    
    .tool-options {
        min-height: 80px;
    }
}

@media (max-width: 480px) {
    .preview-container {
        min-height: 300px;
    }
    
    .editor-actions {
        gap: 0.5rem;
    }
    
    .action-btn {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.processing {
    position: relative;
    overflow: hidden;
}

.processing::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}