/* ============================================
   ICON TOOLS - STYLES
   Purple theme with dark mode support
   ============================================ */

/* CSS Variables - Light Mode (Default) */
:root {
    --transition-speed: 0.25s;
    --transition: all 0.3s ease;
    
    /* Primary Colors - Purple Theme */
    --primary: #8b5cf6;
    --primary-light: rgba(139, 92, 246, 0.1);
    --primary-dark: #7c3aed;
    --accent-color: #8b5cf6;
    
    /* Background Colors */
    --bg-body: #faf5ff;
    --bg-white: #ffffff;
    --card-bg: #ffffff;
    --card-secondary: #f8fafc;
    
    /* Text Colors */
    --dark: #1e293b;
    --text: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* Border Colors */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Link Colors */
    --link-color: #8b5cf6;
    --link-hover: #7c3aed;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --primary: #a78bfa;
    --primary-light: rgba(167, 139, 250, 0.15);
    --primary-dark: #8b5cf6;
    --accent-color: #a78bfa;
    
    --bg-body: #0f172a;
    --bg-white: #1e293b;
    --card-bg: #1e293b;
    --card-secondary: #334155;
    
    --dark: #f1f5f9;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    
    --border: #334155;
    --border-light: #475569;
    
    --link-color: #a78bfa;
    --link-hover: #c4b5fd;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.5);
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--link-hover);
}

.breadcrumb-separator {
    color: var(--text-light);
}

.breadcrumb-current {
    color: var(--text);
    font-weight: 500;
}

/* Page Header */
.page-header {
    text-align: center;
    padding: 2rem 0 2.5rem;
}

.header-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.page-icon {
    width: 56px;
    height: 56px;
    background: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

.page-icon i {
    width: 28px;
    height: 28px;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    letter-spacing: -0.02em;
    transition: color var(--transition-speed);
}

.intro-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Converter Section */
.converter-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.25rem;
}

.section-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.section-icon i {
    width: 20px;
    height: 20px;
}

.section-icon.tools {
    background: var(--primary);
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
    transition: color var(--transition-speed);
}

/* Converters Grid */
.converters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* Converter Card */
.converter-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.converter-card::after {
    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;
    pointer-events: none;
}

.converter-card:hover::after {
    left: 100%;
}

.converter-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Card Icon */
.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.card-icon i {
    width: 24px;
    height: 24px;
}

.converter-card:hover .card-icon {
    transform: scale(1.1);
}

/* Card icon colors */
.card-icon.viewer { background: #8b5cf6; }
.card-icon.extractor { background: #ec4899; }
.card-icon.drive { background: #3b82f6; }
.card-icon.editor { background: #f59e0b; }
.card-icon.animator { background: #10b981; }
.card-icon.resizer { background: #6366f1; }
.card-icon.analyzer { background: #0ea5e9; }

/* Card Content */
.card-content {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    transition: color var(--transition-speed);
}

.card-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Card Arrow */
.card-arrow {
    color: var(--text-light);
    transition: var(--transition);
    flex-shrink: 0;
}

.card-arrow i {
    width: 20px;
    height: 20px;
}

.converter-card:hover .card-arrow {
    color: var(--primary);
    transform: translateX(4px);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-popular {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.badge-new {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

[data-theme="dark"] .badge-popular {
    background: rgba(167, 139, 250, 0.2);
    color: #c4b5fd;
}

[data-theme="dark"] .badge-new {
    background: rgba(52, 211, 153, 0.2);
    color: #6ee7b7;
}

/* Popular Section */
.popular-section {
    background: rgba(139, 92, 246, 0.08);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    transition: background-color var(--transition-speed);
}

[data-theme="dark"] .popular-section {
    background: rgba(167, 139, 250, 0.1);
}

.popular-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.popular-icon {
    color: var(--primary);
}

.popular-icon i {
    width: 20px;
    height: 20px;
}

.popular-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
    transition: color var(--transition-speed);
}

.popular-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.popular-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.popular-tool i {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.popular-tool:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.popular-tool:hover i {
    color: white;
}

/* Info Section */
.info-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

.info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.info-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.info-icon i {
    width: 20px;
    height: 20px;
}

.info-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
    transition: color var(--transition-speed);
}

.info-section > p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--card-secondary);
    border-radius: var(--radius-md);
    transition: background-color var(--transition-speed);
}

.feature-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.feature-icon i {
    width: 16px;
    height: 16px;
}

.feature-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 4px 0;
    transition: color var(--transition-speed);
}

.feature-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* FAQ Section */
.faq-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

.faq-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.faq-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.faq-icon i {
    width: 20px;
    height: 20px;
}

.faq-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
    transition: color var(--transition-speed);
}

.faq-list {
    display: grid;
    gap: 0.75rem;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-question {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--card-secondary);
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.faq-question:hover {
    background: var(--bg-white);
}

.faq-question span {
    flex: 1;
}

.faq-question svg,
.faq-question i {
    color: var(--primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.faq-item.open .faq-question {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
}

.faq-item.open .faq-question svg,
.faq-item.open .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 1rem 1.25rem;
    background: var(--bg-white);
    transition: background-color var(--transition-speed);
}

.faq-item.open .faq-answer {
    display: block;
}

.faq-answer p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

.faq-answer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* Category Promo Grid */
.category-promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 2rem;
}

.category-promo-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.category-promo-card.icon-theme {
    background: rgba(217, 83, 92, 0.1);
    border: 1px solid rgba(217, 83, 92, 0.2);
}

.category-promo-card.mac-theme {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.category-promo-card.favicon-theme {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.category-promo-card.converter-theme {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.2);
}

[data-theme="dark"] .category-promo-card.icon-theme {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.25);
}

[data-theme="dark"] .category-promo-card.mac-theme {
    background: rgba(129, 140, 248, 0.15);
    border-color: rgba(129, 140, 248, 0.25);
}

[data-theme="dark"] .category-promo-card.favicon-theme {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.25);
}

[data-theme="dark"] .category-promo-card.converter-theme {
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.25);
}

.category-promo-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.category-promo-card.icon-theme:hover { border-color: #d9535c; }
.category-promo-card.mac-theme:hover { border-color: #6366f1; }
.category-promo-card.favicon-theme:hover { border-color: #f59e0b; }
.category-promo-card.converter-theme:hover { border-color: #3498db; }

.category-promo-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.category-promo-icon i {
    width: 20px;
    height: 20px;
}

.icon-theme .category-promo-icon { background: #d9535c; }
.mac-theme .category-promo-icon { background: #6366f1; }
.favicon-theme .category-promo-icon { background: #f59e0b; }
.converter-theme .category-promo-icon { background: #3498db; }

.category-promo-content {
    flex: 1;
}

.category-promo-content h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 2px;
    transition: color var(--transition-speed);
}

.category-promo-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.category-promo-arrow {
    color: var(--text-muted);
    transition: var(--transition);
}

.category-promo-arrow i {
    width: 18px;
    height: 18px;
}

.category-promo-card:hover .category-promo-arrow {
    transform: translateX(4px);
}

.icon-theme:hover .category-promo-arrow { color: #d9535c; }
.mac-theme:hover .category-promo-arrow { color: #6366f1; }
.favicon-theme:hover .category-promo-arrow { color: #f59e0b; }
.converter-theme:hover .category-promo-arrow { color: #3498db; }

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px 30px;
    }
    
    .page-header {
        padding: 1.5rem 0 2rem;
    }
    
    .header-title-row {
        gap: 12px;
    }
    
    .page-icon {
        width: 48px;
        height: 48px;
    }
    
    .page-icon i {
        width: 24px;
        height: 24px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .intro-text {
        font-size: 1rem;
    }
    
    .converters-grid {
        grid-template-columns: 1fr;
    }
    
    .converter-card {
        padding: 16px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .info-section,
    .faq-section,
    .popular-section {
        padding: 1.25rem;
    }
    
    .category-promo-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.25rem;
    }
    
    .section-header h2 {
        font-size: 1.1rem;
    }
    
    .card-icon {
        width: 42px;
        height: 42px;
    }
    
    .card-icon i {
        width: 22px;
        height: 22px;
    }
    
    .popular-tools {
        gap: 8px;
    }
    
    .popular-tool {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion) {
    .converter-card::after {
        display: none;
    }
    
    .converter-card:hover,
    .popular-tool:hover,
    .category-promo-card:hover {
        transform: none;
    }
    
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
