:root {
    --bg-color: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --panel-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #0ea5e9;
    --accent-hover: #0284c7;
    --success-color: #10b981;
    --blob-1: rgba(14, 165, 233, 0.3);
    --blob-2: rgba(16, 185, 129, 0.3);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Glassmorphism Backgrounds */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    animation: float 20s infinite ease-in-out alternate;
    opacity: 0.8;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--blob-1);
    top: -200px;
    left: -200px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--blob-2);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-height: 100vh;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 1rem;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: var(--transition);
}

.logo-link:hover {
    transform: scale(1.02);
}

.jumperz-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    flex: 1;
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Upload Section */
.drop-zone {
    border: 2px dashed var(--panel-border);
    border-radius: var(--radius-md);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.3);
    flex: 1;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--accent-color);
    background: rgba(14, 165, 233, 0.1);
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.15) inset;
}

/* Instructions Section */
.instructions-section {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    padding: 1.5rem 2rem;
    margin-bottom: 0.5rem;
}

.step-card {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--success-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.step-text h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.step-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.step-line {
    width: 2px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 1rem;
    align-self: center;
}

@media (max-width: 768px) {
    .instructions-section {
        flex-direction: column;
        gap: 1.5rem;
    }
    .step-line {
        width: 100%;
        height: 1px;
        margin: 0;
    }
    .logo-container {
        flex-direction: column;
        gap: 4px;
    }
}

.upload-icon {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.drop-zone h2 {
    margin: 0;
    font-size: 1.25rem;
}

.drop-zone p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* File Info & Preview */
.file-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.hidden {
    display: none !important;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.5);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--panel-border);
}

.info-header svg {
    color: var(--accent-color);
}

#filename {
    flex: 1;
    font-size: 1.1rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.info-details {
    display: flex;
    gap: 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.info-details strong {
    color: var(--text-primary);
}

.preview-container {
    flex: 1;
    min-height: 300px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--panel-border);
    background: #fff; /* PDF background usually white */
}

#pdf-preview {
    width: 100%;
    height: 100%;
    display: block;
}

/* Settings Panel */
.presets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-preset {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    font-family: inherit;
}

.btn-preset:hover {
    border-color: var(--accent-color);
    background: rgba(14, 165, 233, 0.05);
}

.btn-preset.active {
    border-color: var(--accent-color);
    background: rgba(14, 165, 233, 0.1);
    box-shadow: 0 0 0 1px var(--accent-color);
}

.preset-name {
    font-weight: 500;
    font-size: 1rem;
}

.preset-size {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.input-group-row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.input-group input {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

.input-group-divider {
    padding-bottom: 12px;
    color: var(--text-secondary);
}

/* Radio Buttons */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-label {
    display: flex;
    cursor: pointer;
    position: relative;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--panel-border);
    background: rgba(15, 23, 42, 0.3);
    transition: var(--transition);
}

.radio-label:has(input:checked) {
    border-color: var(--accent-color);
    background: rgba(14, 165, 233, 0.05);
}

.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 32px;
    position: relative;
}

.radio-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--text-secondary);
    transition: var(--transition);
}

.radio-label input:checked ~ .radio-content::before {
    border-color: var(--accent-color);
}

.radio-label input:checked ~ .radio-content::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-color);
    transform: scale(0);
    animation: popIn 0.2s forwards;
}

@keyframes popIn {
    to { transform: scale(1); }
}

.radio-title {
    font-weight: 500;
    font-size: 1rem;
}

.radio-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), var(--success-color));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition);
    margin-top: auto;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-primary:disabled svg {
    opacity: 0.5;
}
