/* PDF Tools - Clean Modern CSS Framework */
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
}

.logo-text p {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Navigation */
.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-link.primary {
    background: #2563eb;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav-link.primary:hover {
    background: #1d4ed8;
    color: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Status Banner */
.status-banner {
    background: rgba(255,255,255,0.1);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s infinite;
}

.status-dot.checking {
    background: #f59e0b;
}

.status-dot.online {
    background: #10b981;
}

.status-dot.offline {
    background: #ef4444;
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Main Content */
.main-content {
    padding: 3rem 0;
}

.content-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    background: #f9fafb;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #2563eb;
    background: #eff6ff;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #6b7280;
}

.upload-text h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

.upload-text p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.file-input {
    display: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* File List */
.file-list {
    margin-top: 2rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: white;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-icon {
    font-size: 1.5rem;
    color: #ef4444;
}

.file-details h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.file-details p {
    font-size: 0.875rem;
    color: #6b7280;
}

.remove-file {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.remove-file:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Processing Section */
.processing-area {
    text-align: center;
    padding: 3rem 2rem;
}

.processing-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.processing-text {
    font-size: 1.125rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.processing-subtext {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Progress Bar */
.progress-container {
    margin: 1.5rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Success/Error Areas */
.result-area {
    text-align: center;
    padding: 3rem 2rem;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.success-area .result-icon {
    color: #10b981;
}

.error-area .result-icon {
    color: #ef4444;
}

.result-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.success-area .result-title {
    color: #065f46;
}

.error-area .result-title {
    color: #991b1b;
}

.result-description {
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #374151;
}

.feature p {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.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;
    color: white;
}

.footer-section p,
.footer-section li {
    color: #d1d5db;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #d1d5db;
    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 #374151;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .content-section {
        padding: 1.5rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .main-content {
        padding: 2rem 0;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Loading States */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Homepage Specific Styles */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.status-banner {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 2rem;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.tools-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.tools-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
    font-size: 2rem;
    font-weight: 600;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tool-card-link {
    text-decoration: none;
    color: inherit;
}

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.tool-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.tool-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.about-section {
    padding: 4rem 0;
    background: white;
}

.about-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
    font-size: 2rem;
    font-weight: 600;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 1.5rem;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.feature h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.feature p {
    color: #666;
    line-height: 1.6;
}

.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 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #bdc3c7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #ecf0f1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* Enhanced Loading Overlay */
.enhanced-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enhanced-loading-overlay.hidden {
    display: none;
}

.enhanced-loading-content {
    text-align: center;
    color: white;
}

.loading-rings {
    display: flex;
    gap: 5px;
    margin-bottom: 2rem;
}

.ring {
    width: 40px;
    height: 40px;
    border: 3px solid transparent;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.ring:nth-child(2) { animation-delay: 0.1s; }
.ring:nth-child(3) { animation-delay: 0.2s; }
.ring:nth-child(4) { animation-delay: 0.3s; }

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-dots {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-bottom: 2rem;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.progress-container {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 200px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 1rem;
}

.progress-fill {
    height: 100%;
    background: #667eea;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 1.2rem;
    font-weight: 600;
}

.status-text {
    margin-top: 1rem;
    font-size: 1rem;
    opacity: 0.8;
}

.shimmer-text {
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tool-card {
        padding: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
      .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* File Display Components */
.file-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.file-item:hover {
    background: #e9ecef;
    border-color: #6c757d;
}

.file-icon {
    font-size: 2rem;
    margin-right: 1rem;
    color: #dc3545;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.file-size {
    font-size: 0.875rem;
    color: #6c757d;
}

.file-remove {
    background: #dc3545;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    line-height: 1;
}

.file-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
