/*
 * Unified Lemon Theme CSS
 * Combines styles from the three source files with duplications removed
 */

:root {
    --white: #ffffff;
    --black: #222222;
    --shadow: rgba(0, 0, 0, 0.1);
    --gray-medium: #555555;
    --gray-light: #888888;
    --lemon-yellow: #F2CB05;
    --lemon-yellow-light: #F2F2D0;
    --lemon-yellow-dark: #D9B504;
    --lemon-green: #83BF4F;
    --lemon-green-dark: #6B9E3F;
    --success-green: #4CAF50;
}

/* Card Components */
.card {
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: 0 6px 12px var(--shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

.card-header {
    background-color: var(--lemon-yellow-light);
    padding: 1.2rem;
    border-bottom: 3px solid var(--lemon-yellow);
    color: var(--black);
}

.intro-text {
    color: var(--black);
}

.card-body {
    padding: 1.5rem;
}

/* Form Controls */
#videoInput {
    display: none;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--gray-medium);
}

.range-container {
    display: flex;
    align-items: center;
}

.range-value {
    background-color: var(--lemon-yellow);
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    font-weight: 600;
    color: var(--gray-medium);
    min-width: 60px;
    text-align: center;
}

.form-control {
    width: 100%;
    padding: 0.7rem;
    border: 2px solid var(--lemon-yellow-light);
    border-radius: 8px;
    background-color: var(--white);
    color: var(--gray-medium);
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--lemon-green);
    outline: none;
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: var(--lemon-yellow-light);
    border-radius: 5px;
    height: 1.5rem;
    cursor: pointer;
    margin-right: 1rem;
    width: 100%;
    padding: 0;
    border: 1px solid var(--lemon-yellow);
    flex-grow: 1;
    outline: none;
}

/* Webkit Slider Thumb */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background-color: var(--lemon-green);
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid var(--gray-medium);
}

/* Mozilla Slider Thumb */
input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--lemon-green);
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid var(--gray-medium);
}

/* Slider with colored track */
input[type="range"] {
    background: linear-gradient(to right, var(--lemon-green) 0%, var(--lemon-green) calc((var(--value) - var(--min)) / (var(--max) - var(--min)) * 100%), var(--lemon-yellow-light) calc((var(--value) - var(--min)) / (var(--max) - var(--min)) * 100%), var(--lemon-yellow-light) 100%);
    --value: 26;
    --min: 18;
    --max: 32;
}

/* Estimation Info Box */
.estimation-info {
    background-color: var(--white);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--lemon-yellow-light);
}

.estimation-status {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    color: var(--gray-medium);
}

.estimation-status i {
    margin-right: 0.5rem;
    color: var(--lemon-yellow-dark);
}

.estimation-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    color: var(--black);
}

.estimation-note {
    font-size: 0.8rem;
    color: var(--black);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Settings Toggle & Panel */
.settings-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background-color: var(--lemon-yellow-light);
    border-radius: 8px;
    cursor: pointer;
    margin: 1rem 0;
    font-weight: 600;
    color: var(--gray-medium);
    transition: all 0.3s ease;
}

.settings-toggle:hover {
    background-color: var(--lemon-yellow);
}

.settings-toggle i {
    transition: transform 0.3s ease;
}

.settings-panel {
    background-color: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
    border: 1px solid var(--lemon-yellow-light);
}

.settings-panel.collapsed {
    display: none;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
    font-size: 1rem;
}

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

.btn-primary {
    background-color: var(--lemon-yellow);
    color: var(--gray-medium);
}

.btn-primary:hover {
    background-color: var(--lemon-yellow-dark);
    color: var(--black);
}

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

.btn-success:hover {
    background-color: var(--lemon-green-dark);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--lemon-yellow-dark);
    color: var(--gray-medium);
    flex: 1;
}

.btn-outline:hover {
    background-color: var(--lemon-yellow-light);
}

/* Output Container */
.output-container {
    display: none;
    margin-top: 1.5rem;
}

/* Video Preview */
.video-preview-container {
    margin-bottom: 1rem;
    border: 2px solid var(--lemon-yellow-light);
    border-radius: 8px;
    overflow: hidden;
}

.video-preview {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
    background-color: var(--black);
}

.gif-preview {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 2px solid var(--lemon-yellow-light);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Progress Bar */
.progress-container {
    display: none;
    margin: 1.5rem 0;
    background-color: var(--white);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--lemon-yellow-light);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--gray-medium);
    font-weight: 600;
}

.progress-bar-container {
    height: 8px;
    background-color: var(--lemon-yellow-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background-color: var(--lemon-green);
    border-radius: 4px;
    width: 0;
    transition: width 0.3s ease;
}

.progress-status {
    font-size: 0.9rem;
    color: var(--gray-medium);
}

/* Comparison Styles */
.comparison {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.comparison-item {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 1rem;
    background-color: var(--lemon-yellow-light);
    margin: 0 0.5rem;
    border-radius: 8px;
}

.comparison-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-medium);
    margin-bottom: 0.3rem;
}

.comparison-label {
    font-size: 0.9rem;
    color: var(--gray-medium);
}

/* Format Section Styling */
.format-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 8px var(--shadow);
}

.format-heading {
    color: var(--gray-medium);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--lemon-yellow);
    display: flex;
    align-items: center;
}

.format-heading i {
    margin-right: 0.5rem;
    color: var(--lemon-yellow-dark);
}

.format-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    justify-content: center;
}

.format-card {
    flex: 1 1 220px;
    max-width: 280px;
    min-width: 180px;
    background-color: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 3px 6px var(--shadow);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: 2px solid var(--lemon-yellow-light);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.format-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px var(--shadow);
    border-color: var(--lemon-yellow);
    background-color: var(--lemon-yellow-light);
}

.format-icon {
    width: 60px;
    height: 60px;
    background-color: var(--lemon-yellow-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.format-card:hover .format-icon {
    background-color: var(--lemon-yellow);
}

.format-icon i {
    font-size: 1.5rem;
    color: var(--lemon-yellow-dark);
}

.format-type {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--gray-medium);
}

.format-desc {
    font-size: 0.9rem;
    color: var(--gray-medium);
    line-height: 1.4;
}

/* FAQ Section Styles */
.faq-section {
    margin-top: 2rem;
}

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

.faq-question {
    background-color: var(--white);
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.active {
    padding: 1rem 1.5rem;
    max-height: 500px;
}

/* Responsive design */
@media (max-width: 768px) {
    .comparison {
        flex-direction: column;
    }

    .comparison-item {
        margin: 0.5rem 0;
        min-width: auto;
    }

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

    .format-card {
        min-width: 150px;
        padding: 1.2rem;
    }

    .format-icon {
        width: 50px;
        height: 50px;
    }

    .format-type {
        font-size: 1rem;
    }

    .format-desc {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .format-card {
        min-width: 130px;
        flex: 1 1 130px;
    }

    .range-container {
        flex-direction: column;
        align-items: stretch;
    }

    .range-value {
        align-self: flex-end;
        margin-top: 0.5rem;
        margin-left: 0;
    }
}