/**
 * PDF Tools Hub - Enhancement Styles
 * 
 * Styles for:
 * - Recently Used Tools Section
 * - Dark/Light Mode Toggle
 * - Trust Badges
 * - Onboarding Tour
 * - Keyboard Shortcuts Modal
 * - Notifications
 * - Social Sharing
 * - Light Mode Theme
 * - Accessibility
 * 
 * @package PDF_Tools_Hub
 * @version 1.0.0
 */

/* ===== RECENTLY USED SECTION ===== */
.recently-used-section {
    padding: 2rem 0 3rem;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.recently-used-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.recently-used-header .section-title {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0;
}

.recently-used-header .section-title i {
    color: var(--primary);
}

.clear-recent-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 2rem;
    color: #ef4444;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.clear-recent-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

.recently-used-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.recent-tool-card {
    position: relative;
    border: 1px solid rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.05);
}

.recent-tool-card:hover {
    border-color: var(--primary);
}

.recent-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--gray-light);
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    width: fit-content;
}

.recent-badge i {
    color: var(--primary);
    font-size: 0.7rem;
}

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(15deg) scale(1.1);
}

.theme-toggle-btn i {
    transition: transform 0.3s ease;
}

/* ===== TRUST BADGES ===== */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 2rem;
    font-size: 0.8rem;
    color: #10b981;
    transition: var(--transition);
}

.trust-badge:hover {
    background: rgba(16, 185, 129, 0.2);
    transform: translateY(-2px);
}

.trust-badge i {
    font-size: 0.9rem;
}

/* ===== ONBOARDING TOUR ===== */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.tour-prompt {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-radius: 1.5rem;
    padding: 2.5rem;
    text-align: center;
    max-width: 420px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.tour-prompt-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.tour-prompt-icon i {
    font-size: 2.5rem;
    color: white;
}

.tour-prompt h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.tour-prompt p {
    color: var(--gray-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.tour-prompt-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.tour-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.tour-btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.tour-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
}

.tour-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gray-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tour-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Tour Tooltip */
.tour-tooltip {
    position: fixed;
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 350px;
    width: 90%;
    z-index: 10001;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: tooltipAppear 0.3s ease;
}

@keyframes tooltipAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tour-tooltip h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.tour-tooltip p {
    color: var(--gray-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tour-tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tour-progress {
    font-size: 0.8rem;
    color: var(--gray);
}

.tour-tooltip-buttons {
    display: flex;
    gap: 0.5rem;
}

.tour-prev-btn,
.tour-next-btn {
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: var(--transition);
}

.tour-prev-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gray-light);
}

.tour-prev-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tour-next-btn {
    background: var(--gradient-primary);
    color: white;
}

.tour-next-btn:hover {
    transform: translateX(3px);
}

.tour-close-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--gray-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.tour-close-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.tour-highlight {
    position: relative;
    z-index: 10000;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.5), 0 0 30px rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
    animation: tourPulse 2s infinite;
}

@keyframes tourPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.5), 0 0 30px rgba(99, 102, 241, 0.3);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.3), 0 0 50px rgba(99, 102, 241, 0.5);
    }
}

/* ===== NOTIFICATION SYSTEM ===== */
.notification-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10002;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
}

.notification {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(30, 41, 59, 0.95);
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInRight 0.3s ease;
    backdrop-filter: blur(10px);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-fade-out {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.notification i:first-child {
    font-size: 1.2rem;
}

.notification-success i:first-child { color: #10b981; }
.notification-error i:first-child { color: #ef4444; }
.notification-warning i:first-child { color: #f59e0b; }
.notification-info i:first-child { color: #3b82f6; }

.notification span {
    flex: 1;
    font-size: 0.9rem;
    color: var(--white);
}

.notification-close {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.notification-close:hover {
    color: var(--white);
}

/* ===== KEYBOARD SHORTCUTS MODAL ===== */
.shortcuts-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10003;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.shortcuts-modal-content {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.shortcuts-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shortcuts-modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: var(--white);
}

.shortcuts-modal-header h3 i {
    color: var(--primary);
}

.shortcuts-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--gray-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.shortcuts-close-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.shortcut-item kbd {
    min-width: 40px;
    padding: 0.4rem 0.6rem;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 0.5rem;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    font-family: monospace;
}

.shortcut-item span {
    color: var(--gray-light);
    font-size: 0.9rem;
}

/* ===== SOCIAL SHARING ===== */
.share-site-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-site-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10003;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.share-modal {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.share-modal h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.share-modal h3 i {
    color: var(--primary);
}

.share-modal p {
    color: var(--gray-light);
    margin-bottom: 1.5rem;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: 2rem;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-3px);
}

.share-twitter {
    background: #1DA1F2;
    color: white;
}

.share-facebook {
    background: #4267B2;
    color: white;
}

.share-linkedin {
    background: #0077B5;
    color: white;
}

.share-reddit {
    background: #FF4500;
    color: white;
}

.share-copy {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.share-copy:hover {
    background: rgba(255, 255, 255, 0.2);
}

.share-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--gray-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.share-modal-close:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* ===== SKIP LINK (Accessibility) ===== */
.skip-link {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0 0 0.5rem 0.5rem;
    text-decoration: none;
    font-weight: 600;
    z-index: 10004;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* ===== LIGHT MODE THEME ===== */
body.light-mode,
[data-theme="light"] body {
    --dark: #f8fafc;
    --dark-light: #f1f5f9;
    --white: #0f172a;
    --off-white: #1e293b;
    --gray: #64748b;
    --gray-light: #475569;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}

body.light-mode .navbar,
[data-theme="light"] .navbar {
    background: rgba(248, 250, 252, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .nav-brand,
body.light-mode .nav-menu a,
[data-theme="light"] .nav-brand,
[data-theme="light"] .nav-menu a {
    color: #0f172a;
}

body.light-mode .nav-menu a:hover,
[data-theme="light"] .nav-menu a:hover {
    color: var(--primary);
}

body.light-mode .hero-title,
body.light-mode .section-title,
body.light-mode .feature-card h3,
body.light-mode .tool-card h3,
body.light-mode .stat-number,
[data-theme="light"] .hero-title,
[data-theme="light"] .section-title,
[data-theme="light"] .feature-card h3,
[data-theme="light"] .tool-card h3,
[data-theme="light"] .stat-number {
    color: #0f172a;
}

body.light-mode .hero-subtitle,
body.light-mode .section-subtitle,
body.light-mode .tool-card > p,
body.light-mode .feature-card p,
[data-theme="light"] .hero-subtitle,
[data-theme="light"] .section-subtitle,
[data-theme="light"] .tool-card > p,
[data-theme="light"] .feature-card p {
    color: #475569;
}

body.light-mode .stat-card,
body.light-mode .tool-card,
body.light-mode .feature-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .tool-card,
[data-theme="light"] .feature-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

body.light-mode .stat-card:hover,
body.light-mode .tool-card:hover,
body.light-mode .feature-card:hover,
[data-theme="light"] .stat-card:hover,
[data-theme="light"] .tool-card:hover,
[data-theme="light"] .feature-card:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body.light-mode .stats,
[data-theme="light"] .stats {
    background: rgba(99, 102, 241, 0.05);
}

body.light-mode .search-bar-wrapper,
[data-theme="light"] .search-bar-wrapper {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .tools-search-input,
[data-theme="light"] .tools-search-input {
    color: #0f172a;
}

body.light-mode .tools-search-input::placeholder,
[data-theme="light"] .tools-search-input::placeholder {
    color: #94a3b8;
}

body.light-mode .filter-btn,
[data-theme="light"] .filter-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #475569;
}

body.light-mode .filter-btn:hover,
[data-theme="light"] .filter-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #0f172a;
}

body.light-mode .filter-btn.active,
[data-theme="light"] .filter-btn.active {
    background: var(--gradient-primary);
    color: white;
}

body.light-mode .modal-content,
[data-theme="light"] .modal-content {
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
}

body.light-mode .modal-content h2,
body.light-mode .modal-content h3,
[data-theme="light"] .modal-content h2,
[data-theme="light"] .modal-content h3 {
    color: #0f172a;
}

body.light-mode .mobile-menu-toggle span,
[data-theme="light"] .mobile-menu-toggle span {
    background: #0f172a;
}

body.light-mode .animated-bg .blob,
[data-theme="light"] .animated-bg .blob {
    opacity: 0.15;
}

body.light-mode .theme-toggle-btn,
[data-theme="light"] .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.15);
    color: #0f172a;
}

body.light-mode .trust-badge,
[data-theme="light"] .trust-badge {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
}

body.light-mode .footer,
[data-theme="light"] .footer {
    background: rgba(15, 23, 42, 0.95);
}

/* ===== MOBILE RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .theme-toggle-btn {
        width: 38px;
        height: 38px;
        margin-right: 0.5rem;
    }
    
    .trust-badges {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .trust-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
    
    .recently-used-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .recently-used-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .tour-prompt {
        padding: 2rem 1.5rem;
    }
    
    .tour-prompt-buttons {
        flex-direction: column;
    }
    
    .tour-btn {
        width: 100%;
        justify-content: center;
    }
    
    .tour-tooltip {
        max-width: 300px;
        padding: 1.25rem;
    }
    
    .notification-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== HIGH CONTRAST MODE (Accessibility) ===== */
@media (prefers-contrast: high) {
    .tool-card,
    .feature-card,
    .stat-card {
        border-width: 2px;
    }
    
    .tour-highlight {
        box-shadow: 0 0 0 6px var(--primary);
    }
}

/* ===== REDUCED MOTION (Accessibility) ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .tour-highlight {
        animation: none;
    }
    
    .blob {
        animation: none;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .animated-bg,
    .theme-toggle-btn,
    .trust-badges,
    .recently-used-section,
    .tour-overlay,
    .notification-container,
    .shortcuts-modal,
    .share-modal-overlay {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .tool-card,
    .feature-card {
        break-inside: avoid;
    }
}
