/* ============================================
   PSD CONVERTERS - STYLES
   Purple/Magenta theme for Adobe Photoshop
   Dark mode support with light mode default
   ============================================ */

/* CSS Variables - Light Mode (Default) */
:root {
    --transition-speed: 0.25s;
    --transition: all 0.3s ease;
    
    /* Primary Colors - Purple Theme for PSD/Photoshop */
    --primary: #8b5cf6;
    --primary-light: rgba(139, 92, 246, 0.1);
    --primary-dark: #7c3aed;
    --accent-color: #8b5cf6;
    
    /* Secondary Colors */
    --color-red: #e64e4e;
    --color-blue: #3399cc;
    --color-green: #339966;
    --color-purple: #8b5cf6;
    --color-magenta: #c026d3;
    
    /* 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;
    
    --color-red: #f87171;
    --color-blue: #5cb8e8;
    --color-green: #4ade80;
    --color-purple: #a78bfa;
    --color-magenta: #e879f9;
    
    --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(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

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

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

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    text-align: center;
    padding: 30px 0 40px;
}

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

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

[data-theme="dark"] .page-icon {
    box-shadow: 0 4px 14px rgba(167, 139, 250, 0.25);
}

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

.page-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    letter-spacing: -0.02em;
}

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

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

.intro-text a:hover {
    text-decoration: underline;
}

/* ============================================
   CONVERTER SECTIONS
   ============================================ */
.converter-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

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

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

.section-icon.from-psd {
    background: var(--color-purple);
}

.section-icon.to-psd {
    background: var(--color-magenta);
}

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

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

/* ============================================
   CONVERTERS GRID
   ============================================ */
.converters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* ============================================
   CONVERTER CARDS
   ============================================ */
.converter-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

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

.converter-card.coming-soon {
    opacity: 0.7;
    cursor: default;
    pointer-events: none;
}

.converter-card.coming-soon:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
}

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

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

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

/* Card icon colors - FROM PSD */
.card-icon.psd-to-ico { background: var(--color-red); }
.card-icon.psd-to-png { background: #10b981; }
.card-icon.psd-to-jpg { background: #f59e0b; }
.card-icon.psd-to-webp { background: var(--color-blue); }
.card-icon.psd-to-pdf { background: #ef4444; }
.card-icon.psd-to-tiff { background: #6366f1; }
.card-icon.psd-to-gif { background: #ec4899; }
.card-icon.psd-to-bmp { background: var(--color-green); }
.card-icon.psd-to-svg { background: #f97316; }
.card-icon.psd-to-avif { background: #14b8a6; }

/* Card icon colors - TO PSD */
.card-icon.png-to-psd { background: #10b981; }
.card-icon.jpg-to-psd { background: #f59e0b; }
.card-icon.tiff-to-psd { background: #6366f1; }
.card-icon.bmp-to-psd { background: var(--color-green); }

/* Card icon colors - Tools */
.card-icon.psd-viewer { background: var(--color-purple); }
.card-icon.psd-analyzer { background: var(--color-blue); }
.card-icon.psd-resizer { background: #f59e0b; }
.card-icon.psd-compressor { background: var(--color-green); }

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

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

.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: all 0.2s ease;
    flex-shrink: 0;
}

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

.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.3px;
}

.badge-popular {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

[data-theme="dark"] .badge-popular {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

.badge-soon {
    background: var(--card-secondary);
    color: var(--text-muted);
}

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

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

/* ============================================
   POPULAR/QUICK LINKS SECTION
   ============================================ */
.popular-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 40px;
}

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

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

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

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

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

.popular-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--card-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.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);
}

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

/* ============================================
   INFO SECTION
   ============================================ */
.info-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 40px;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.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: 18px;
    height: 18px;
}

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

.info-section > p {
    color: var(--text);
    line-height: 1.7;
    margin: 0 0 24px;
}

.info-section > p a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.info-section > p a:hover {
    text-decoration: underline;
}

/* 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: 40px;
    height: 40px;
    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: 20px;
    height: 20px;
}

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

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

/* ============================================
   BENEFITS SECTION
   ============================================ */
.benefits-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 40px;
}

.benefits-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

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

.benefits-icon i {
    width: 18px;
    height: 18px;
}

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

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.benefit-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.benefit-icon-wrap {
    width: 44px;
    height: 44px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.benefit-icon-wrap i {
    width: 22px;
    height: 22px;
}

.benefit-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 6px;
}

.benefit-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

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

.benefit-content a:hover {
    text-decoration: underline;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 40px;
}

.faq-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.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: 18px;
    height: 18px;
}

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

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

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

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

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

.faq-question span {
    flex: 1;
    padding-right: 12px;
}

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

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 16px 18px;
    margin: 0;
    color: var(--text);
    line-height: 1.7;
    border-top: 1px solid var(--border);
    background: var(--bg-white);
}

.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: 40px;
}

.category-promo-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
}

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

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

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

.category-promo-card.converter-theme .category-promo-icon {
    background: var(--color-blue);
}

.category-promo-card.converter-theme:hover {
    border-color: var(--color-blue);
}

.category-promo-card.tools-theme .category-promo-icon {
    background: var(--color-green);
}

.category-promo-card.tools-theme:hover {
    border-color: var(--color-green);
}

.category-promo-card.icon-theme .category-promo-icon {
    background: var(--color-red);
}

.category-promo-card.icon-theme:hover {
    border-color: var(--color-red);
}

.category-promo-card.png-theme .category-promo-icon {
    background: var(--color-purple);
}

.category-promo-card.png-theme:hover {
    border-color: var(--color-purple);
}

.category-promo-content {
    flex: 1;
    min-width: 0;
}

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

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

.category-promo-arrow {
    color: var(--text-light);
    transition: all 0.2s ease;
}

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

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

.category-promo-card.converter-theme:hover .category-promo-arrow { color: var(--color-blue); }
.category-promo-card.tools-theme:hover .category-promo-arrow { color: var(--color-green); }
.category-promo-card.icon-theme:hover .category-promo-arrow { color: var(--color-red); }
.category-promo-card.png-theme:hover .category-promo-arrow { color: var(--color-purple); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 16px 30px;
    }
    
    .page-header {
        padding: 20px 0 30px;
    }
    
    .header-title-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .page-icon {
        width: 56px;
        height: 56px;
    }
    
    .page-icon i {
        width: 28px;
        height: 28px;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .intro-text {
        font-size: 1rem;
    }
    
    .section-header {
        gap: 10px;
        margin-bottom: 16px;
    }
    
    .section-icon {
        width: 38px;
        height: 38px;
    }
    
    .section-icon i {
        width: 18px;
        height: 18px;
    }
    
    .section-header h2 {
        font-size: 1.15rem;
    }
    
    .converters-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .converter-card {
        padding: 14px 16px;
    }
    
    .card-icon {
        width: 42px;
        height: 42px;
    }
    
    .card-icon i {
        width: 20px;
        height: 20px;
    }
    
    .card-title {
        font-size: 0.95rem;
    }
    
    .card-description {
        font-size: 0.8rem;
    }
    
    .popular-section,
    .info-section,
    .benefits-section,
    .faq-section {
        padding: 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .category-promo-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .popular-tools {
        flex-direction: column;
    }
    
    .popular-tool {
        width: 100%;
        justify-content: center;
    }
    
    .faq-question {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
    
    .faq-answer p {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text);
}

/* Selection */
::selection {
    background: rgba(139, 92, 246, 0.2);
    color: var(--dark);
}

[data-theme="dark"] ::selection {
    background: rgba(167, 139, 250, 0.3);
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    .converter-card:hover,
    .category-promo-card:hover {
        transform: none;
    }
}
