/* Hashtag Generator Styles */

.generator-container {
    flex: 1;
    padding: 0.5rem 0;
    overflow: hidden;
}

/* Dark Mode Styles */
[data-theme="dark"] .controls-sidebar {
    background: var(--bg-primary);
    border-color: var(--border-light);
}

[data-theme="dark"] .sidebar-title {
    color: var(--text-primary);
}

[data-theme="dark"] .section-title {
    color: var(--text-muted);
}

[data-theme="dark"] .form-label {
    color: var(--text-secondary);
}

[data-theme="dark"] .form-control {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 180, 182, 0.1);
}

[data-theme="dark"] .control-section {
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--border-light);
}

[data-theme="dark"] .results-area {
    background: var(--bg-secondary);
}

[data-theme="dark"] .results-header h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .generation-status {
    color: var(--text-secondary);
}

[data-theme="dark"] .hashtags-placeholder {
    background: var(--bg-primary);
    border-color: var(--border-medium);
    color: var(--text-muted);
}

[data-theme="dark"] .hashtags-placeholder h4 {
    color: var(--text-primary);
}

[data-theme="dark"] .footer {
    background: var(--bg-primary);
    border-top-color: var(--border-light);
}

[data-theme="dark"] .powered-by {
    color: var(--text-secondary);
}

[data-theme="dark"] .powered-by a {
    color: var(--accent-primary);
}

[data-theme="dark"] .powered-by a:hover {
    color: var(--accent-secondary);
}

.generator-layout {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    height: calc(100vh - 150px);
    gap: 0;
}

/* Sidebar Styles */
.controls-sidebar {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    overflow-y: auto;
    padding: 1.5rem;
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-title i {
    width: 18px;
    height: 18px;
}

/* Control Sections */
.control-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.control-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* AI Notice */
.ai-notice {
    background: rgba(0, 180, 182, 0.1);
    border: 1px solid var(--accent-primary);
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 1rem;
}

.ai-notice p {
    font-size: 0.75rem;
    color: var(--accent-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-notice i {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Dark Mode for AI Notice */
[data-theme="dark"] .ai-notice {
    background: rgba(0, 180, 182, 0.15);
    border-color: var(--accent-primary);
}

/* Results Area */
.results-area {
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    overflow: auto;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 600px) {
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

.results-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.generation-status {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid var(--border-light);
}

.generation-status.generating {
    color: var(--accent-primary);
    background: rgba(0, 180, 182, 0.1);
    border-color: var(--accent-primary);
}

.generation-status.success {
    color: var(--success);
    background: rgba(22, 163, 74, 0.1);
    border-color: var(--success);
}

.generation-status.error {
    color: var(--error);
    background: rgba(220, 38, 38, 0.1);
    border-color: var(--error);
}

/* Hashtags Container */
.hashtags-container {
    flex: 1;
    margin-bottom: 2rem;
}

.hashtags-placeholder {
    background: var(--bg-primary);
    border: 2px dashed var(--border-medium);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hashtags-placeholder i {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.hashtags-placeholder h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.hashtags-placeholder p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 400px;
}

.placeholder-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.feature-item i {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

/* Categories Container */
.categories-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.category-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.category-section:last-child {
    margin-bottom: 0;
}

.category-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-section h4 i {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

.hashtag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hashtag-tag {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    position: relative;
}

.hashtag-tag:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.hashtag-tag.selected {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.hashtag-tag.selected::after {
    content: '✓';
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dark Mode for Categories */
[data-theme="dark"] .category-section {
    background: var(--bg-primary);
    border-color: var(--border-light);
}

[data-theme="dark"] .category-section h4 {
    color: var(--text-primary);
}

[data-theme="dark"] .hashtag-tag {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

[data-theme="dark"] .hashtag-tag:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Results Actions */
.results-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* Dark Mode for Results Actions */
[data-theme="dark"] .results-actions {
    border-top-color: var(--border-light);
}

/* History Section */
.history-section {
    margin-top: 2rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.5rem;
}

.history-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-section h4 i {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.history-item:hover {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

.history-item-content {
    flex: 1;
    cursor: pointer;
}

.history-delete-btn {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--error);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.history-delete-btn:hover {
    background: var(--error);
    color: white;
    border-color: var(--error);
}

.history-delete-btn i {
    width: 16px;
    height: 16px;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.history-item-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.history-item-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.history-item-preview {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.history-item-count {
    font-size: 0.75rem;
    color: var(--accent-primary);
    background: rgba(0, 180, 182, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-top: 0.5rem;
    display: inline-block;
}

/* Dark Mode History Styles */
[data-theme="dark"] .history-section {
    background: var(--bg-primary);
    border-color: var(--border-light);
}

[data-theme="dark"] .history-section h4 {
    color: var(--text-primary);
}

[data-theme="dark"] .history-item {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
}

[data-theme="dark"] .history-item:hover {
    background: var(--border-light);
}

[data-theme="dark"] .history-item-title {
    color: var(--text-primary);
}

[data-theme="dark"] .history-delete-btn {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.3);
}

[data-theme="dark"] .history-delete-btn:hover {
    background: var(--error);
    color: white;
    border-color: var(--error);
}

/* History Button Styling */
.btn-history {
    background: linear-gradient(135deg, rgba(0, 180, 182, 0.1), rgba(0, 180, 182, 0.05));
    color: var(--accent-primary);
    border: 1px solid rgba(0, 180, 182, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.btn-history:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 180, 182, 0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.btn-history:hover {
    background: linear-gradient(135deg, rgba(0, 180, 182, 0.15), rgba(0, 180, 182, 0.1));
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 180, 182, 0.2);
}

.btn-history:hover:before {
    transform: translateX(0);
}

.btn-history i {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.btn-history span {
    font-weight: 600;
    color: var(--accent-primary);
}

[data-theme="dark"] .btn-history {
    background: linear-gradient(135deg, rgba(0, 180, 182, 0.15), rgba(0, 180, 182, 0.05));
    border-color: rgba(0, 180, 182, 0.4);
    color: var(--accent-primary);
}

[data-theme="dark"] .btn-history:hover {
    background: linear-gradient(135deg, rgba(0, 180, 182, 0.2), rgba(0, 180, 182, 0.1));
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(0, 180, 182, 0.3);
}


/* History Modal Styles */
.history-modal .modal {
    max-width: 90vw;
    width: 500px;
    max-height: 80vh;
}

.history-modal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

/* Wider modal on desktop */
@media (min-width: 768px) {
    .history-modal .modal {
        width: 700px;
    }
}

@media (min-width: 1200px) {
    .history-modal .modal {
        width: 800px;
    }
}

.history-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.history-empty i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: block;
}

.history-empty p {
    margin: 0.5rem 0;
}


[data-theme="dark"] .history-empty {
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .generator-layout {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 968px) {
    .generator-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 40vh 1fr;
        height: calc(100vh - 150px);
        gap: 0;
    }
    
    .controls-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        max-height: 40vh;
        overflow-y: auto;
    }
    
    .results-area {
        padding: 1rem;
        overflow-y: auto;
        justify-content: flex-start;
    }
    
    .hashtags-placeholder {
        padding: 2rem 1rem;
        min-height: 300px;
    }
    
    .placeholder-features {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .generator-layout {
        padding: 0 0.5rem;
        gap: 0.5rem;
    }
    
    .controls-sidebar {
        padding: 1rem;
    }
    
    .results-area {
        padding: 0.5rem;
    }
    
    .control-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .controls-sidebar {
        font-size: 12px;
    }
    
    .sidebar-title {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 0.7rem;
        margin-bottom: 0.75rem;
    }
    
    .form-label {
        font-size: 0.7rem;
        margin-bottom: 0.25rem;
    }
    
    .form-control {
        font-size: 12px;
        padding: 0.5rem;
    }
    
    .btn {
        font-size: 11px;
        padding: 0.5rem 1rem;
    }
    
    .results-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hashtags-placeholder {
        padding: 1.5rem 1rem;
    }
    
    .hashtag-tag {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
}

/* Footer Styles */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    padding: 1rem;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
}

.powered-by {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

.powered-by a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.5rem;
    transition: all 0.2s ease;
}

.powered-by a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}