/* Premium Styles for Interval Split PDF */
:root {
    --primary-color: #059669;
    --primary-gradient: linear-gradient(135deg, #10b981 0%, #047857 100%);
    --surface-color: #ffffff;
    --background-color: #f8fafc;
    --border-color: #e2e8f0;
}

body {
    background-color: var(--background-color);
}

.tool-header {
    background: white;
    padding: 40px 15px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 1.8rem !important;
    }
    .tool-header p {
        font-size: 1rem !important;
    }
}

/* Premium Upload Area */
.upload-area {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 2px dashed #cbd5e1;
    border-radius: 24px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .upload-area {
        padding: 80px 40px;
    }
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.upload-area:hover, .upload-area.dragover {
    border-color: transparent;
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -5px rgba(16, 185, 129, 0.2);
}

.upload-area:hover::before, .upload-area.dragover::before {
    opacity: 0.03;
}

.upload-content {
    position: relative;
    z-index: 1;
}

.upload-icon-wrapper {
    width: 80px;
    height: 80px;
    background: #ecfdf5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
    animation: pulse 2s infinite;
}

@media (min-width: 768px) {
    .upload-icon-wrapper {
        width: 100px;
        height: 100px;
        margin: 0 auto 24px;
    }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-premium {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 32px;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    color: white;
}

.btn-premium:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Feature Cards in SEO section */
.feature-card {
    border: 1px solid transparent;
}
.feature-card:hover {
    border-color: var(--primary-color);
    background: white !important;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.1) !important;
}

/* Pages Grid */
.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px 8px 10px 10px;
}

/* Custom Scrollbar */
.pages-grid::-webkit-scrollbar {
    width: 6px;
}
.pages-grid::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
.pages-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.page-card {
    background: white;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    border: 2px solid #e2e8f0;
    position: relative;
    transition: all 0.2s ease;
}

/* Visual grouping for intervals */
.page-card.chunk-group-0 { border-color: #10b981; background: #ecfdf5; }
.page-card.chunk-group-0 .chunk-badge { background: #10b981; }

.page-card.chunk-group-1 { border-color: #3b82f6; background: #eff6ff; }
.page-card.chunk-group-1 .chunk-badge { background: #3b82f6; }

.page-card.chunk-group-2 { border-color: #f59e0b; background: #fffbeb; }
.page-card.chunk-group-2 .chunk-badge { background: #f59e0b; }

.page-card.chunk-group-3 { border-color: #8b5cf6; background: #f5f3ff; }
.page-card.chunk-group-3 .chunk-badge { background: #8b5cf6; }

.page-card.chunk-group-4 { border-color: #ec4899; background: #fdf2f8; }
.page-card.chunk-group-4 .chunk-badge { background: #ec4899; }

.page-card .page-canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: white;
}

.page-number {
    font-size: 11px;
    font-weight: bold;
    color: #475569;
    margin-top: 6px;
}

.chunk-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    white-space: nowrap;
    z-index: 2;
}
