:root {
    --primary-dark: #0a1628;
    --primary-blue: #1e3a5f;
    --secondary-cyan: #00d4ff;
    --accent-blue: #0066ff;
    --accent-cyan: #00e5ff;
    --neon-cyan: #00ffff;
    --success-color: #00ff88;
    --error-color: #ff3366;
    --warning-color: #ffaa00;
    --text-light: #e0f7ff;
    --text-white: #ffffff;
    --border-cyan: rgba(0, 212, 255, 0.3);
    --glass-bg: rgba(30, 58, 95, 0.4);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 50%, #0a1628 100%);
    background-attachment: fixed;
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 102, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    flex: 1;
}

/* Typography */
h1 {
    font-family: 'Orbitron', 'Inter', sans-serif;
    font-size: 3em;
    text-align: center;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, var(--secondary-cyan), var(--accent-cyan), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {

    0%,
    100% {
        filter: brightness(100%);
    }

    50% {
        filter: brightness(120%);
    }
}

h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2em;
    color: var(--secondary-cyan);
    text-align: center;
    margin: 2em 0 1em 0;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4em;
    color: var(--accent-cyan);
    margin: 1em 0 0.5em 0;
}

p {
    line-height: 1.8;
    font-size: 1.05em;
    color: var(--text-light);
}

.subtitle {
    text-align: center;
    font-size: 1.2em;
    color: var(--text-light);
    margin-bottom: 2em;
    opacity: 0.9;
}

/* Glass Card Effect */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-cyan);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: var(--secondary-cyan);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.2);
}

/* Upload Area */
.upload-area {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 3px dashed var(--border-cyan);
    border-radius: 20px;
    padding: 60px 30px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.upload-area:hover::before {
    opacity: 1;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.upload-area.dragover {
    border-color: var(--neon-cyan);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 15px;
    color: var(--secondary-cyan);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.upload-text {
    font-size: 1.4em;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 10px;
}

.upload-subtext {
    font-size: 1em;
    color: var(--text-light);
    opacity: 0.8;
}

/* File List Grid */
.file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.file-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-cyan);
    border-radius: 12px;
    padding: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.file-card:hover {
    border-color: var(--secondary-cyan);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.2);
}

.file-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.file-name {
    font-weight: 600;
    color: var(--text-white);
    font-size: 1em;
    word-break: break-word;
    flex: 1;
    margin-right: 10px;
}

.remove-btn {
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-btn:hover {
    background: #ff5588;
    transform: scale(1.1);
}

.file-info {
    font-size: 0.9em;
    color: var(--text-light);
    opacity: 0.8;
    margin-bottom: 10px;
}

.page-range-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-cyan);
    border-radius: 8px;
    background: rgba(10, 22, 40, 0.5);
    color: var(--text-white);
    font-size: 0.95em;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.page-range-input:focus {
    outline: none;
    border-color: var(--secondary-cyan);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.page-range-input::placeholder {
    color: rgba(224, 247, 255, 0.4);
}

.file-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.file-controls button {
    flex: 1;
    min-width: 60px;
}

/* Buttons */
button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--secondary-cyan));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-cyan), var(--accent-cyan));
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1px solid var(--border-cyan);
}

.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--secondary-cyan);
}

.btn-success {
    background: var(--success-color);
    color: #000;
}

.btn-success:hover {
    background: #00ffaa;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background: #ff5588;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Action Bar */
.action-bar {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px 0;
}

.action-bar button {
    min-width: 150px;
}

/* Log Area */
.log-area {
    background: rgba(10, 22, 40, 0.8);
    border: 1px solid var(--border-cyan);
    border-radius: 12px;
    padding: 15px;
    height: 150px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--neon-cyan);
    margin-bottom: 30px;
}

.log-area::-webkit-scrollbar {
    width: 8px;
}

.log-area::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.log-area::-webkit-scrollbar-thumb {
    background: var(--secondary-cyan);
    border-radius: 4px;
}

.log-entry {
    margin: 5px 0;
    padding: 3px 0;
}

.log-entry.success {
    color: var(--success-color);
}

.log-entry.error {
    color: var(--error-color);
}

.log-entry.warning {
    color: var(--warning-color);
}

/* Progress Bar */
.progress-container {
    background: rgba(10, 22, 40, 0.8);
    border: 1px solid var(--border-cyan);
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0;
    display: none;
}

.progress-container.active {
    display: block;
}

.progress-bar {
    height: 40px;
    background: linear-gradient(90deg, var(--accent-blue), var(--secondary-cyan));
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.95em;
    position: relative;
    overflow: hidden;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        left: 100%;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-cyan);
    border-left: 4px solid var(--secondary-cyan);
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--error-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

.toast-icon {
    font-size: 1.5em;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    color: var(--text-white);
    font-size: 0.95em;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.2em;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Content Sections */
.content-section {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-cyan);
    border-radius: 16px;
    padding: 40px;
    margin: 40px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.feature-item {
    background: rgba(10, 22, 40, 0.5);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-cyan);
    transition: all 0.3s ease;
}

.feature-item:hover {
    border-color: var(--secondary-cyan);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.2);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 15px;
    color: var(--secondary-cyan);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.feature-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.feature-item p {
    margin: 0;
    font-size: 0.95em;
    opacity: 0.9;
}

/* Steps Section */
.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.step-item {
    background: rgba(10, 22, 40, 0.5);
    padding: 30px;
    border-radius: 12px;
    border: 2px solid var(--border-cyan);
    text-align: center;
    position: relative;
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-blue), var(--secondary-cyan));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.step-item h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.step-item p {
    margin: 0;
    font-size: 0.95em;
    opacity: 0.9;
}

/* FAQ Section */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(10, 22, 40, 0.5);
    border: 1px solid var(--border-cyan);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--secondary-cyan);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-white);
    padding: 20px;
    text-align: left;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: rgba(0, 212, 255, 0.1);
}

.faq-toggle {
    font-size: 1.5em;
    color: var(--secondary-cyan);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px;
}

.faq-item.active .faq-answer {
    max-height: 600px;
    padding: 0 20px 20px 20px;
}

.faq-answer p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.8;
}

/* Footer */
footer {
    background: rgba(10, 22, 40, 0.9);
    border-top: 1px solid var(--border-cyan);
    padding: 30px 20px;
    text-align: center;
    margin-top: 50px;
}

footer p {
    margin: 8px 0;
    font-size: 0.95em;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.6em;
    }

    .container {
        padding: 20px 15px;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .upload-icon {
        font-size: 3em;
    }

    .upload-text {
        font-size: 1.2em;
    }

    .file-list {
        grid-template-columns: 1fr;
    }

    .action-bar {
        flex-direction: column;
    }

    .action-bar button {
        width: 100%;
    }

    .features-grid,
    .steps-container {
        grid-template-columns: 1fr;
    }

    .content-section {
        padding: 25px 20px;
    }

    .toast-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.6em;
    }

    .subtitle {
        font-size: 1em;
    }

    .upload-area {
        padding: 30px 15px;
    }

    .file-card {
        padding: 12px;
    }

    .log-area {
        height: 120px;
        font-size: 0.85em;
    }
}

/* Loading Spinner */
.spinner {
    border: 4px solid rgba(0, 212, 255, 0.2);
    border-top: 4px solid var(--secondary-cyan);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Hidden utility */
.hidden {
    display: none !important;
}