/* File Converter - Modern Design System */

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

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: #F8F9FA;
    color: #374151;
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
header {
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 a {
    color: #6366F1;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: inherit;
}

header nav a {
    color: #6B7280;
    text-decoration: none;
    margin-left: 2rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
}

header nav a:hover {
    color: #6366F1;
    background: #F0F9FF;
}

/* Main Content */
main {
    padding: 2rem 0;
}

.tool-header {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.tool-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    background: #6366F1;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    min-height: 44px;
    font-family: inherit;
    gap: 8px;
}

.back-btn:hover {
    background: #5B21B6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    color: #ffffff;
}

.share-btn {
    background: #10B981;
    border: 1px solid #10B981;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-family: inherit;
}

.share-btn:hover {
    background: #059669;
    border-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.tool-header h1 {
    font-size: 2.25rem;
    margin-bottom: 12px;
    color: #111827;
    font-weight: 700;
    font-family: inherit;
}

.tool-description {
    font-size: 1.125rem;
    color: #6B7280;
    max-width: 800px;
    margin: 0 auto;
    font-family: inherit;
}

/* Converter Section */
.converter-section {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.conversion-selector {
    margin-bottom: 32px;
}

.conversion-selector h2 {
    text-align: center;
    margin-bottom: 24px;
    color: #374151;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: inherit;
}

.conversion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.conversion-btn {
    background: #F8F9FA;
    border: 1px solid #E5E7EB;
    color: #374151;
    padding: 24px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: inherit;
}

.conversion-btn:hover {
    border-color: #6366F1;
    background: #F0F9FF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.conversion-btn.active {
    background: #6366F1;
    color: #ffffff;
    border-color: #6366F1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.conversion-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    color: inherit;
}

.conversion-btn h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: inherit;
}

.conversion-btn p {
    font-size: 0.875rem;
    color: inherit;
    opacity: 0.8;
    font-family: inherit;
}

.converter-container {
    display: none;
}

.converter-container.active {
    display: block;
}

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

.upload-area {
    border: 2px dashed #D1D5DB;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    background: #FAFAFA;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #6366F1;
    background: #F0F9FF;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    color: #9CA3AF;
    margin-bottom: 16px;
}

.upload-area h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
    font-family: inherit;
}

.upload-area p {
    color: #6B7280;
    margin-bottom: 16px;
    font-family: inherit;
}

.file-limit {
    color: #9CA3AF;
    font-size: 0.875rem;
    font-family: inherit;
}

/* File Info */
.file-info {
    background: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 20px;
    margin-top: 16px;
    display: none;
}

.file-info.active {
    display: block;
}

.file-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-name {
    font-weight: 600;
    color: #374151;
    font-family: inherit;
}

.file-size {
    color: #6B7280;
    font-size: 0.875rem;
    font-family: inherit;
}

.remove-file-btn {
    background: #EF4444;
    border: 1px solid #EF4444;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.remove-file-btn:hover {
    background: #DC2626;
    border-color: #DC2626;
    transform: translateY(-1px);
}

/* Text Input Section */
.text-input-section {
    margin-bottom: 32px;
    display: none;
}

.text-input-section.active {
    display: block;
}

.text-input-section h3 {
    color: #374151;
    font-weight: 600;
    margin-bottom: 16px;
    font-family: inherit;
}

.input-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.control-btn {
    padding: 8px 16px;
    background: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    color: #374151;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.control-btn:hover {
    background: #6366F1;
    border-color: #6366F1;
    color: #ffffff;
}

#inputText {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    background: #FFFFFF;
    color: #374151;
    resize: vertical;
    transition: all 0.2s ease;
}

#inputText:focus {
    outline: none;
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-stats {
    display: flex;
    gap: 24px;
    margin-top: 12px;
    font-size: 0.875rem;
    color: #6B7280;
    font-family: inherit;
}

/* Options Section */
.options-section {
    margin-bottom: 32px;
}

.options-section h3 {
    color: #374151;
    font-weight: 600;
    margin-bottom: 16px;
    font-family: inherit;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.option-group {
    background: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px;
}

.option-group label {
    display: block;
    color: #374151;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: inherit;
}

.option-group input,
.option-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    background: #FFFFFF;
    color: #374151;
    font-family: inherit;
    transition: all 0.2s ease;
}

.option-group input:focus,
.option-group select:focus {
    outline: none;
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.option-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* Convert Section */
.convert-section {
    text-align: center;
    margin-bottom: 32px;
}

.convert-btn {
    background: #6366F1;
    border: 1px solid #6366F1;
    color: #ffffff;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.convert-btn:hover {
    background: #5B21B6;
    border-color: #5B21B6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

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

.convert-btn:disabled {
    background: #9CA3AF;
    border-color: #9CA3AF;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Output Section */
.output-section {
    display: none;
}

.output-section.active {
    display: block;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.output-header h3 {
    color: #374151;
    font-weight: 600;
    font-family: inherit;
}

.output-controls {
    display: flex;
    gap: 12px;
}

.output-container {
    background: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

#outputText {
    width: 100%;
    min-height: 200px;
    border: none;
    background: transparent;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    color: #374151;
    resize: none;
}

.output-stats {
    display: flex;
    gap: 24px;
    font-size: 0.875rem;
    color: #6B7280;
    font-family: inherit;
}

/* Formats Section */
.formats-section {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.formats-section h2 {
    text-align: center;
    margin-bottom: 24px;
    color: #374151;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: inherit;
}

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

.format-card {
    background: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s ease;
}

.format-card:hover {
    background: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.format-icon {
    font-size: 2rem;
    color: #6366F1;
    margin-bottom: 16px;
}

.format-card h3 {
    color: #374151;
    font-weight: 600;
    margin-bottom: 12px;
    font-family: inherit;
}

.format-card p {
    color: #6B7280;
    line-height: 1.6;
    font-family: inherit;
}

.format-features {
    margin-top: 16px;
    text-align: left;
}

.feature {
    color: #6B7280;
    font-size: 0.875rem;
    margin-bottom: 4px;
    font-family: inherit;
}

/* Features Section */
.features-section {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.features-section h2 {
    text-align: center;
    margin-bottom: 24px;
    color: #374151;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: inherit;
}

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

.feature-card {
    background: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s ease;
}

.feature-card:hover {
    background: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2rem;
    color: #6366F1;
    margin-bottom: 16px;
}

.feature-card h3 {
    color: #374151;
    font-weight: 600;
    margin-bottom: 12px;
    font-family: inherit;
}

.feature-card p {
    color: #6B7280;
    line-height: 1.6;
    font-family: inherit;
}

/* Tips Section */
.tips-section {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tips-section h2 {
    text-align: center;
    margin-bottom: 24px;
    color: #374151;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: inherit;
}

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

.tip-card {
    background: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.tip-card:hover {
    background: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tip-card h3 {
    color: #374151;
    font-weight: 600;
    margin-bottom: 12px;
    font-family: inherit;
}

.tip-card p {
    color: #6B7280;
    line-height: 1.6;
    font-family: inherit;
}

.tip-card strong {
    color: #374151;
}

/* Footer */
footer {
    background: #FFFFFF;
    border-top: 1px solid #E5E7EB;
    padding: 24px 0;
    text-align: center;
    margin-top: 32px;
}

footer p {
    color: #6B7280;
    font-family: inherit;
}

footer a {
    color: #6366F1;
    text-decoration: none;
}

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

/* Message Container */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.message {
    padding: 16px 20px;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 12px;
    animation: slideIn 0.3s ease;
    font-family: inherit;
}

.message.success {
    background: #10B981;
    border: 1px solid #059669;
}

.message.error {
    background: #EF4444;
    border: 1px solid #DC2626;
}

.message.warning {
    background: #F59E0B;
    border: 1px solid #D97706;
}

.message.info {
    background: #3B82F6;
    border: 1px solid #2563EB;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    header .container {
        flex-direction: column;
        gap: 16px;
    }

    header nav a {
        margin-left: 1rem;
    }

    .tool-header h1 {
        font-size: 1.875rem;
    }

    .tool-header-top {
        flex-direction: column;
        gap: 16px;
    }

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

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

    .output-header {
        flex-direction: column;
        gap: 16px;
    }

    .input-controls,
    .output-controls {
        flex-wrap: wrap;
    }

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

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

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

    .message-container {
        left: 16px;
        right: 16px;
        top: 16px;
    }
}

@media (max-width: 480px) {
    .upload-area {
        padding: 32px 16px;
    }

    .conversion-btn {
        padding: 16px;
    }

    .convert-btn {
        width: 100%;
    }
}

/* Loading Animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #E5E7EB;
    border-top: 2px solid #6366F1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #6366F1;
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    .tool-header,
    .converter-section,
    .formats-section,
    .features-section,
    .tips-section {
        border-width: 2px;
    }
}

/* FAQ Section */
.file-converter-faq.faq-section {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 32px;
    margin: 32px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.file-converter-faq.faq-section h2 {
    color: #374151;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
    font-family: inherit;
}

.file-converter-faq .faq-container .faq-item {
    background: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.file-converter-faq .faq-container .faq-item .faq-question {
    background: transparent;
    border: none;
    padding: 20px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    font-family: inherit;
}

.file-converter-faq .faq-container .faq-item .faq-question:hover {
    background: #F3F4F6;
}

.file-converter-faq .faq-container .faq-item .faq-question[aria-expanded="true"] {
    background: #F3F4F6;
}

.file-converter-faq .faq-container .faq-item .faq-question .faq-toggle {
    color: #6366F1;
    font-size: 1.25rem;
    transition: transform 0.2s ease;
}

.file-converter-faq .faq-container .faq-item .faq-question[aria-expanded="true"] .faq-toggle {
    transform: rotate(180deg);
}

.file-converter-faq .faq-container .faq-item .faq-question::after {
    content: none;
}

.file-converter-faq .faq-container .faq-item .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #FFFFFF;
}

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

.file-converter-faq .faq-container .faq-item .faq-answer p {
    color: #6B7280;
    line-height: 1.6;
    margin: 0;
    font-family: inherit;
}

@media (max-width: 768px) {
    .file-converter-faq.faq-section {
        padding: 24px;
    }

    .file-converter-faq.faq-section h2 {
        font-size: 1.25rem;
    }

    .file-converter-faq .faq-container .faq-item .faq-question {
        padding: 16px;
        font-size: 1rem;
    }

    .file-converter-faq .faq-container .faq-item .faq-answer.active {
        padding: 16px;
    }
}

/* Related Tools Section */
.related-tools-section {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 32px;
    margin: 32px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.related-tools-section h2 {
    color: #374151;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
    font-family: inherit;
}

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

.related-tool-card {
    background: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.related-tool-card:hover {
    background: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.related-tool-card .tool-icon {
    font-size: 2rem;
    color: #6366F1;
    margin-bottom: 16px;
}

.related-tool-card h4 {
    color: #374151;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: inherit;
}

.related-tool-card p {
    color: #6B7280;
    font-size: 0.875rem;
    line-height: 1.5;
    font-family: inherit;
}

@media (max-width: 768px) {
    .related-tools-section {
        padding: 24px;
    }

    .related-tools-section h2 {
        font-size: 1.25rem;
    }

    .related-tools-grid {
        grid-template-columns: 1fr;
    }
} 