/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    font-size: 1.5rem;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #667eea;
}

/* Ad Banners */
.ad-banner {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    margin: 1rem auto;
    max-width: 728px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: #6c757d;
}

.ad-placeholder i {
    font-size: 1.5rem;
}

.ad-placeholder span {
    font-weight: 500;
}

.ad-placeholder small {
    font-size: 0.75rem;
}

/* Main Content */
.main {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    margin: 2rem auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.main .container {
    padding: 3rem 20px;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Upload Section */
.upload-section {
    position: relative;
    margin-bottom: 3rem;
}

.upload-container {
    max-width: 600px;
    margin: 0 auto;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    /* Safari iOS compatibility */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    /* Ensure proper touch target size */
    min-height: 200px;
    min-width: 200px;
}

.upload-area:hover {
    border-color: #764ba2;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
}

.upload-content i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.upload-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.upload-content p {
    color: #666;
    font-size: 1rem;
}

.upload-area.touch-device .desktop-upload-message {
    display: none;
}

.mobile-upload-wrapper {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mobile-upload-button {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(118, 75, 162, 0.25);
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    justify-content: center;
    width: 100%;
}

.mobile-upload-button i {
    font-size: 1rem;
}

.mobile-upload-button:focus,
.mobile-upload-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(118, 75, 162, 0.3);
    outline: none;
}

.mobile-upload-button:active {
    transform: translateY(1px);
}

.upload-area.touch-device .mobile-upload-wrapper {
    position: relative !important;
    clip: auto !important;
    width: 100% !important;
    height: auto !important;
    margin: 1.5rem 0 0 !important;
    overflow: visible !important;
    display: flex !important;
    justify-content: center !important;
    white-space: normal !important;
    min-height: 3.25rem !important;
    padding: 0 !important;
    border: 0 !important;
}

.upload-area.touch-device .mobile-upload-button {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.upload-area.touch-device {
    cursor: default;
}

/* Additional debugging styles */
.upload-area.touch-device .desktop-upload-message {
    display: none !important;
}

.file-input {
    font-size: 16px;
}

.file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mobile-upload-wrapper .file-input-touch {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.01;
    cursor: pointer;
}

.multi-file-hint {
    display: block;
    color: #667eea;
    font-weight: 500;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Controls */
.controls {
    margin-top: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Progress Section */
.progress-section {
    margin-top: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.progress-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.progress-overview {
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
}

.image-list {
    max-height: 300px;
    overflow-y: auto;
}

.image-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.image-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.image-item-info {
    flex: 1;
    min-width: 0; /* Allow text to wrap */
}

.image-item-name {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-item-size {
    font-size: 0.8rem;
    color: #666;
}

.image-item-status {
    margin-left: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.image-item-status.processing {
    background: #fff3cd;
    color: #856404;
}

.image-item-status.ready {
    background: #d1ecf1;
    color: #0c5460;
}

.image-item-status.completed {
    background: #d4edda;
    color: #155724;
}

.image-item-status.error {
    background: #f8d7da;
    color: #721c24;
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin-bottom: 0.5rem;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #666;
}

select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Sidebar Ad */
.sidebar-ad {
    position: absolute;
    right: -150px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 250px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Results Section */
.results-section {
    margin-top: 3rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
}

.results-section h3 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.result-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.result-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.image-container {
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.file-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #666;
}

.compression-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #28a745;
}

.download-section {
    text-align: center;
}

/* Batch Results */
.batch-summary {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.batch-summary h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.summary-stat {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.summary-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.summary-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #28a745;
}

.batch-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    max-width: 100%;
    overflow: hidden;
}

.batch-image-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
}

.batch-image-card img {
    width: 100%;
    max-width: 200px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.batch-image-card h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.batch-image-stats {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.batch-image-download {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.8rem;
}

.batch-download-section {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e9ecef;
}

/* File Support Section */
.file-support {
    margin: 3rem 0;
    text-align: center;
}

.file-support h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.format-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    border-top: 3px solid #667eea;
}

.format-card:hover {
    transform: translateY(-5px);
}

.format-card i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.format-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.format-card p {
    color: #666;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* General h3 styling for consistent gradient appearance */
h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

/* Features Section */
.features {
    margin-top: 4rem;
    text-align: center;
}

.features h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* FAQ Section */
.faq-section {
    margin-top: 4rem;
    text-align: center;
}

.faq-section h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.faq-item {
    background: white;
    border-radius: 15px;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
    outline: none;
    position: relative;
    z-index: 10;
    /* Firefox-specific fixes */
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    /* Remove any borders or outlines */
    border-bottom: none !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    /* Ensure clickability */
    pointer-events: auto;
    touch-action: manipulation;
    /* Firefox button fix */
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    /* Force button behavior */
    display: -moz-box;
    display: flex;
}

.faq-question:hover {
    color: #667eea;
}

.faq-question:focus {
    color: #667eea;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.faq-question:active {
    color: #764ba2;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Additional Firefox-specific overrides */
.faq-question::-moz-focus-inner {
    border: 0 !important;
    outline: none !important;
}

.faq-question:focus-visible {
    outline: none !important;
    border: none !important;
}

.faq-question span {
    flex: 1;
    margin-right: 1rem;
}

.faq-question i {
    font-size: 1rem;
    color: #667eea;
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer.active {
    display: block;
}

.faq-answer p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.feature-card:nth-child(1) i {
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.feature-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
}

.footer-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #667eea;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #667eea;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding: 1rem 0;
    text-align: center;
    color: #ccc;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar-ad {
        display: none;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .compression-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .ad-banner {
        max-width: 100%;
        margin: 1rem;
    }
    
    .batch-image-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.75rem;
    }
    
    .batch-image-card img {
        height: 110px;
        max-width: 180px;
    }
    
    .faq-container {
        margin: 0 1rem;
    }
    
    .faq-question {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .faq-answer.active {
        padding: 0 1rem 1rem;
    }
}

@media (max-width: 768px) {
    /* Force mobile upload button on small screens */
    .upload-area .mobile-upload-wrapper {
        position: relative !important;
        clip: auto !important;
        width: 100% !important;
        height: auto !important;
        margin: 1.5rem 0 0 !important;
        overflow: visible !important;
        display: flex !important;
        justify-content: center !important;
        white-space: normal !important;
        min-height: 3.25rem !important;
        padding: 0 !important;
        border: 0 !important;
    }
    
    .upload-area .mobile-upload-button {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .upload-area .desktop-upload-message {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .main .container {
        padding: 2rem 15px;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .controls {
        padding: 1.5rem;
    }
    
    .results-section {
        padding: 1.5rem;
    }
    
    .batch-image-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .batch-image-card {
        padding: 0.75rem;
    }
    
    .batch-image-card img {
        height: 100px;
        max-width: 150px;
    }
    
    .image-item {
        padding: 0.5rem;
    }
    
    .image-item img {
        width: 35px;
        height: 35px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Animation */
.success-animation {
    animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Sub-page Styles */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.page-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.last-updated {
    color: #666;
    font-style: italic;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.policy-section {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #667eea;
}

.policy-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.policy-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #555;
    margin: 1.5rem 0 0.5rem 0;
}

.policy-section p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.policy-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.policy-section li {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.policy-section a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.policy-section a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.policy-section strong {
    color: #333;
    font-weight: 600;
}

/* Responsive adjustments for sub-pages */
@media (max-width: 768px) {
    .page-content {
        padding: 1rem 0;
    }
    
    .page-content h1 {
        font-size: 2rem;
    }
    
    .policy-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .policy-section h2 {
        font-size: 1.3rem;
    }
    
    .nav {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* Recommended Tools Section */
.recommended-tools {
    margin-top: 2rem;
}

.recommended-tools h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.recommended-tools .tool-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1.5rem;
}

.recommended-tools .tool-card:last-child {
    margin-bottom: 0;
}

.recommended-tools .tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0,0,0,0.08);
}

.recommended-tools .tool-link {
    display: block;
    line-height: 0;
}

.recommended-tools .tool-link img {
    display: block;
    width: 100%;
    height: auto;
}
