:root {
    --bg-color: #f0f4f8;
    --panel-bg: #ffffff;
    --panel-border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary: #1D7BE6;
    --primary-hover: #155bb5;
    --success: #10b981;
    --error: #ef4444;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism -> Flat Classes */
.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.text-gradient {
    color: var(--primary);
}

/* Navigation */
.glass-header {
    background: #ffffff;
    border-bottom: 1px solid var(--panel-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.logo img {
    height: 40px;
    width: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* Main Content Wrapper */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem;
}

/* Ads */
.ad-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.adsterra-placeholder {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    background: #e2e8f0;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin: 3rem 0;
}

.hero-section h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: var(--text-main);
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

/* Converter Box */
.converter-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
}

/* Assembly/Convert mode toggles */
.mode-toggles {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.mode-btn {
    padding: 0.75rem 2rem;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.mode-btn.active {
    background: var(--primary);
    color: white;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--primary);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    background: #f8fafc;
}

.drop-zone.active {
    background: #e0f2fe;
    border-color: var(--primary-hover);
}

.upload-icon {
    color: var(--primary);
    margin-bottom: 1rem;
}

.drop-zone h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.browse-btn {
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
}

/* Selected Files Display */
.selected-files {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.file-badge {
    background: #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
}
.file-badge .file-name {
    font-weight: 600;
    color: var(--text-main);
}

/* Settings */
.settings-panel {
    animation: fadeIn 0.3s ease forwards;
    text-align: left;
}

.settings-panel h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-main);
}

.buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.format-btn {
    border: 1px solid var(--panel-border);
    background: var(--bg-color);
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
}

.format-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.format-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Assemble Action */
.assemble-action-container {
    text-align: center;
    margin-top: 1rem;
}


.action-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.action-btn:hover {
    background: var(--primary-hover);
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

.error-msg {
    color: var(--error);
    background: #fee2e2;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.hidden {
    display: none !important;
}

/* Workspace */
.workspace-section {
    margin-top: 4rem;
}

.workspace-title {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.history-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.history-card:hover {
    border-color: var(--primary);
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.history-name {
    font-weight: 600;
}

.history-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.history-action {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.history-action:hover {
    text-decoration: underline;
}

/* Page Section */
.page-section {
    padding: 4rem 0;
}

.content-panel {
    padding: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.content-panel h1 {
    font-family: 'Outfit', sans-serif;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 2rem;
    color: var(--primary);
}

.content-panel h2 {
    margin: 2rem 0 1rem 0;
    color: var(--text-main);
}

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

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-card {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--panel-border);
}

.contact-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.contact-card a {
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--primary);
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.faq-item h3 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-item h3::before {
    content: 'Q.';
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
}

.faq-item p {
    padding-left: 28px;
    color: var(--text-muted);
}

/* Footer */
.glass-footer {
    background: #ffffff;
    border-top: 1px solid var(--panel-border);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.footer-brand h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.footer-contact h4 {
    margin-bottom: 1rem;
    color: var(--text-main);
}

.footer-contact p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer-contact a {
    color: var(--primary);
    text-decoration: none;
}

.footer-contact a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid var(--panel-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu { display: block; }
    .hero-section h1 { font-size: 2rem; }
    .converter-box { padding: 1.5rem; }
}
