/* IG Caption AI - Main Styles */
.igcai-container {
    max-width: 800px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
}

.igcai-theme-light {
    background: #ffffff;
    color: #333;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

.igcai-theme-dark {
    background: #1a1a1a;
    color: #f0f0f0;
    border-radius: 12px;
    padding: 30px;
}

.igcai-theme-dark .igcai-form-group label,
.igcai-theme-dark .igcai-subtitle,
.igcai-theme-dark h2,
.igcai-theme-dark h3,
.igcai-theme-dark h4 {
    color: #f0f0f0;
}

.igcai-header {
    text-align: center;
    margin-bottom: 40px;
}

.igcai-header h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #333;
    font-weight: 700;
}

.igcai-subtitle {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.igcai-form {
    margin-bottom: 40px;
}

.igcai-form-group {
    margin-bottom: 25px;
}

.igcai-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.igcai-form-group textarea,
.igcai-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}
.igcai-form-group select { height:54px;}

.igcai-form-group textarea:focus,
.igcai-form-group select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.igcai-form-group textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.igcai-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.igcai-char-count {
    text-align: right;
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

.igcai-generate-btn {
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.igcai-generate-btn:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.igcai-generate-btn:active {
    transform: translateY(0);
}

.igcai-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

.igcai-loader svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.igcai-results {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.igcai-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e5e9;
}

.igcai-results-header h3 {
    font-size: 1.5em;
    margin: 0;
    color: #333;
}

.igcai-actions {
    display: flex;
    gap: 10px;
}

.igcai-copy-all-btn,
.igcai-regenerate-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.igcai-copy-all-btn {
    background: #10b981;
    color: white;
    border: none;
}

.igcai-copy-all-btn:hover {
    background: #059669;
}

.igcai-regenerate-btn {
    background: transparent;
    color: #6366f1;
    border: 2px solid #6366f1;
}

.igcai-regenerate-btn:hover {
    background: rgba(99, 102, 241, 0.1);
}

.igcai-output-section {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.igcai-theme-dark .igcai-output-section {
    background: #2d2d2d;
    border-color: #404040;
}

.igcai-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.igcai-output-header h4 {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

.igcai-theme-dark .igcai-output-header h4 {
    color: #f0f0f0;
}

.igcai-copy-btn {
    background: #64748b;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.igcai-copy-btn:hover {
    background: #475569;
}

.igcai-copy-btn.copied {
    background: #10b981;
}

.igcai-output-content {
    line-height: 1.7;
    color: #333;
    white-space: pre-wrap;
    font-size: 16px;
}

.igcai-theme-dark .igcai-output-content {
    color: #e0e0e0;
}

.igcai-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.igcai-hashtags span {
    background: #e0f2fe;
    color: #0369a1;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.igcai-theme-dark .igcai-hashtags span {
    background: #0c4a6e;
    color: #bae6fd;
}

.igcai-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.igcai-alert.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.igcai-theme-dark .igcai-alert.success {
    background: #064e3b;
    color: #a7f3d0;
    border-color: #047857;
}

.igcai-alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.igcai-theme-dark .igcai-alert.error {
    background: #7f1d1d;
    color: #fecaca;
    border-color: #dc2626;
}

/* Responsive Design */
@media (max-width: 768px) {
    .igcai-container {
        padding: 20px;
        margin: 20px auto;
    }
    
    .igcai-header h2 {
        font-size: 1.5em;
    }
    
    .igcai-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .igcai-results-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .igcai-actions {
        justify-content: stretch;
    }
    
    .igcai-copy-all-btn,
    .igcai-regenerate-btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .igcai-header h2 {
        font-size: 1.3em;
    }
    
    .igcai-generate-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .igcai-output-section {
        padding: 15px;
    }
}