/* ============================================================================ */
/* Image to PNG Converter - Styling */
/* ============================================================================ */

/* Tool Page Wrapper */
.tool-page-wrapper {
    background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
    min-height: 100vh;
    padding-bottom: 4rem;
}

/* Tool Hero */
.tool-hero {
    text-align: center;
    padding: 4rem 2rem 3rem;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
}

.hero-content-tool {
    max-width: 800px;
    margin: 0 auto;
}

.tool-badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.tool-hero h1 {
    font-size: 2.8rem;
    color: white;
    margin-bottom: 1rem;
    font-weight: 800;
}

.tool-hero p {
    font-size: 1.2rem;
    color: #c7d2fe;
    max-width: 600px;
    margin: 0 auto;
}

/* How It Works Section */
.how-it-works {
    padding: 4rem 2rem;
    text-align: center;
}

.how-it-works h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 3rem;
}

.steps-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}

.step-card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 2rem;
    width: 200px;
    position: relative;
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: #818cf8;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
}

.step-icon {
    position: relative;
    margin-bottom: 1rem;
}

.step-emoji {
    font-size: 3rem;
    display: block;
    animation: bounce 2s ease-in-out infinite;
}

.step-card:nth-child(1) .step-emoji { animation-delay: 0s; }
.step-card:nth-child(3) .step-emoji { animation-delay: 0.3s; }
.step-card:nth-child(5) .step-emoji { animation-delay: 0.6s; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.step-number {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.step-card h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.step-card p {
    color: #94a3b8;
    font-size: 0.9rem;
}

.step-arrow {
    color: #6366f1;
    animation: arrowPulse 1.5s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.5; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(5px); }
}

/* Tool Container */
.tool-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* Upload Box Enhancement (Dark Theme) */
.tool-container .upload-box {
    border: 2px dashed #6366f1;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    background: rgba(30, 41, 59, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tool-container .upload-box:hover {
    border-color: #818cf8;
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.15);
}

.tool-container .upload-icon-wrapper {
    position: relative;
    display: inline-block;
}

.tool-container .upload-icon-wrapper i {
    font-size: 4rem;
    color: #6366f1;
}

.tool-container .upload-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.2);
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

.tool-container .upload-instructions p {
    color: #c7d2fe;
    margin: 1rem 0;
}

.tool-container .upload-limit {
    font-size: 0.85rem !important;
    color: #94a3b8 !important;
}

.tool-container #browseBtn {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tool-container #browseBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

/* Upload Preview Grid */
.upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.upload-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.upload-preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.upload-preview-item .filename {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #c7d2fe;
    padding: 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Convert Button (Dark Theme) */
.tool-container .convert-actions {
    text-align: center;
    margin: 2rem 0;
}

.tool-container #convertBtn {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.tool-container #convertBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.tool-container #convertBtn:disabled {
    background: #475569;
    cursor: not-allowed;
}

.tool-container .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Progress Bar (Dark Theme) */
.tool-container .progress-bar {
    height: 10px;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 5px;
    margin: 1.5rem 0;
    overflow: hidden;
    position: relative;
}

.tool-container .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.tool-container #progressText {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

/* View Toggle */
.view-toggle {
    display: flex !important;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.view-toggle button {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #c7d2fe;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-toggle button:hover {
    border-color: #818cf8;
    background: rgba(99, 102, 241, 0.2);
}

.view-toggle button.active {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    border-color: transparent;
}

/* List View */
.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.list-item:hover {
    transform: translateX(5px);
    border-color: #818cf8;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.1);
}

.list-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.list-meta {
    flex: 1;
}

.list-meta .line {
    color: #c7d2fe;
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.list-meta .line:first-child {
    color: white;
    font-weight: 600;
}

.list-download {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.list-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

/* Gallery View */
.gallery-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.gallery-item {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-8px);
    border-color: #818cf8;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gallery-meta {
    color: #c7d2fe;
    padding: 1rem;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-download {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-download {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Download Button (Dark Theme) */
.download-actions {
    text-align: center;
    margin: 2rem 0;
}

.tool-container .btn-zip {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tool-container .btn-zip:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

.tool-container .btn-zip:disabled {
    background: #475569;
    cursor: not-allowed;
}

/* Add More Section */
.add-more {
    text-align: center;
    margin-top: 2rem;
}

.add-more button {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.add-more button:hover {
    background: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

/* Features Section */
.tool-features {
    padding: 4rem 2rem;
    text-align: center;
    background: rgba(15, 23, 42, 0.5);
}

.tool-features h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 3rem;
}

.features-grid-tool {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.feature-emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.feature-item h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: #94a3b8;
    font-size: 0.95rem;
}

/* Supported Formats */
.supported-formats {
    padding: 3rem 2rem;
    text-align: center;
}

.supported-formats h2 {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 2rem;
}

.formats-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.format-badge {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.format-badge:hover {
    background: rgba(99, 102, 241, 0.3);
    transform: scale(1.05);
}

/* Blog Section */
.tool-blog {
    padding: 4rem 2rem;
    background: #0f172a;
}

.blog-container-tool {
    max-width: 900px;
    margin: 0 auto;
}

.tool-blog h2 {
    font-size: 2rem;
    color: white;
    text-align: center;
    margin-bottom: 3rem;
}

.blog-article {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 3rem;
}

.blog-article h3 {
    color: #a5b4fc;
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-article h3:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.blog-article h4 {
    color: #c7d2fe;
    font-size: 1.2rem;
    margin: 1.5rem 0 0.5rem;
}

.blog-article p {
    color: #cbd5e1;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.blog-list {
    color: #cbd5e1;
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.blog-list li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

.blog-list.numbered {
    list-style-type: decimal;
}

.blog-list a {
    color: #818cf8;
    text-decoration: none;
}

.blog-list a:hover {
    text-decoration: underline;
}

/* Comparison Table */
.comparison-table {
    overflow-x: auto;
    margin: 2rem 0;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table th {
    background: rgba(99, 102, 241, 0.2);
    color: white;
    font-weight: 600;
}

.comparison-table td {
    color: #c7d2fe;
}

/* FAQ Items */
.faq-item {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.faq-item h4 {
    color: #818cf8;
    margin-bottom: 0.5rem;
}

.faq-item p {
    margin-bottom: 0;
}

/* Responsive - Dark Theme */
@media (max-width: 768px) {
    .tool-hero h1 { 
        font-size: 2rem; 
    }
    
    .steps-container { 
        flex-direction: column; 
    }
    
    .step-arrow { 
        transform: rotate(90deg); 
        margin: 0.5rem 0;
    }
    
    .step-card { 
        width: 100%; 
        max-width: 280px; 
    }
    
    .blog-article { 
        padding: 1.5rem; 
    }
    
    .gallery-view {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .features-grid-tool {
        grid-template-columns: 1fr;
    }
    
    .list-item {
        flex-direction: column;
        text-align: center;
    }
    
    .list-item img {
        width: 100%;
        max-width: 200px;
    }
}