/* TIFF Converter Styles */
:root {
    --primary-color: #4a6cf7;
    --primary-hover: #3a5ce4;
    --secondary-color: #6c757d;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --darker-gray: #2c3034;
    --border-color: #e1e4e8;
    --text-color: #333;
    --text-light: #6c757d;
    --text-lightest: #adb5bd;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --header-height: 70px;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    color: var(--dark-gray);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.tool-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Converter Container */
.converter-container {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 3rem;
}

/* Upload Section */
.upload-section {
    padding: 3rem 2rem;
    text-align: center;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    margin: 1.5rem;
    transition: var(--transition);
    background-color: #f9faff;
    cursor: pointer;
}

.upload-section.highlight,
.upload-section:hover {
    border-color: var(--primary-color);
    background-color: rgba(74, 108, 247, 0.05);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.upload-section h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--dark-gray);
}

.upload-section p {
    color: var(--text-light);
    margin: 1rem 0;
}

.file-types {
    font-size: 0.9rem;
    color: var(--text-lightest);
    margin-top: 1rem;
}

/* File List */
.file-list {
    display: none;
    margin: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.file-list.visible {
    display: block;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: #fff;
    transition: var(--transition);
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background-color: var(--light-gray);
}

.file-info {
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.file-info i {
    color: var(--primary-color);
    margin-right: 1rem;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-color);
    margin-right: 1rem;
}

.file-size {
    color: var(--text-light);
    font-size: 0.9rem;
    white-space: nowrap;
    margin-left: auto;
    padding-left: 1rem;
}

/* Conversion Options */
.conversion-options {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: #f9f9f9;
}

.conversion-options h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--dark-gray);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.conversion-options h3 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.option-group {
    margin-bottom: 1rem;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-gray);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: #fff;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(74, 108, 247, 0.25);
    outline: none;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 1.1em;
    height: 1.1em;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Results Section */
.results-section {
    display: none;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.results-section h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--dark-gray);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.results-section h3 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

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

.result-item {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.result-preview {
    height: 180px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f7fa;
}

.result-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.result-info {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.result-name {
    display: block;
    font-weight: 500;
    color: var(--dark-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

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

.result-actions {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
}

.bulk-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Info Section */
.info-section {
    margin: 4rem 0;
    padding: 0 1rem;
}

.info-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--dark-gray);
    font-size: 2rem;
}

.info-section p {
    color: var(--text-light);
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

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

.feature {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: rgba(74, 108, 247, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.feature h3 {
    color: var(--dark-gray);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.feature p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
    text-align: center;
}

/* FAQ Section */
.faq-section {
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 1rem;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--dark-gray);
    font-size: 2rem;
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.faq-question {
    padding: 1.25rem 1.5rem;
    background: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background-color: #f9f9f9;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--dark-gray);
    font-weight: 500;
}

.faq-question i {
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #f9f9f9;
}

.faq-answer p {
    margin: 0;
    padding: 1.5rem;
    color: var(--text-light);
    line-height: 1.7;
    border-top: 1px solid var(--border-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
}

.btn-secondary {
    color: var(--dark-gray);
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.btn-secondary:hover {
    background-color: #e2e6ea;
    border-color: #dae0e5;
    color: var(--dark-gray);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

.btn-remove {
    color: var(--danger-color);
    background: none;
    border: none;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
}

.btn-remove:hover {
    opacity: 1;
    color: #c82333;
}

.btn-download {
    background-color: var(--success-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-download:hover {
    background-color: #218838;
    color: white;
    text-decoration: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .tool-header h1 {
        font-size: 2.2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2rem;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .file-info {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .file-size {
        margin-left: 0;
        padding-left: 0;
    }
    
    .result-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 576px) {
    .tool-header h1 {
        font-size: 1.75rem;
    }
    
    .upload-section {
        padding: 2rem 1rem;
    }
    
    .upload-section h3 {
        font-size: 1.25rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-question h3 {
        font-size: 1rem;
    }
    
    .faq-answer p {
        padding: 1rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        padding: 0;
        margin: 0;
        color: #000;
        background: #fff;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
    
    .results-grid {
        display: block;
    }
    
    .result-item {
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
}
