/* Custom Styles for AI Content Detector */

/* Ad Zones */
.ad-zone {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-secondary-bg);
    border: 2px dashed var(--bs-secondary);
    color: var(--bs-secondary);
    font-size: 0.9rem;
    padding: 1rem;
    border-radius: 4px;
    min-height: 90px;
}

.ad-header .ad-placeholder {
    width: 728px;
    height: 90px;
}

.ad-footer .ad-placeholder {
    width: 728px;
    height: 90px;
}

.ad-sidebar .ad-placeholder {
    width: 300px;
    height: 250px;
}

.ad-sidebar-large .ad-placeholder {
    width: 300px;
    height: 600px;
}

.ad-between .ad-placeholder {
    width: 728px;
    height: 90px;
}

.ad-embed .ad-placeholder {
    width: 320px;
    height: 100px;
    font-size: 0.8rem;
}

/* Responsive Ad Zones */
@media (max-width: 768px) {
    .ad-header .ad-placeholder,
    .ad-footer .ad-placeholder,
    .ad-between .ad-placeholder {
        width: 320px;
        height: 100px;
    }
    
    .ad-sidebar .ad-placeholder,
    .ad-sidebar-large .ad-placeholder {
        width: 300px;
        height: 250px;
    }
}

/* Results Styling */
.result-verdict .badge {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

/* Pronunciation Button Styles */
.pronunciation-btn {
    background: none !important;
    border: none !important;
    font-size: 14px !important;
    cursor: pointer !important;
    opacity: 0.7 !important;
    transition: opacity 0.2s ease, transform 0.1s ease !important;
    vertical-align: middle !important;
    margin-left: 8px !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 20px !important;
    min-height: 20px !important;
}

.pronunciation-btn:hover {
    opacity: 1 !important;
    transform: scale(1.1) !important;
    background: rgba(var(--bs-primary-rgb), 0.1) !important;
}

.pronunciation-btn:active {
    transform: scale(0.95) !important;
}

.pronunciation-btn.playing {
    opacity: 1 !important;
    animation: pulse 1.5s infinite !important;
    color: var(--bs-primary) !important;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Specific positioning for different elements */
.pronunciation-main-title {
    font-size: 16px !important;
    margin-left: 12px !important;
}

.pronunciation-tab-label {
    font-size: 12px !important;
    margin-left: 6px !important;
}

.pronunciation-form-label {
    font-size: 13px !important;
    margin-left: 8px !important;
}

.pronunciation-stats {
    font-size: 11px !important;
    margin-left: 6px !important;
}

.pronunciation-footer {
    font-size: 10px !important;
    margin-left: 4px !important;
}

/* Pronunciation Controls Panel */
.pronunciation-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    min-width: 200px;
}

.pronunciation-controls.show {
    display: block;
}

.pronunciation-controls h6 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: var(--bs-body-color);
}

.pronunciation-controls .btn-group {
    width: 100%;
}

.pronunciation-controls .btn {
    font-size: 0.8rem;
    padding: 4px 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pronunciation-btn {
        font-size: 12px !important;
        margin-left: 6px !important;
    }
    
    .pronunciation-controls {
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }
}

/* RTL support for pronunciation buttons */
.rtl .pronunciation-btn {
    margin-left: 0 !important;
    margin-right: 8px !important;
}

.rtl .pronunciation-main-title {
    margin-left: 0 !important;
    margin-right: 12px !important;
}

.rtl .pronunciation-tab-label {
    margin-left: 0 !important;
    margin-right: 6px !important;
}

/* Comprehensive Social Media Sharing Styles */
.social-share-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 1px solid #dee2e6;
}

.share-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.share-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.share-platforms.expanded {
    justify-content: flex-start;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: white;
}

.share-btn.success {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
}

.share-btn i {
    font-size: 1rem;
}

.platform-name {
    white-space: nowrap;
    font-size: 0.8rem;
}

/* Legacy support for old share buttons */
.share-container {
    margin-top: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.share-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s;
}

.share-button:hover {
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.share-facebook { background-color: #1877f2; }
.share-twitter { background-color: #000000; }
.share-linkedin { background-color: #0a66c2; }
.share-whatsapp { background-color: #25d366; }
.share-telegram { background-color: #0088cc; }
.share-reddit { background-color: #ff4500; }
.share-copy { background-color: #6c757d; }

/* Custom Share Tooltip */
.custom-share-tooltip {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: #343a40;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    animation: fadeInUp 0.3s ease;
}

.custom-share-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #343a40;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* QR Code Modal */
.qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.qr-modal-content {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    max-width: 300px;
    text-align: center;
}

.qr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.qr-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
}

.qr-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-info {
    background: #17a2b8;
}

.toast-success {
    background: #28a745;
}

.toast-warning {
    background: #ffc107;
    color: #212529;
}

.toast-error {
    background: #dc3545;
}

/* Viral Features Styles */
.viral-content-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    margin: 2rem 0;
}

.viral-content-section::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 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="1000,100 1000,0 0,100"/></svg>');
    background-size: 100% 100%;
}

.viral-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.viral-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.viral-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.challenge-stats {
    margin: 1rem 0;
}

.live-stats-panel {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.viral-share-panel {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.viral-share-panel .btn {
    margin: 0.25rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .platform-name {
        display: none;
    }
    
    .share-btn {
        padding: 0.5rem;
        min-width: 40px;
        justify-content: center;
    }
    
    .share-platforms {
        gap: 0.25rem;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .share-button {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .viral-card {
        margin-bottom: 1rem;
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .viral-share-panel .btn {
        margin: 0.25rem 0;
        width: 100%;
    }
    
    .viral-content-section {
        margin: 1rem 0;
    }
}

/* Social Share Buttons */
.social-share-btn.share-link,
.social-share-btn-compact.share-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: var(--bs-white);
}

.social-share-btn.share-link:hover,
.social-share-btn-compact.share-link:hover {
    background-color: var(--bs-primary-dark);
    border-color: var(--bs-primary-dark);
    transform: translateY(-1px);
}

.social-share-btn.share-link i,
.social-share-btn-compact.share-link i {
    margin-right: 0.3rem;
}

.badge.ai-detected {
    background-color: var(--bs-danger) !important;
}

.badge.human-written {
    background-color: var(--bs-success) !important;
}

.badge.inconclusive {
    background-color: var(--bs-warning) !important;
}

/* Social Share Grid */
.social-share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.social-share-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.3rem;
}

/* Social Share Container */
.social-share-container {
    padding: 1rem 0;
}

.share-title {
    color: var(--bs-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Share Platforms Layout */
.share-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.share-platforms.expanded {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
}

/* Share Button Styling */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    color: white;
    cursor: pointer;
    min-width: 120px;
}

.share-btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
    filter: brightness(1.1);
    color: white;
}

.share-btn i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.platform-name {
    white-space: nowrap;
}

/* Success state for copy actions */
.share-btn.success {
    background-color: var(--bs-success) !important;
    border-color: var(--bs-success) !important;
}

.social-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}

.social-share-btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

/* Platform-specific colors */
.social-share-btn.facebook { background-color: #1877f2; color: white; }
.social-share-btn.twitter { background-color: #1da1f2; color: white; }
.social-share-btn.linkedin { background-color: #0077b5; color: white; }
.social-share-btn.reddit { background-color: #ff4500; color: white; }
.social-share-btn.whatsapp { background-color: #25d366; color: white; }
.social-share-btn.telegram { background-color: #0088cc; color: white; }
.social-share-btn.pinterest { background-color: #bd081c; color: white; }
.social-share-btn.tumblr { background-color: #001935; color: white; }
.social-share-btn.email { background-color: var(--bs-secondary); color: white; }
.social-share-btn.copy { background-color: var(--bs-info); color: white; }

/* Custom Share Tooltip */
.custom-share-tooltip {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bs-success);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    animation: fadeInOut 4s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 1; }
}

/* More Platforms Toggle */
.more-platforms {
    text-align: center;
}

/* QR Code Modal */
.qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.qr-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    max-width: 300px;
    width: 90%;
}

.qr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.qr-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.qr-image {
    max-width: 100%;
    height: auto;
}

/* Share Modals */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.share-modal-dialog {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.share-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.share-modal-header h5 {
    margin: 0;
    font-weight: 600;
}

.share-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.share-modal-close:hover {
    opacity: 1;
}

.share-modal-body {
    padding: 1.5rem;
}

.share-modal-content h6 {
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.share-text-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-line;
}

.share-actions {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.share-actions .btn {
    border-radius: 20px;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Enhanced Share Button States */
.share-btn.sharing {
    background-color: var(--bs-warning) !important;
    transform: scale(0.95);
}

.share-btn.shared {
    background-color: var(--bs-success) !important;
    transform: scale(1.05);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .share-modal-dialog {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .share-modal-body {
        padding: 1rem;
    }
    
    .share-actions {
        flex-direction: column;
    }
    
    .share-actions .btn {
        width: 100%;
        margin: 0.25rem 0;
    }
}



/* TTS Controls */
.tts-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tts-indicator {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--bs-info);
}

.tts-indicator.playing {
    color: var(--bs-success);
}

.tts-indicator .fa-volume-up {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 50% { opacity: 1; }
    25%, 75% { opacity: 0.5; }
}

/* Language Selector */
.language-flag {
    width: 20px;
    height: 15px;
    margin-right: 0.5rem;
    border-radius: 2px;
}

.language-selector-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.language-selector-btn:hover,
.language-selector-btn:focus,
.language-selector-btn:active,
.language-selector-btn.show {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25) !important;
}

.language-selector-btn .fas.fa-globe {
    color: #ffffff !important;
}

/* Loading States */
.loading-overlay {
    position: relative;
}

.loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
}

/* Embed Container */
.embed-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
}

/* RTL Support */
.rtl .social-share-grid {
    direction: ltr; /* Keep social buttons LTR */
}

.rtl .progress {
    direction: ltr; /* Keep progress bars LTR */
}

/* Mobile Optimizations */
@media (max-width: 576px) {
    .social-share-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .social-share-btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }
    
    .embed-container {
        padding: 0.5rem;
    }
}

/* Analysis Details Styling */
.analysis-details ul {
    list-style: none;
    padding-left: 0;
}

.analysis-details li {
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--bs-border-color);
}

.analysis-details li:last-child {
    border-bottom: none;
}

/* Stats Styling */
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
}

/* Character Counter */
#charCount {
    font-weight: bold;
}

#charCount.warning {
    color: var(--bs-warning);
}

#charCount.error {
    color: var(--bs-danger);
}

#charCount.success {
    color: var(--bs-success);
}

/* Improved Button States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Smooth Transitions */
.card, .btn, .progress-bar {
    transition: all 0.3s ease;
}

/* Focus States for Accessibility */
.btn:focus,
.form-control:focus,
.dropdown-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Print Styles */
@media print {
    .ad-zone,
    .social-share-grid,
    .btn,
    .navbar,
    footer {
        display: none !important;
    }
}
