/* CSS Variable definitions for global design consistency */
:root {
    --bg-dark: #0a0b0d;
    --card-bg: rgba(20, 22, 28, 0.65);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent-color: #8b5cf6; /* Purple */
    --accent-glow: rgba(139, 92, 246, 0.45);
    --cyan-glow: rgba(6, 182, 212, 0.45);
    --success-color: #10b981; /* Green */
    --success-glow: rgba(16, 185, 129, 0.35);
    --error-color: #ef4444;
    --terminal-bg: rgba(7, 8, 12, 0.9);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Background gradient blobs */
.background-decor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: orb-bounce 25s infinite alternate ease-in-out;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-color) 0%, rgba(0,0,0,0) 70%);
}

.orb-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, #06b6d4 0%, rgba(0,0,0,0) 70%); /* Cyan */
    animation-delay: -5s;
}

.orb-3 {
    top: 30%;
    right: 20%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, #ec4899 0%, rgba(0,0,0,0) 70%); /* Pink */
    animation-delay: -10s;
}

@keyframes orb-bounce {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(8%, 10%) scale(1.15); }
}

/* Container */
.container {
    width: 100%;
    max-width: 1100px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 10px;
}

.logo-area {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #06b6d4, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(to right, #ffffff, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header h1 span {
    font-weight: 300;
    color: var(--text-secondary);
    background: none;
    -webkit-text-fill-color: initial;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
    line-height: 1.6;
}

/* Layout — converter left, log right */
main {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 30px;
    align-items: start;
}

/* Right column: log sticks to top and fills height */
.log-column {
    position: sticky;
    top: 30px;
}

.log-column .terminal-container {
    /* Always visible — not toggled hidden in this layout */
    height: 100%;
    min-height: 480px;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

.log-column .terminal-body {
    flex: 1;
    overflow-y: auto;
}

@media (max-width: 900px) {
    main {
        grid-template-columns: 1fr;
    }
    .log-column {
        position: static;
    }
    .log-column .terminal-container {
        min-height: 280px;
        max-height: 400px;
    }
}

/* Cards & Glassmorphism */
.glass {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.card {
    padding: 35px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
}

.card-header h2, .card-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
}

.badge {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #a78bfa;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge-accent {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #22d3ee;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 45px 20px;
    text-align: center;
    position: relative;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--accent-color);
    background: rgba(139, 92, 246, 0.04);
    box-shadow: 0 0 20px var(--accent-glow);
}

.drop-zone.dragover {
    transform: scale(0.99);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: none;
}

.upload-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
    margin-bottom: 5px;
    transition: transform 0.3s ease;
}

.drop-zone:hover .upload-icon {
    transform: translateY(-5px);
}

.drop-zone-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.browse-link {
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 600;
}

.file-limit {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Selected File Details */
.file-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.file-info-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-icon {
    font-size: 2.2rem;
}

.file-meta {
    flex-grow: 1;
    overflow: hidden;
}

.file-meta h4 {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    outline: none;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

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

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

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px var(--success-glow);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--success-glow);
}

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

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

.btn-close {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px;
    font-size: 1.1rem;
    border-radius: 50%;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.btn-block {
    width: 100%;
}

/* Progress Section */
.progress-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #06b6d4, var(--accent-color));
    border-radius: 99px;
    transition: width 0.2s ease;
}

/* Terminal Log */
.terminal-container {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    background: rgba(25, 27, 36, 0.85);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background-color: #ef4444; }
.dot.yellow { background-color: #f59e0b; }
.dot.green { background-color: #10b981; }

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.terminal-body {
    background-color: var(--terminal-bg);
    padding: 20px;
    height: 200px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #34d399; /* Green text */
    display: flex;
    flex-direction: column;
    gap: 6px;
    scroll-behavior: smooth;
}

.log-line.system {
    color: #60a5fa; /* Blue */
}

.log-line.warning {
    color: #fbbf24; /* Amber */
}

.log-line.error {
    color: #f87171; /* Red */
}

/* Success Container */
.success-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    padding: 10px 0;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--success-color);
    border-radius: 50%;
    color: var(--success-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    box-shadow: 0 0 15px var(--success-glow);
    animation: success-pulse 2s infinite;
}

@keyframes success-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success-message {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: -10px;
}

.output-file-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 12px;
    width: 100%;
}

.ready-badge {
    color: var(--success-color) !important;
    font-weight: 600;
}

/* Sidebar styling */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.code-block {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #e5e7eb;
}

.code-block pre {
    margin: 0;
}

.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-title {
    font-size: 0.95rem;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.info-list p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Footer */
footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

/* Summary Card Details */
.summary-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.summary-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.summary-metrics {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.metric {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 10px 5px;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #06b6d4, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.summary-table-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.summary-table th, .summary-table td {
    padding: 10px 12px;
    text-align: left;
}

.summary-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-weight: 600;
    position: sticky;
    top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.summary-table tr:last-child td {
    border-bottom: none;
}

/* Format Selection Styling */
.format-selection {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
    text-align: left;
}

.format-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.format-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.format-option-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.format-option-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.format-option-card input[type="radio"] {
    margin-top: 4px;
    accent-color: var(--accent-color);
    width: 16px;
    height: 16px;
}

.format-option-card:has(input[type="radio"]:checked) {
    border-color: var(--accent-color);
    background: rgba(139, 92, 246, 0.04);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

.option-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.option-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.option-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* VCF Combine sub-option */
.vcf-combine-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 15px;
    margin-top: 4px;
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.vcf-combine-option:hover {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.1);
}

.vcf-combine-option input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--accent-color);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.vcf-combine-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.88rem;
}

.vcf-combine-details strong {
    color: var(--text-primary);
    font-weight: 600;
}

.vcf-combine-details span {
    color: var(--text-secondary);
    line-height: 1.4;
    font-size: 0.8rem;
}

.vcf-combine-details em {
    color: var(--accent-color);
    font-style: normal;
    font-weight: 500;
}

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