/* Instagram Hashtag Generator Styles */
.hashtag-generator-widget {
    max-width: 1000px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.generator-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

/* Header Section */
.generator-header {
    background: linear-gradient(135deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    color: white;
    padding: 50px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.generator-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.header-content {
    position: relative;
    z-index: 2;
}

.header-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.header-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 400;
    max-width: 500px;
    margin: 0 auto;
}

/* Input Section */
.input-section {
    padding: 40px;
    background: #f8f9fa;
}

.input-group {
    max-width: 600px;
    margin: 0 auto;
}

.input-container {
    display: flex;
    background: white;
    border-radius: 15px;
    padding: 5px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.input-container:focus-within {
    border-color: #405DE6;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(64, 93, 230, 0.2);
}

.input-icon {
    padding: 15px 20px;
    color: #833AB4;
    font-size: 1.2rem;
}

.keyword-input {
    flex: 1;
    border: none;
    padding: 15px 0;
    font-size: 1.1rem;
    color: #2c3e50;
    background: transparent;
    outline: none;
}

.keyword-input::placeholder {
    color: #bdc3c7;
}

.generate-btn {
    background: linear-gradient(135deg, #405DE6, #833AB4);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(131, 58, 180, 0.4);
}

.generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    color: #7f8c8d;
    font-size: 0.9rem;
    justify-content: center;
}

.input-hint i {
    color: #f39c12;
}

/* Loading State */
.loading-state {
    padding: 60px 40px;
    text-align: center;
    background: #f8f9fa;
}

.loading-content h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.loading-spinner {
    font-size: 3rem;
    color: #833AB4;
    margin-bottom: 20px;
}

.loading-state p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Results Section */
.results-section {
    padding: 0;
}

.results-header {
    background: white;
    padding: 30px 40px;
    border-bottom: 1px solid #e1e5e9;
}

.results-header h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.results-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.keyword-display {
    background: linear-gradient(135deg, #405DE6, #833AB4);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.hashtag-count {
    color: #7f8c8d;
    font-weight: 600;
}

/* Categories Tabs */
.categories-tabs {
    display: flex;
    background: #f8f9fa;
    padding: 20px 40px 0;
    border-bottom: 1px solid #e1e5e9;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tab {
    background: white;
    border: 2px solid #e1e5e9;
    padding: 12px 20px;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: -1px;
}

.category-tab:hover {
    border-color: #bdc3c7;
    color: #2c3e50;
}

.category-tab.active {
    background: white;
    border-color: #405DE6 #e1e5e9 white;
    color: #405DE6;
    border-bottom-color: white;
}

.category-tab i {
    font-size: 1rem;
}

/* Hashtags Container */
.hashtags-container {
    padding: 30px 40px;
    background: white;
}

.hashtags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.hashtag-item {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.hashtag-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.hashtag-item:hover::before {
    left: 100%;
}

.hashtag-item:hover {
    border-color: #405DE6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(64, 93, 230, 0.15);
}

.hashtag-item.selected {
    background: linear-gradient(135deg, #405DE6, #833AB4);
    border-color: #405DE6;
    color: white;
}

.hashtag-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #bdc3c7;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.hashtag-item.selected .hashtag-checkbox {
    background: white;
    border-color: white;
}

.hashtag-item.selected .hashtag-checkbox::after {
    content: '✓';
    color: #405DE6;
    font-weight: bold;
    font-size: 12px;
}

.hashtag-text {
    font-weight: 600;
    font-size: 0.95rem;
    word-break: break-word;
}

.hashtag-item.selected .hashtag-text {
    color: white;
}

/* Copy Section */
.copy-section {
    background: #f8f9fa;
    padding: 30px 40px;
    border-top: 1px solid #e1e5e9;
}

.copy-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.copy-btn, .action-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.copy-btn {
    background: linear-gradient(135deg, #27ae60, #219a52);
    color: white;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.copy-btn.copy-selected {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.action-btn {
    background: #95a5a6;
    color: white;
}

.action-btn:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.copy-preview {
    background: white;
    border-radius: 10px;
    border: 2px solid #e1e5e9;
    overflow: hidden;
}

.hashtags-output {
    width: 100%;
    border: none;
    padding: 20px;
    font-size: 1rem;
    line-height: 1.5;
    color: #2c3e50;
    background: white;
    resize: vertical;
    min-height: 100px;
    font-family: 'Courier New', monospace;
}

.hashtags-output:focus {
    outline: none;
}

/* Tips Section */
.tips-section {
    padding: 40px;
    background: white;
    border-top: 1px solid #e1e5e9;
}

.tips-section h4 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tips-section h4 i {
    color: #f39c12;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.tip-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #405DE6;
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.tip-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #405DE6, #833AB4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.tip-content h5 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.tip-content p {
    color: #7f8c8d;
    line-height: 1.6;
    margin: 0;
    font-size: 0.9rem;
}

/* New Search Section */
.new-search-section {
    padding: 30px 40px;
    background: #f8f9fa;
    text-align: center;
    border-top: 1px solid #e1e5e9;
}

.new-search-btn {
    background: linear-gradient(135deg, #405DE6, #833AB4);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.new-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(131, 58, 180, 0.4);
}

/* Error State */
.error-state {
    padding: 60px 40px;
    text-align: center;
    background: #f8f9fa;
}

.error-content h3 {
    font-size: 1.8rem;
    color: #e74c3c;
    margin-bottom: 15px;
}

.error-icon {
    font-size: 4rem;
    color: #e74c3c;
    margin-bottom: 20px;
}

.error-content p {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.retry-btn {
    background: #405DE6;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.retry-btn:hover {
    background: #3448c5;
    transform: translateY(-2px);
}

/* Notification */
.hashtag-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #27ae60, #219a52);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.hashtag-notification.show {
    transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .generator-container {
        margin: 20px;
    }
    
    .generator-header {
        padding: 40px 20px;
    }
    
    .header-title {
        font-size: 2rem;
    }
    
    .input-section {
        padding: 30px 20px;
    }
    
    .input-container {
        flex-direction: column;
        gap: 10px;
        padding: 20px;
    }
    
    .input-icon {
        display: none;
    }
    
    .categories-tabs {
        padding: 20px 20px 0;
    }
    
    .hashtags-container {
        padding: 20px;
    }
    
    .hashtags-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .copy-section {
        padding: 20px;
    }
    
    .copy-actions {
        flex-direction: column;
    }
    
    .tips-section {
        padding: 30px 20px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 1.6rem;
    }
    
    .results-header {
        padding: 20px;
    }
    
    .results-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .hashtags-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation for hashtag items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hashtag-item {
    animation: fadeInUp 0.3s ease forwards;
}