/* Windows XP High Contrast Black Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', sans-serif;
    background: #000000;
    min-height: 100vh;
    padding: 20px;
    color: #FFFF00;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #000000;
    border: 3px solid #FFFFFF;
    padding: 40px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 3px solid #FFFFFF;
    padding-bottom: 30px;
}

h1 {
    font-size: 3em;
    color: #FFFFFF;
    margin-bottom: 10px;
    font-weight: bold;
    text-shadow: 2px 2px 0px #000000;
}

.subtitle {
    color: #FFFF00;
    font-size: 1.1em;
    margin-bottom: 10px;
    font-weight: bold;
}

.warning {
    background: #000000;
    border: 3px solid #FFFF00;
    color: #FFFF00;
    padding: 10px 20px;
    display: inline-block;
    font-weight: bold;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 3px solid #FFFFFF;
}

.tab-button {
    background: #000000;
    border: 3px solid #FFFFFF;
    border-bottom: none;
    padding: 15px 30px;
    font-size: 1.1em;
    cursor: pointer;
    color: #FFFF00;
    font-weight: bold;
}

.tab-button:hover {
    background: #800080;
    color: #FFFFFF;
}

.tab-button.active {
    background: #800080;
    color: #FFFFFF;
    border-bottom: 3px solid #800080;
    margin-bottom: -3px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Settings Section */
.settings-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 3px solid #FFFFFF;
    background: #000000;
    position: relative;
}

.settings-label {
    display: block;
    color: #FFFF00;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 15px;
}

#png-size-value {
    color: #00FFFF;
}

.slider-container {
    position: relative;
    padding: 10px 0;
}

.slider-track-bg {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 8px;
    margin-top: -4px;
    background: #808080;
    border: 2px solid #FFFFFF;
    pointer-events: none;
    z-index: 0;
}

#png-size-slider {
    position: relative;
    width: 100%;
    height: 30px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    z-index: 1;
}

/* Webkit (Chrome, Safari, Edge) track */
#png-size-slider::-webkit-slider-track {
    width: 100%;
    height: 20px;
    background: transparent;
    border: none;
}

/* Webkit thumb */
#png-size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    background: #800080;
    cursor: pointer;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
}

/* Firefox track */
#png-size-slider::-moz-range-track {
    width: 100%;
    height: 20px;
    background: transparent;
    border: none;
}

/* Firefox thumb */
#png-size-slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    background: #800080;
    cursor: pointer;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
}

.settings-hint {
    color: #00FF00;
    font-size: 0.9em;
    margin-top: 10px;
    font-weight: bold;
}

/* Link Section */
.link-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 3px solid #00FFFF;
    background: #000000;
}

.link-section h3 {
    color: #FFFFFF;
    font-weight: bold;
    margin-bottom: 15px;
}

.link-section p {
    color: #FFFF00;
    margin-bottom: 15px;
    font-weight: bold;
}

.link-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#shareable-link {
    flex: 1;
    padding: 12px;
    background: #000000;
    border: 3px solid #FFFFFF;
    color: #00FFFF;
    font-family: monospace;
    font-size: 1em;
    font-weight: bold;
}

.link-hint {
    color: #00FF00;
    font-size: 0.9em;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.upload-box {
    border: 3px dashed #FFFFFF;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    background: #000000;
}

.upload-box:hover {
    border-style: solid;
    background: #800080;
}

.upload-box.drag-over {
    border-style: solid;
    background: #800080;
    border-color: #00FFFF;
}

.upload-prompt svg {
    color: #00FFFF;
    margin-bottom: 20px;
}

.upload-prompt p {
    font-size: 1.2em;
    color: #FFFFFF;
    margin-bottom: 10px;
    font-weight: bold;
}

.file-limit {
    font-size: 0.9em !important;
    color: #00FF00 !important;
    font-weight: bold !important;
}

.selected-file {
    margin-top: 15px;
    color: #00FFFF;
    font-weight: bold;
    font-size: 1.1em;
}

/* Progress Section */
.progress-section {
    margin: 30px 0;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #000000;
    border: 3px solid #FFFFFF;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: #800080;
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: bold;
    border-right: 3px solid #FFFFFF;
}

.progress-text {
    text-align: center;
    color: #FFFF00;
    font-size: 1.1em;
    font-weight: bold;
}

/* Results Section */
.results-section {
    margin-top: 30px;
}

.download-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: 3px solid #FFFFFF;
    font-size: 1.1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.btn-primary {
    background: #000000;
    color: #FFFF00;
}

.btn-primary:hover {
    background: #800080;
    color: #FFFFFF;
}

.btn-secondary {
    background: #000000;
    color: #00FFFF;
    border: 3px solid #00FFFF;
}

.btn-secondary:hover {
    background: #800080;
    color: #FFFFFF;
    border-color: #FFFFFF;
}

/* PNG Gallery */
.png-gallery {
    margin-top: 30px;
    border: 3px solid #FFFFFF;
    padding: 20px;
}

.png-gallery h3 {
    margin-bottom: 20px;
    color: #FFFFFF;
    font-weight: bold;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.png-item {
    border: 3px solid #00FFFF;
    padding: 15px;
    text-align: center;
    background: #000000;
}

.png-item:hover {
    background: #800080;
    border-color: #FFFFFF;
}

.png-preview-container {
    position: relative;
    width: 100%;
    height: 150px;
    margin-bottom: 10px;
    background: #FFFFFF;
    border: 2px solid #000000;
}

.png-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.png-preview.loaded {
    opacity: 1;
}

.png-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #808080;
    border-top-color: #800080;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.png-loading-spinner.hidden {
    display: none;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.png-item p {
    color: #FFFF00;
    font-size: 0.9em;
    margin-bottom: 10px;
    font-weight: bold;
}

.png-download-btn {
    padding: 8px 16px;
    background: #000000;
    color: #00FFFF;
    border: 3px solid #00FFFF;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
}

.png-download-btn:hover {
    background: #800080;
    color: #FFFFFF;
    border-color: #FFFFFF;
}

.original-filename {
    text-align: center;
    color: #FFFF00;
    font-size: 1.1em;
    font-weight: bold;
}

/* Error Section */
.error-section {
    margin-top: 30px;
}

.error-box {
    background: #000000;
    border: 3px solid #FFFF00;
    padding: 30px;
    text-align: center;
}

.error-box h3 {
    color: #FFFF00;
    margin-bottom: 15px;
    font-weight: bold;
}

.error-box p {
    color: #FFFFFF;
    font-size: 1.1em;
    margin-bottom: 20px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .download-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}
