/* Instagram Caption Generator Styles */
.icg-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.icg-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f8f9fa;
}

.icg-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
}

.icg-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.icg-form-section {
    margin-bottom: 40px;
}

.icg-form-group {
    margin-bottom: 25px;
}

.icg-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.icg-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.icg-form-group input[type="text"],
.icg-form-group select,
.icg-form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

.icg-form-group input:focus,
.icg-form-group select:focus,
.icg-form-group textarea:focus {
    outline: none;
    border-color: #3897f0;
    box-shadow: 0 0 0 3px rgba(56, 151, 240, 0.1);
}

.icg-form-group small {
    display: block;
    margin-top: 6px;
    color: #888;
    font-size: 12px;
}

.icg-checkbox-label {
    display: flex;
    align-items: center;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 0;
}

.icg-checkbox-label input {
    margin-right: 10px;
    transform: scale(1.2);
}

.icg-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.icg-btn-primary {
    background: linear(135deg, #3897f0, #2671c3);
    color: white;
    width: 100%;
    justify-content: center;
}

.icg-btn-primary:hover {
    background: linear(135deg, #2671c3, #1c5aa3);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(56, 151, 240, 0.3);
}

.icg-btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e9ecef;
}

.icg-btn-secondary:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.icg-btn-link {
    background: transparent;
    color: #3897f0;
    padding: 12px 20px;
}

.icg-btn-link:hover {
    background: #f8f9fa;
    text-decoration: underline;
}

.icg-results-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f8f9fa;
}

.icg-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.icg-results-header h4 {
    margin: 0;
    color: #1a1a1a;
    font-size: 20px;
}

.icg-caption-stats {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.icg-caption-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

#icg-generated-caption {
    width: 100%;
    min-height: 150px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    background: #fff;
    font-family: inherit;
}

#icg-generated-caption:read-only {
    background: #fafafa;
}

.icg-caption-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.icg-analysis-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
}

.icg-analysis-section h5 {
    margin: 0 0 20px 0;
    color: #1a1a1a;
    font-size: 16px;
}

.icg-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.icg-analysis-item {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.icg-analysis-value {
    font-size: 24px;
    font-weight: 700;
    color: #3897f0;
    display: block;
}

.icg-analysis-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.icg-features {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f8f9fa;
}

.icg-features h5 {
    text-align: center;
    margin-bottom: 25px;
    color: #1a1a1a;
    font-size: 18px;
}

.icg-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.icg-feature {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.icg-feature span {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

.icg-feature strong {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 16px;
}

.icg-feature p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.icg-loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.icg-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: icg-spin 1s linear infinite;
}

@keyframes icg-spin {
    to {
        transform: rotate(360deg);
    }
}

.icg-success {
    color: #10b981;
    font-weight: 600;
}

.icg-error {
    color: #ef4444;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .icg-container {
        padding: 20px;
        margin: 10px;
    }
    
    .icg-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .icg-caption-actions {
        flex-direction: column;
    }
    
    .icg-btn {
        width: 100%;
        justify-content: center;
    }
    
    .icg-features-grid {
        grid-template-columns: 1fr;
    }
    
    .icg-analysis-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .icg-analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .icg-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}