:root {
    --bg-dark: #0f111a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #f8f9fa;
    --text-muted: #a0aab2;
    --accent-primary: #6366f1;
    --accent-secondary: #a855f7;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --accent-glow: rgba(99, 102, 241, 0.4);
    --success: #10b981;
    --danger: #ef4444;
    --font-family: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Animated Shapes */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    animation: float 20s infinite alternate ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.15);
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: rgba(168, 85, 247, 0.15);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: rgba(16, 185, 129, 0.1);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

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

.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    z-index: 1;
}

.app-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.app-header .logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: var(--accent-gradient);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    color: white;
    box-shadow: 0 10px 25px var(--accent-glow);
}

.app-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.5;
}

/* Glassmorphism Card */
.converter-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-icon-container, .file-icon-container, .success-icon-container {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    transition: var(--transition);
}

.upload-icon-container {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.drop-zone:hover .upload-icon-container {
    background: var(--accent-gradient);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--accent-glow);
}

.file-icon-container {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
}

.success-icon-container {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

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

.drop-zone .subtitle {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.drop-zone .file-hint {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
}

/* File State */
.file-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.file-size {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.remove-btn {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
    padding: 8px 16px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 auto;
    transition: var(--transition);
}

.remove-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
}

/* Actions Panel */
.actions {
    margin-top: 1.5rem;
}

.primary-btn, .secondary-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    border: none;
}

.primary-btn {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.primary-btn:active {
    transform: translateY(1px);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Progress Panel */
.progress-panel {
    text-align: center;
    padding: 2rem 0;
}

.status-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#status-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
}

.progress-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Success Panel */
.success-panel {
    text-align: center;
    padding: 1rem 0;
}

.success-panel h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.success-panel p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Render Container Styles for PDF Export */
#pdf-render-container {
    background: white;
    color: black;
    padding: 40px;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
}

#pdf-render-container h1, 
#pdf-render-container h2, 
#pdf-render-container h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #111;
}

#pdf-render-container p {
    margin-bottom: 1em;
}

#pdf-render-container table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

#pdf-render-container table, 
#pdf-render-container th, 
#pdf-render-container td {
    border: 1px solid #ccc;
}

#pdf-render-container th, 
#pdf-render-container td {
    padding: 8px;
    text-align: left;
}

@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }
    
    .app-header h1 {
        font-size: 2rem;
    }
    
    .drop-zone {
        padding: 2rem 1rem;
    }
}
