/* 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-color: #f8fafc;
}

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

/* Navigation */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
}

.nav-logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-logo .icon-logo {
    height: 42px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
}

.nav-item {
    margin: 0 15px;
}

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 10px 15px;
    border-radius: 8px;
    display: block;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
    background-color: #eff6ff;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Page Management */
.page {
    display: none;
    padding-top: 70px;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 120px;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
}

.btn-success {
    background: #059669;
    color: white;
}

.btn-success:hover {
    background: #047857;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    padding: 100px 200px;
    display: flex;
    align-items: center;
    min-height: 80vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-card i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #fbbf24;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Features Section */
.features {
    padding: 100px 0;
    background: white;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #1e293b;
}

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

.feature {
    text-align: center;
    padding: 40px 30px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #1e293b;
}

.feature p {
    color: #64748b;
    line-height: 1.8;
}

/* Footer Section */

footer {
    background: linear-gradient(135deg, #1e293b, #334155);
  color: #fafafa;
  padding: 21px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
footer .content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
footer .content .logo {
  font-size: 40px;
  text-align: center;
}
footer .content p {
  text-align: center;
  width: 100%;
  max-width: 500px;
}
footer .content .sm,
footer .content .links {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
}
footer .content .links {
  flex-wrap: wrap;
}
footer .content .sm li {
  margin: 15px;
}
footer .content .links li {
  margin: 0 12px;
  margin-bottom: 10px;
}
footer .content .links li a,
footer .content .sm li a {
  color: #fafafa;
  transition: 0.3s ease;
}
footer .content .sm li a {
  font-size: 25px;
  padding: 8px;
  display: flex;
  align-items: center;
}
footer .content .sm li a:hover {
  background: #fafafa;
  color: #222;
  border-radius: 10px;
}
footer .content .links li a:hover {
  opacity: 0.5;
}
footer .copyright {
  text-align: center;
  padding-top: 20px;
  width: 100%;
  border-top: 1px solid #555;
}
@media screen and (max-width: 500px) {
  footer {
    width: 100%;
  }
  footer .content .logo {
    font-size: 30px;
  }
  footer .content p {
    padding: 15px;
  }
  footer .content .sm li a {
    padding: 5px;
  }
}

/* Page Titles */
.page h1 {
    font-size: 2.5rem;
    text-align: center;
    margin: 60px 0 20px;
    color: #1e293b;
}

.page-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 60px;
}

/* Upload Section */
.upload-section {
    margin-bottom: 40px;
}

.upload-area {
    border: 3px dashed #cbd5e1;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.upload-area.dragover {
    border-color: #2563eb;
    background: #eff6ff;
    transform: scale(1.02);
}

.upload-area i {
    font-size: 4rem;
    color: #94a3b8;
    margin-bottom: 20px;
    display: block;
}

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

.upload-area p {
    color: #64748b;
    margin-bottom: 30px;
}

/* Signature Options */
.signature-options {
    background: white;
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 40px;
    border: 1px solid #e2e8f0;
}

.signature-options h3 {
    margin-bottom: 20px;
    color: #1e293b;
}

.option-group {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.radio-label input {
    margin-right: 10px;
}

.signature-upload h4 {
    margin-bottom: 15px;
    color: #1e293b;
}

/* PDF Viewer */
.pdf-viewer {
    background: white;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.viewer-container {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    background: #f8fafc;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#pdf-canvas {
    max-width: 100%;
    height: auto;
}

.signature-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.draggable-signature {
    position: absolute;
    cursor: move;
    pointer-events: all;
    border: 2px dashed #2563eb;
    border-radius: 4px;
    z-index: 10;
}

.signature-handles {
    position: absolute;
    pointer-events: all;
}

.handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #2563eb;
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
}

.handle.nw { top: -6px; left: -6px; cursor: nw-resize; }
.handle.ne { top: -6px; right: -6px; cursor: ne-resize; }
.handle.sw { bottom: -6px; left: -6px; cursor: sw-resize; }
.handle.se { bottom: -6px; right: -6px; cursor: se-resize; }

.viewer-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Verification Result */
.verification-result {
    background: white;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.result-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.result-header {
    background: #f0fdf4;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.result-icon {
    font-size: 2rem;
}

.result-icon.success {
    color: #059669;
}

.result-header h4 {
    font-size: 1.5rem;
    color: #1e293b;
}

.result-details {
    padding: 30px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.detail-item label {
    font-weight: 600;
    color: #1e293b;
}

.detail-item span {
    color: #64748b;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-badge.success {
    background: #d1fae5;
    color: #047857;
}

/* Integration Page */
.integration-content {
    max-width: 1000px;
    margin: 0 auto;
}

.sdk-overview {
    margin-bottom: 60px;
}

.sdk-overview h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #1e293b;
}

.sdk-overview p {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 40px;
    line-height: 1.8;
}

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

.language-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.language-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.language-card i {
    font-size: 3rem;
    color: #2563eb;
    margin-bottom: 20px;
}

.language-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #1e293b;
}

.language-card p {
    color: #64748b;
    font-size: 0.9rem;
}

.code-examples {
    margin-bottom: 60px;
}

.code-examples h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #1e293b;
}

.code-block {
    background: white;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.code-block h3 {
    background: #f8fafc;
    padding: 20px;
    margin: 0;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
}

.code-block pre {
    margin: 0;
    padding: 30px;
    background: #1e293b;
    color: #e2e8f0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
}

.code-block code {
    font-size: 0.9rem;
}

.api-reference h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #1e293b;
}

.api-methods {
    display: grid;
    gap: 30px;
}

.method-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.method-card h3 {
    font-size: 1.5rem;
    color: #2563eb;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
}

.method-card p {
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.8;
}

.method-card h4 {
    color: #1e293b;
    margin: 20px 0 10px;
    font-size: 1.1rem;
}

.method-card ul {
    list-style: none;
    padding: 0;
}

.method-card li {
    padding: 8px 0;
    color: #64748b;
    border-bottom: 1px solid #f1f5f9;
}

.method-card li:last-child {
    border-bottom: none;
}

.method-card code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #2563eb;
}

.installation {
    margin-bottom: 60px;
}

.installation h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #1e293b;
}

.install-commands {
    display: grid;
    gap: 30px;
}

.install-item {
    background: white;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.install-item h3 {
    color: #1e293b;
    margin-bottom: 15px;
}

.install-item code {
    background: #1e293b;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    display: block;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
}

/* Positioning Demo */
.positioning-demo {
    padding: 80px 0;
    background: #f8fafc;
}

.demo-pdf {
    max-width: 800px;
    margin: 40px auto;
}

.pdf-mock {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    font-family: 'Times New Roman', serif;
}

.pdf-header {
    background: #2563eb;
    color: white;
    padding: 10px 20px;
    margin: -30px -30px 20px -30px;
    border-radius: 10px 10px 0 0;
    font-weight: bold;
}

.pdf-content {
    line-height: 1.6;
}

.signature-line {
    display: flex;
    align-items: center;
    margin: 15px 0;
    gap: 10px;
}

.signature-placeholder {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
}

.visible-sig {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.qr-sig {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* PDF Controls */
.pdf-controls {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.page-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.page-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #1e293b;
}

.page-info input {
    width: 60px;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    text-align: center;
    font-size: 1rem;
}

/* Verification Tabs */
.result-tabs {
    display: flex;
    background: #f8fafc;
    border-radius: 8px 8px 0 0;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    padding: 15px 30px;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: white;
    color: #2563eb;
    border-bottom: 3px solid #2563eb;
}

.tab-btn:hover:not(.active) {
    background: #f1f5f9;
    color: #1e293b;
}

.tab-content {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 16px 16px;
    padding: 0;
}

.tab-content h3 {
    padding: 30px 40px 20px;
    margin: 0;
    color: #1e293b;
}

/* Download Section */
.download-section {
    margin: 40px 0;
}

.download-section h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #1e293b;
}

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

.download-item {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.download-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.download-item i {
    font-size: 3rem;
    color: #2563eb;
    margin-bottom: 20px;
}

.download-item h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #1e293b;
}

.download-item p {
    color: #64748b;
    margin-bottom: 25px;
}

/* Integration Steps */
.integration-steps {
    margin-bottom: 60px;
}

.integration-steps h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #1e293b;
}

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

.step-item {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
}

.step-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.step-item h3 {
    margin-top: 15px;
    margin-bottom: 15px;
    color: #1e293b;
}

.step-item p {
    color: #64748b;
    line-height: 1.8;
}

/* Library Structure */
.library-structure {
    margin-bottom: 60px;
}

.library-structure h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #1e293b;
}

.structure-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.structure-item {
    background: white;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.structure-item h3 {
    color: #1e293b;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.structure-item ul {
    list-style: none;
    padding: 0;
}

.structure-item li {
    padding: 8px 0;
    color: #64748b;
    border-bottom: 1px solid #f1f5f9;
}

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

.structure-item code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #2563eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 10px 0;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        margin-top: 40px;
        padding: 0 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .option-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .viewer-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .language-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .language-grid {
        grid-template-columns: 1fr;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .code-block pre {
        padding: 20px;
        font-size: 0.8rem;
    }
}
#draggable-signature {
    position: absolute;
    z-index: 10;
    border: 2px solid #2563eb;
    cursor: move;
    user-select: none;
}

.signature-handles {
    position: absolute;
    z-index: 11;
    pointer-events: none;
}

.handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #2563eb;
    border: 2px solid white;
    border-radius: 50%;
    pointer-events: all;
    cursor: nw-resize;
}

.handle.nw { top: -4px; left: -4px; cursor: nw-resize; }
.handle.ne { top: -4px; right: -4px; cursor: ne-resize; }
.handle.sw { bottom: -4px; left: -4px; cursor: sw-resize; }
.handle.se { bottom: -4px; right: -4px; cursor: se-resize; }
