/* General Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    transition: all 0.3s ease;
    border: 2px dashed transparent;
}

/* Стиль для drag & drop */
.container.highlight {
    border: 2px dashed #3498db;
    background-color: rgba(52, 152, 219, 0.05);
    border-radius: 8px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    animation: fadeIn 0.8s ease-in-out;
}

header h1 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 32px;
}

header p {
    color: #7f8c8d;
    font-size: 18px;
}

/* Main Content */
main {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

/* Features Section */
.features {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-bottom: 30px;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    max-width: 300px;
    padding: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 36px;
    margin-right: 15px;
}

.feature-text h3 {
    margin-bottom: 5px;
    color: #2c3e50;
}

.feature-text p {
    color: #7f8c8d;
    font-size: 14px;
}

/* Drag and Drop Hint */
.drag-drop-hint {
    text-align: center;
    margin: 20px 0;
    color: #7f8c8d;
    font-style: italic;
}

/* Format Info */
.formats-info {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    color: #7f8c8d;
}

/* Processing Details */
.processing-details {
    margin-top: 20px;
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
}

/* Result Buttons */
.result-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

/* Video Info Container */
.video-info-container {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
}

.video-info-container h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.video-info-container ul {
    list-style-type: none;
    padding: 0;
}

.video-info-container li {
    margin-bottom: 5px;
    color: #7f8c8d;
}

/* Error Details */
.error-details {
    margin: 15px 0;
    color: #7f8c8d;
    font-size: 14px;
}

/* FAQ Section */
.faq-section {
    margin-top: 40px;
    animation: fadeIn 1s ease-in-out;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.faq-item {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.faq-item h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 16px;
}

.faq-item p {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.5;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* File Input */
.file-input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

#file-input {
    display: none;
}

.file-input-label {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;
    margin-bottom: 10px;
}

.file-input-label:hover {
    background-color: #2980b9;
}

#file-name {
    color: #7f8c8d;
    font-size: 14px;
}

#upload-button {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 12px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s;
}

#upload-button:hover {
    background-color: #27ae60;
}

/* Progress Bar */
.progress-status {
    text-align: center;
}

#status-text {
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: bold;
}

.progress-bar-container {
    width: 100%;
    background-color: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

#progress-bar {
    height: 20px;
    background-color: #3498db;
    width: 0%;
    transition: width 0.3s;
}

#progress-percentage {
    font-size: 14px;
    color: #7f8c8d;
}

/* Processing */
.processing-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border-left-color: #3498db;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#processing-text {
    color: #2c3e50;
    font-weight: bold;
}

/* Result */
.result-status {
    text-align: center;
}

#result-message {
    margin-bottom: 20px;
    color: #2c3e50;
    font-weight: bold;
}

#download-button {
    padding: 12px 30px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    margin-right: 10px;
    transition: background-color 0.3s;
}

#download-button:hover {
    background-color: #2980b9;
}

#convert-another-button {
    padding: 12px 30px;
    background-color: #95a5a6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

#convert-another-button:hover {
    background-color: #7f8c8d;
}

/* Error */
.error-status {
    text-align: center;
    padding: 20px;
}

#error-message {
    color: #e74c3c;
    margin-bottom: 20px;
    font-weight: bold;
}

#try-again-button {
    padding: 12px 30px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

#try-again-button:hover {
    background-color: #c0392b;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    color: #7f8c8d;
    font-size: 14px;
    position: relative;
    border-top: 1px solid #eee;
    margin-top: 40px;
}

.footer-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Statistics Button */
.stats-button {
    background-color: #7f8c8d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s;
}

.stats-button:hover {
    background-color: #6c7a7d;
}

/* Processing Time Display */
.processing-time {
    margin-top: 15px;
    color: #7f8c8d;
    font-size: 14px;
    font-style: italic;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 26px;
    }

    header p {
        font-size: 16px;
    }

    main {
        padding: 20px;
    }

    .features {
        flex-direction: column;
        align-items: center;
    }

    .feature-item {
        width: 100%;
        max-width: 100%;
    }

    .result-buttons {
        flex-direction: column;
        gap: 10px;
    }

    #download-button, #convert-another-button, #try-again-button {
        width: 100%;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}