/* Modern Caption Generator Styles */
.caption-wrapper-gahiim {
    max-width: 800px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 26px; /* Base font size */
}

.header-section-gahiim {
    text-align: center;
    margin-bottom: 2rem;
}

.title-gahiim {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1rem;
    background: linear-gradient(120deg, #2271b1, #135e96);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle-gahiim {
    font-size: 1.125rem; /* Increased from 1rem */
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.generator-card-gahiim {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    transition: transform 0.3s ease;
}

.generator-card-gahiim:hover {
    transform: translateY(-2px);
}

.input-section-gahiim {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.textarea-container-gahiim {
    position: relative;
    border-radius: 12px;
    background: #f8f9fa;
    padding: 1rem;
    transition: all 0.3s ease;
}

.textarea-container-gahiim:focus-within {
    background: #fff;
    box-shadow: 0 0 0 2px #2271b1;
}

.input-field-gahiim {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: none;
    background: transparent;
    font-size: 1.125rem; /* Increased from 1rem */
    line-height: 1.6;
    resize: vertical;
    color: #333;
}

.input-field-gahiim:focus {
    outline: none;
}

.controls-section-gahiim {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.select-group-gahiim {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.select-wrapper-gahiim {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.select-label-gahiim {
    font-size: 1rem; /* Increased from 0.875rem */
    font-weight: 500;
    color: #666;
}

.select-field-gahiim {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1em;
    transition: all 0.3s ease;
}

.select-field-gahiim option {
    padding: 10px;
    font-size: 1rem;
    background-color: #fff;
    color: #333;
}

.select-field-gahiim option:checked,
.select-field-gahiim option:selected {
    background: #2271b1;
    color: #fff;
}

.select-field-gahiim:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.select-field-gahiim:hover {
    border-color: #2271b1;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .select-field-gahiim {
        background-color: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }

    .select-field-gahiim option {
        background-color: #2d2d2d;
        color: #e0e0e0;
    }

    .select-field-gahiim option:checked,
    .select-field-gahiim option:selected {
        background: #2271b1;
        color: #fff;
    }
}

.hashtag-section-gahiim {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.hashtag-toggle-gahiim {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-gahiim {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 4px;
    border: 2px solid #2271b1;
    appearance: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-gahiim:checked {
    background-color: #2271b1;
}

.checkbox-gahiim:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
}

.toggle-label-gahiim {
    font-size: 1rem; /* Increased from 0.875rem */
    font-weight: 500;
    color: #333;
}

.hashtag-select-gahiim {
    flex: 1;
    max-width: 150px;
}

.button-section-gahiim {
    margin-top: 1rem;
}

.submit-button-gahiim {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(120deg, #2271b1, #135e96);
    color: #fff;
    font-size: 1.125rem; /* Increased from 1rem */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-button-gahiim:hover {
    background: linear-gradient(120deg, #135e96, #2271b1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.2);
}

.button-content-gahiim {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.button-icon-gahiim {
    font-size: 1.25rem;
}

.spinner-gahiim {
    display: inline-block;
    margin-left: 0.5rem;
}

.spinner-icon-gahiim {
    animation: spin-gahiim 1s linear infinite;
}

@keyframes spin-gahiim {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.output-section-gahiim {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.error-message-gahiim {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff2f2;
    border-radius: 8px;
    border-left: 4px solid #dc3232;
    color: #dc3232;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .caption-wrapper-gahiim {
        margin: 1rem;
        font-size: 18px; /* Adjusted base font size for mobile */
    }

    .generator-card-gahiim {
        padding: 1rem;
    }

    .title-gahiim {
        font-size: 1.75rem;
    }

    .subtitle-gahiim {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .textarea-container-gahiim {
        background: #1a1a1a;
        border-radius: 12px;
        border: 2px solid #3a3a3a;
        position: relative;
    }

    .input-field-gahiim {
        width: 100%;
        min-height: 100px;
        padding: 1rem;
        background: #1a1a1a;
        color: #ffffff;
        font-weight: 600;
        font-size: 16px;
        line-height: 1.6;
        border: none;
    }

    .textarea-container-gahiim:focus-within {
        border-color: #2271b1;
        box-shadow: 0 0 0 1px #2271b1;
    }

    .select-field-gahiim {
        width: 100%;
        height: auto;
        min-height: 50px;
        padding: 12px 35px 12px 15px;
        font-size: 16px;
        line-height: 1.4;
        white-space: normal;
        background-color: #1a1a1a;
        color: #ffffff;
        font-weight: 600;
        border: 2px solid #3a3a3a;
        border-radius: 8px;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 16px;
    }

    .select-label-gahiim {
        color: #666;
        margin-bottom: 8px;
        display: block;
        font-size: 14px;
    }

    .select-wrapper-gahiim {
        position: relative;
    }

    .select-field-gahiim:focus {
        border-color: #2271b1;
        box-shadow: 0 0 0 1px #2271b1;
    }

    .select-field-gahiim option {
        padding: 12px 15px;
        min-height: 50px;
        font-size: 16px;
        line-height: 1.4;
        background-color: #1a1a1a;
        color: #ffffff;
        font-weight: 600;
    }

    .select-field-gahiim option:checked {
        background: #2271b1;
        color: #ffffff;
        font-weight: 600;
    }

    /* Add subtle hover effects */
    .textarea-container-gahiim:hover,
    .select-field-gahiim:hover {
        border-color: #4a4a4a;
    }

    .controls-section-gahiim {
        gap: 1rem;
    }

    .select-group-gahiim {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .select-wrapper-gahiim {
        width: 100%;
        margin-bottom: 10px;
    }

    .select-label-gahiim {
        margin-bottom: 8px;
        display: block;
    }

    .hashtag-section-gahiim {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.875rem;
        padding: 0.875rem;
    }

    .hashtag-toggle-gahiim {
        width: 100%;
    }

    .hashtag-select-gahiim {
        width: 100%;
        max-width: 100%;
    }

    .submit-button-gahiim {
        padding: 0.875rem;
        font-size: 1rem;
        height: 3rem;
    }

    .button-icon-gahiim {
        font-size: 1rem;
    }

    /* Generated content adjustments for mobile */
    .generated-caption-gahiim {
        padding: 1rem;
    }

    .caption-number-gahiim {
        font-size: 1.125rem;
    }

    .main-text-gahiim {
        font-size: 1rem;
    }

    .hashtags-gahiim {
        font-size: 1rem;
        padding: 0.875rem;
    }

    .caption-meta-gahiim {
        flex-direction: column;
        gap: 0.875rem;
        align-items: stretch;
    }

    .copy-btn-gahiim,
    .regenerate-btn-gahiim {
        width: 100%;
        padding: 0.875rem;
        font-size: 1rem;
        height: 3rem;
    }

    .character-count-gahiim {
        text-align: center;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .generator-card-gahiim {
        background: #1f1f1f;
    }

    .title-gahiim {
        background: linear-gradient(120deg, #3498db, #2ecc71);
        -webkit-background-clip: text;
    }

    .subtitle-gahiim {
        color: #888;
    }

    .input-field-gahiim {
        color: #e0e0e0;
    }

    .select-field-gahiim {
        background-color: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }

    .hashtag-section-gahiim {
        background: #2d2d2d;
    }

    .toggle-label-gahiim {
        color: #e0e0e0;
    }
}

.generated-caption-gahiim {
    margin-top: 20px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.caption-number-gahiim {
    font-size: 1.25rem; /* Increased */
    color: #2271b1;
    font-weight: 600;
    margin-bottom: 1rem;
}

.caption-content-gahiim {
    padding: 10px 0;
}

.main-text-gahiim {
    font-size: 1.125rem; /* Increased */
    line-height: 1.6;
    color: #333;
    margin-bottom: 1rem;
}

.hashtags-gahiim {
    font-size: 1.125rem; /* Increased */
    color: #2271b1;
    line-height: 1.6;
}

.hashtag-wrapper-gahiim {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hashtag-wrapper-gahiim label {
    margin-right: 5px;
    white-space: nowrap;
}

.hashtag-count-gahiim {
    min-width: 100px;
}

.caption-meta-gahiim {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f1;
}

.character-count-gahiim {
    margin-right: auto;
    font-size: 1rem; /* Increased */
    color: #666;
}

.copy-btn-gahiim,
.regenerate-btn-gahiim {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    padding: 0.75rem 1rem;
    background: #ffffff;
    color: #2271b1;
    border: 2px solid #2271b1;
    border-radius: 4px;
    font-size: 1rem; /* Increased */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.copy-btn-gahiim:hover,
.regenerate-btn-gahiim:hover {
    background: #2271b1;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.copy-btn-gahiim:active,
.regenerate-btn-gahiim:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

@media (min-width: 768px) {
    .options-row-gahiim {
        flex-direction: row;
        gap: 20px;
    }
    
    .select-field-gahiim {
        flex: 1;
    }
    
    .hashtag-row-gahiim {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .hashtag-wrapper-gahiim {
        justify-content: flex-start;
    }
}