/* Create Panel Styles */
.main-container {
    padding: 40px;
    box-sizing: border-box;
}

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.settings-panel {
    flex: 1;
    min-width: 300px;
    max-width: 700px;
}

.settings-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    box-sizing: border-box;
}

/* Unified Dropdown and Header Styles */
.dropdown-header {
    font-weight: bold;
    margin-bottom: 8px;
    margin-top: 8px;
    text-align: left;
}

/* Slider Styles */
.slider-container {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    padding: 12px;
    border-radius: 15px;
    margin-bottom: 12px;
}

#duration {
    font-weight: bold;
    width: 30px;
    text-align: right;
    font-size: 18px;
    color: #333;
}

input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    width: calc(100% - 120px);
    height: 6px;
    background: #e0e0e0;
    outline: none;
    border-radius: 3px;
    transition: background 0.2s ease-in-out;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    transition: all 0.2s ease-in-out;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #2980b9;
    box-shadow: 0 0 0 6px rgba(52, 152, 219, 0.2);
}

input[type="range"]:active::-webkit-slider-thumb {
    box-shadow: 0 0 0 8px rgba(52, 152, 219, 0.3);
}

.info-icon {
    position: relative;
    width: 24px;
    height: 24px;
    background-color: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: help;
}

.info-icon::after {
    content: "?";
}

.tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    width: 250px;
    background-color: #333;
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 10;
}

.info-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* Script Input Styles */
.text-area-container {
    position: relative;
    max-width: 100%;
    margin: 12px 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 16px;
    padding-bottom: 40px;
    margin: 0 auto;
    display: block;
    box-sizing: border-box;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    outline: none;
    resize: none;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;
    background-color: #ffffff;
    color: #2c3e50;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

textarea::placeholder {
    color: #94a3b8;
    opacity: 1;
    font-weight: 400;
}

textarea:hover {
    border-color: #cbd5e1;
    background-color: #fafafa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

textarea:focus {
    border-color: #007BFF;
    box-shadow: 0 0 0 1px rgba(0, 123, 255, 0.1),
                0 2px 4px rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
}

.char-count {
    position: absolute;
    bottom: 4px;
    right: 16px;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 1;
}

.credit-cost {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
    transition: all 0.2s ease;
}

/* Create Video Button Styles */
.create-video-button {
    background-color: #4285F4;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    display: block;
    margin: 12px auto 0;
}

.create-video-button:hover {
    background-color: #3367D6;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Creating Video Popup Styles */
.creating-video-popup {
    display: none;
    position: fixed;
    z-index: 1003;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.creating-video-popup-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 90%;
    font-size: 18px;
    color: #333;
}

/* Caption Style Modal Adjustments */
.gif-option {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 10px;
    transition: border-color 0.3s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
    background-color: #cec2e3;
    width: calc(33.333% - 40px);
    height: 135px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gif-option img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.3s ease;
    padding: 8px;
}

.gif-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gif-option.selected {
    border-color: #007BFF;
}

@media (max-width: 768px) {
    .gif-option {
        width: calc(50% - 30px);
        height: 110px;
    }
}

@media (max-width: 480px) {
    .gif-option {
        width: 100%;
        height: 135px;
    }
}

/* Credit Confirmation Popup Styles */
.credit-confirmation-popup {
    display: none;
    position: fixed;
    z-index: 1004;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.credit-confirmation-popup.active {
    opacity: 1;
}

.credit-confirmation-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 90%;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.credit-confirmation-popup.active .credit-confirmation-content {
    transform: translateY(0);
    opacity: 1;
}

.credit-confirmation-content h3 {
    color: #2D3748;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.credit-confirmation-content p {
    color: #4A5568;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.credit-amount {
    color: #3182CE;
    font-weight: 600;
}

.button-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.confirm-button, .cancel-button {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    width: 140px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.confirm-button {
    background-color: #4285F4;
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(66, 133, 244, 0.2);
}

.confirm-button:hover {
    background-color: #3367D6;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(66, 133, 244, 0.3);
}

.cancel-button {
    background-color: white;
    color: #4A5568;
    border: 1px solid #E2E8F0;
}

.cancel-button:hover {
    background-color: #F7FAFC;
    border-color: #CBD5E0;
}

@media (max-width: 480px) {
    .confirm-button, .cancel-button {
        width: 120px;
        font-size: 0.8125rem;
    }
}

/* Pacing Selector Styles */
.pacing-selector {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    border: 2px solid #007BFF;
    border-radius: 25px;
    overflow: hidden;
}

.pacing-option {
    flex: 1;
    padding: 10px 0;
    background-color: #E1E8EE;
    border: none;
    color: #333;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    text-align: center;
    user-select: none;
    outline: none;
}

.pacing-option:not(:first-child) {
    border-left: 1px solid #007BFF;
}

.pacing-option:first-child {
    border-top-left-radius: 25px;
    border-bottom-left-radius: 25px;
}

.pacing-option:last-child {
    border-top-right-radius: 25px;
    border-bottom-right-radius: 25px;
}

.pacing-option:hover {
    background-color: #D0DDEE;
}

.pacing-option.selected {
    background-color: #007BFF;
    color: white;
}

/* Create Time Estimate Styles */
.create-time-estimate {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    margin-top: 8px;
    font-style: italic;
}