/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

/* Section Header Styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.industry-selector {
    display: flex;
    align-items: center;
}

.industry-select {
    padding: 6px 12px;
    border: 2px solid #e1e5e9;
    background: #f8f9fa;
    color: #555;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.industry-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.industry-select:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.language-switcher {
    display: flex;
    gap: 8px;
}

.settings-btn {
    padding: 8px;
    border: 2px solid #e1e5e9;
    background: #f8f9fa;
    color: #555;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.settings-btn:hover {
    background: #e9ecef;
    border-color: #667eea;
    color: #667eea;
    transform: rotate(90deg);
}

.lang-btn {
    padding: 6px 12px;
    border: 2px solid #e1e5e9;
    background: #f8f9fa;
    color: #555;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-btn:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateY(-1px);
}

.lang-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Content Section */
.content-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.input-section {
    margin-bottom: 25px;
}

.input-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    margin-bottom: 10px;
    color: #555;
    font-size: 1.1rem;
}

.input-label i {
    margin-right: 8px;
    color: #667eea;
}

#content-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#content-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.char-counter {
    text-align: right;
    margin-top: 5px;
    font-size: 0.9rem;
    color: #666;
}

.char-counter.warning {
    color: #ff6b6b;
}

.char-counter.danger {
    color: #e74c3c;
    font-weight: bold;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9rem;
    background: #28a745;
    color: white;
    margin-top: 10px;
}

.btn-small:hover {
    background: #218838;
}

/* Hashtag Section */
.hashtag-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.hashtag-section h3 {
    margin-bottom: 15px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hashtag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.hashtag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.hashtag:hover {
    transform: scale(1.05);
}

/* Preview Section */
.preview-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.preview-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e1e5e9;
}

.tab-btn {
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-btn:hover {
    color: #667eea;
}

.preview-tab {
    display: none;
}

.preview-tab.active {
    display: block;
}

/* Social Post Styles */
.social-post {
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    background: #fafafa;
}

.desktop-post {
    max-width: 500px;
}

.mobile-post {
    max-width: 350px;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.profile-details h4 {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.profile-details span {
    font-size: 0.9rem;
    color: #666;
}

.post-time {
    font-size: 0.9rem;
    color: #999;
}

.post-content {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 15px;
    color: #333;
    word-wrap: break-word;
}

.post-actions {
    display: flex;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid #e1e5e9;
}

.post-actions button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.post-actions button:hover {
    color: #667eea;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.loading-spinner i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 15px;
}

.loading-spinner p {
    font-size: 1.1rem;
    color: #555;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .language-switcher {
        align-self: flex-end;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
    
    .preview-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        justify-content: center;
    }
    
    .social-post {
        padding: 15px;
    }
    
    .mobile-post {
        max-width: 100%;
    }
}

/* AI Prompt Section */
.ai-prompt-section {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
}

.prompt-header {
    margin-bottom: 25px;
    text-align: center;
}

.prompt-header h3 {
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.prompt-header p {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

.prompt-input-section {
    margin-bottom: 25px;
}

.prompt-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    margin-bottom: 10px;
    color: #555;
    font-size: 1rem;
}

.prompt-label i {
    margin-right: 8px;
    color: #667eea;
}

#ai-prompt-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
    margin-bottom: 15px;
}

#ai-prompt-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.prompt-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.prompt-suggestions {
    border-top: 1px solid #e1e5e9;
    padding-top: 20px;
}

.prompt-suggestions h4 {
    color: #555;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.suggestion-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.suggestion-btn {
    padding: 10px 15px;
    border: 2px solid #e1e5e9;
    background: white;
    color: #555;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.suggestion-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    color: #667eea;
    transform: translateY(-1px);
}

.suggestion-btn:active {
    transform: translateY(0);
}

/* Animation for hashtags */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hashtag {
    animation: fadeInUp 0.3s ease;
}

/* Settings Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e1e5e9;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #333;
}

.modal-body {
    padding: 25px;
}

.setting-item {
    margin-bottom: 25px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    margin-bottom: 10px;
    color: #555;
    font-size: 1rem;
}

.setting-label i {
    margin-right: 8px;
    color: #667eea;
}

.api-key-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.api-key-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    transition: border-color 0.3s ease;
}

.api-key-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.setting-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.setting-description a {
    color: #667eea;
    text-decoration: none;
}

.setting-description a:hover {
    text-decoration: underline;
}
