/* General Reset and Box-Sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #f4f4f9;
    background-color: #181818; /* Dark background for night mode */
    padding: 0;
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header Styling */
.header {
    background-color: #222;
    color: #f4f4f9;
    padding: 10px 20px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Ad Banner Wrapper */
.ad-banner-wrapper {
    width: 100%;  /* Full width of the container */
    max-width: 900px;  /* Match the form container width */
    padding: 20px 0;  /* Add equal padding on top and bottom */
    margin: 20px auto;  /* Center the wrapper and add vertical margin */
    box-sizing: border-box;  /* Include padding in the element's total size */
    text-align: center;  /* Horizontally center the content inside */
    height: 100px;  /* Fixed height for the banner container */
    background-color: #333;  /* Background color for the ad banner */
    color: #fff;  /* Text color */
}

/* Placeholder Text inside Ad Banner */
.ad-banner-wrapper p {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    line-height: 100px;  /* Vertically center the text inside the div */
}

/* Container for main content */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 70px; /* Added top padding to ensure content starts below the fixed header */
}

/* File Upload Form */
.form-column {
    background-color: #282828;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    color: #f4f4f9;
    margin-bottom: 20px;
}

.form-column h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

.form-column .tagline {
    font-size: 18px;
    color: #888;
    margin-bottom: 30px;
}

.upload-label {
    font-size: 16px;
    color: #f4f4f9;
    display: block;
    margin-bottom: 10px;
}

input[type="file"] {
    padding: 12px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #444;
    margin-bottom: 20px;
    width: 100%;
    cursor: pointer;
    background-color: #333;
    color: #f4f4f9;
    transition: all 0.3s ease;
}

input[type="file"]:hover {
    background-color: #444;
    border-color: #555;
}

button.submit-btn {
    padding: 15px 30px;
    background-color: #FF0000;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

button.submit-btn:hover {
    background-color: #EA0606;
}

.supported-files {
    margin-top: 20px;
    text-align: center;
}

.supported-files img {
    height: 50px;
}

/* Result Section */
.result-container {
    margin-top: 40px;
    text-align: center;
    color: #f4f4f9;
}

h3 {
    font-size: 22px;
}

p {
    font-size: 18px;
    color: #888;
}

a.btn {
    padding: 15px 30px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    width: 100%;
    transition: background-color 0.3s;
}

a.btn:hover {
    background-color: #218838;
}

.download-icon {
    height: 30px;
    margin-right: 10px;
}

/* Footer Section */
.footer {
    background-color: #222;
    padding: 20px;
    color: #f4f4f9;
    text-align: center;
}

.footer a {
    color: #f4f4f9;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        padding-top: 70px;
    }

    .form-column {
        padding: 20px;
    }

    .form-column h1 {
        font-size: 28px;
    }

    .form-column .tagline {
        font-size: 16px;
    }

    .upload-label {
        font-size: 14px;
    }

    input[type="file"] {
        padding: 12px;
        font-size: 14px;
    }

    button.submit-btn {
        padding: 12px 24px;
        font-size: 16px;
    }

    .result-container a.btn {
        width: 100%;
    }

    /* Ad Banner Responsiveness */
    .ad-banner-wrapper {
        padding: 5px 0;  /* Less padding on mobile */
        height: auto;
        max-width: 100%;
    }

    .ad-banner-wrapper p {
        font-size: 16px;  /* Adjust font size on mobile */
        line-height: auto;  /* Adjust line height for better spacing */
    }

    .ad-banner-wrapper img {
        width: 100%;  /* Full width of the container */
    }
}
/* General text styling */
.article-content {
    color: #b0b0b0; /* Soft gray for main text */
    line-height: 1.6;
    font-size: 16px;
    margin-bottom: 20px;
}

/* Headings - use white for headings and bullets */
.section-heading,
.sub-heading,
.highlight-text {
    color: #ffffff; /* White color for main headings and key text */
}

/* Styling for lists */
.file-formats-list,
.use-cases-list,
.features-list,
.steps-list {
    margin-left: 20px;
}

.file-formats-list li,
.use-cases-list li,
.features-list li,
.steps-list li {
    margin-bottom: 10px;
}

/* Highlighted text (white text before the colon in lists) */
.highlight-text {
    color: #ffffff; /* White for key points like "Image Files:", "Software Testing:", etc. */
}

/* Style for bolded items */
strong {
    color: #ffffff; /* White for bold items */
}
/* Result Container */
.result-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0;
    background: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: none;
}

/* Success Result */
.conversion-result {
    color: #e0e0e0;
}

.result-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    background: #252525;
}

.result-header h2 {
    margin: 0.5rem 0 0;
    font-size: 1.8rem;
    color: #fff;
}

.result-header .subtitle {
    margin: 0.5rem 0 0;
    color: #aaa;
    font-size: 1rem;
}

.success-icon {
    width: 60px;
    height: 60px;
}

/* Preview Section */
.preview-section {
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.preview-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-box {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    background: #252525;
    border-radius: 8px;
    padding: 20px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.preview-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    background: 
        linear-gradient(45deg, #2a2a2a 25%, transparent 25%, transparent 75%, #2a2a2a 75%),
        linear-gradient(45deg, #2a2a2a 25%, transparent 25%, transparent 75%, #2a2a2a 75%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

.preview-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #777;
}

.preview-fallback svg {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}

/* Color Controls */
.color-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.color-picker {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.color-picker label {
    font-size: 0.95rem;
    color: #ccc;
}

.color-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-input-group input[type="color"] {
    width: 40px;
    height: 40px;
    border: 2px solid #333;
    border-radius: 8px;
    cursor: pointer;
    background: #333;
    padding: 0;
}

.color-input-group input[type="text"] {
    width: 80px;
    padding: 0.5rem;
    background: #252525;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-family: monospace;
}

.btn.reset-color {
    background: #333;
    color: #fff;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn.reset-color:hover {
    background: #444;
}

/* Download Options */
.download-options {
    margin-top: 1rem;
}

.download-options h3 {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    color: #fff;
    text-align: center;
}

.size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.size-option {
    display: flex;
}

.size-btn {
    flex: 1;
    background: #252525;
    color: #fff;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.2s;
    min-height: 80px;
    justify-content: center;
}

.size-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

.size-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.size-label {
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: #fff;
}

.size-dimensions {
    font-size: 0.85rem;
    color: #aaa;
}

/* Action Buttons */
.action-buttons {
    padding: 1.5rem 2rem;
    background: #252525;
    display: flex;
    justify-content: center;
}

.btn.convert-again {
    background: #ff4444;
    color: #fff;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn.convert-again:hover {
    background: #ff3333;
}

/* Error State */
.conversion-error {
    padding: 2rem;
    text-align: center;
}

.error-header {
    margin-bottom: 1.5rem;
}

.error-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}

.error-header h2 {
    margin: 0;
    color: #fff;
}

.error-content p {
    color: #ccc;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.btn.try-again {
    background: #ff4444;
    color: #fff;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn.try-again:hover {
    background: #ff3333;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .preview-section {
        padding: 1.5rem;
    }
    
    .size-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .result-header {
        padding: 1.5rem 1rem 1rem;
    }
    
    .preview-section {
        padding: 1rem;
    }
    
    .size-grid {
        grid-template-columns: 1fr;
    }
    
    .color-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .color-picker {
        flex-direction: column;
        align-items: flex-start;
    }
}