/* ============================================
   Variable Definitions
   ============================================ */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f5f5;
    --white: #ffffff;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* ============================================
   Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   Header Styles
   ============================================ */
.header {
    text-align: center;
    color: var(--white);
    margin-bottom: 30px;
    padding: 40px 20px;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.title-icon {
    font-size: 3.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* ============================================
   Bookmark Banner
   ============================================ */
.bookmark-banner {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    padding: 15px 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    animation: slideDown 0.5s ease;
}

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

.bookmark-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.bookmark-icon {
    font-size: 1.5rem;
}

.bookmark-text {
    font-size: 0.95rem;
    color: var(--text-color);
}

.bookmark-close {
    position: absolute;
    right: 0;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.bookmark-close:hover {
    background: var(--bg-color);
    color: var(--text-color);
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    margin-bottom: 40px;
}

.converter-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Upload Section
   ============================================ */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed var(--primary-color);
    border-radius: var(--border-radius);
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transition: var(--transition);
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: var(--success-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

.upload-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
}

.upload-subtitle {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.upload-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Files Section
   ============================================ */
.files-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-color);
}

.files-list {
    margin-bottom: 20px;
}

.file-item {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.file-item:hover {
    background: #e9e9e9;
    transform: translateX(5px);
}

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

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

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

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

.file-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: var(--error-color);
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Progress Section
   ============================================ */
.progress-section {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ============================================
   Results Section
   ============================================ */
.results-section {
    margin-bottom: 30px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-item {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 2px solid var(--success-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.result-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.result-icon {
    font-size: 2rem;
}

.result-details {
    flex: 1;
}

.result-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.result-status {
    font-size: 0.85rem;
    color: var(--success-color);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
}

/* ============================================
   Features Section
   ============================================ */
.features-section {
    margin-bottom: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--bg-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-card {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ============================================
   About Section
   ============================================ */
.about-section {
    padding-top: 30px;
    border-top: 2px solid var(--bg-color);
    margin-bottom: 40px;
}

.about-content {
    line-height: 1.8;
    color: var(--text-color);
}

.about-content p {
    margin-bottom: 20px;
    font-size: 1rem;
}

.about-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-top: 25px;
    margin-bottom: 15px;
}

.about-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.about-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.about-content li strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* ============================================
   FAQ Section
   ============================================ */
.faq-section {
    padding-top: 30px;
    border-top: 2px solid var(--bg-color);
}

.faq-list {
    margin-top: 20px;
}

.faq-item {
    background: var(--bg-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow-sm);
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-color);
    transition: var(--transition);
}

.faq-question:hover {
    background: #e9e9e9;
}

.faq-toggle {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 20px;
    color: var(--text-light);
    line-height: 1.8;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 20px 20px 20px;
}

/* ============================================
   Floating Navigation
   ============================================ */
.floating-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 15px;
    z-index: 1000;
    min-width: 180px;
    max-width: 200px;
    transition: var(--transition);
}

.floating-nav:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.floating-nav-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--bg-color);
}

.nav-icon {
    font-size: 1.2rem;
}

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

.floating-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.floating-nav-list li {
    margin-bottom: 5px;
}

.nav-link {
    display: block;
    padding: 10px 12px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition);
    font-size: 0.9rem;
    position: relative;
}

.nav-link:hover {
    background: var(--bg-color);
    color: var(--primary-color);
    transform: translateX(-3px);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--primary-color);
    border-radius: 0 2px 2px 0;
}

/* Hide floating nav on mobile and tablet */
@media (max-width: 1024px) {
    .floating-nav {
        display: none;
    }
}

/* ============================================
   Recent Conversions Section
   ============================================ */
.recent-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--bg-color);
}

.recent-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-item {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    transition: var(--transition);
}

.recent-item:hover {
    background: #e9e9e9;
    transform: translateX(5px);
}

.recent-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.recent-item-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.recent-item-details {
    flex: 1;
    min-width: 0;
}

.recent-item-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-item-time {
    font-size: 0.85rem;
    color: var(--text-light);
}

.recent-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    text-align: center;
    color: var(--white);
    padding: 30px 20px;
    opacity: 0.9;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    margin: 0 10px;
    transition: var(--transition);
}

.footer-links a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .title {
        font-size: 2rem;
    }

    .title-icon {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .converter-card {
        padding: 20px;
    }

    .upload-area {
        padding: 40px 15px;
    }

    .upload-icon {
        font-size: 3rem;
    }

    .upload-title {
        font-size: 1.2rem;
    }

    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .file-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .result-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 10px;
    }

    .header {
        padding: 20px 10px;
    }

    .upload-area {
        padding: 30px 10px;
    }

    .upload-icon {
        font-size: 2.5rem;
    }
}

