/*
 * ConsoleSniper - Image Converter + Compressor Tool Styles
 * Professional dark mode neumorphic design
 */

/* ===== IMAGE CONVERTER PAGE LAYOUT ===== */
.image-converter-page {
    background: #0a0a0a;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* ===== CONVERTER HERO SECTION ===== */
.converter-hero {
    position: relative;
    padding: 6rem 2rem 5rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 45vh;
    background: #000000;
}

.converter-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(white 1px, transparent 1px);
    background-size: 100px 100px;
    background-position: 0 0;
    opacity: 0.03;
    pointer-events: none;
}

.converter-hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    text-align: center;
}

.converter-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #f0f0f0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    letter-spacing: -0.5px;
}

.converter-subtitle {
    font-size: 1rem;
    line-height: 1.6;
    color: #b0b0b0;
    opacity: 0.9;
}

/* ===== CONVERTER SECTION ===== */
.converter-section {
    flex: 1;
    padding: 40px 20px;
}

.converter-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 968px) {
    .converter-container {
        grid-template-columns: 1fr;
    }
}

/* ===== NEUMORPHIC PANELS ===== */
.converter-control,
.results-panel {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.05),
        inset 0 -1px 2px rgba(0, 0, 0, 0.3),
        0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #f0f0f0;
    letter-spacing: -0.3px;
}

/* ===== UPLOAD ZONE ===== */
.upload-zone {
    border: 2px dashed rgba(39, 197, 161, 0.3);
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(39, 197, 161, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    margin-bottom: 20px;
}

.upload-zone:hover {
    border-color: rgba(39, 197, 161, 0.6);
    background: rgba(39, 197, 161, 0.08);
}

.upload-zone.dragover {
    border-color: #27c5a1;
    background: rgba(39, 197, 161, 0.15);
    transform: scale(1.02);
}

.upload-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
    color: #27c5a1;
    opacity: 0.8;
}

.upload-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.upload-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.upload-main {
    font-size: 1rem;
    font-weight: 500;
    color: #e0e0e0;
    margin: 0;
}

.upload-sub {
    font-size: 0.85rem;
    color: #a0a0a0;
    margin: 0;
}

/* ===== FILE INFO ===== */
.file-info {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    background: rgba(39, 197, 161, 0.08);
    border: 1px solid rgba(39, 197, 161, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    gap: 10px;
}

.file-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #e0e0e0;
    word-break: break-all;
}

.file-size {
    font-size: 0.8rem;
    color: #a0a0a0;
}

.btn-clear {
    background: rgba(255, 100, 100, 0.15);
    border: 1px solid rgba(255, 100, 100, 0.3);
    color: #ff6464;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-clear:hover {
    background: rgba(255, 100, 100, 0.25);
    border-color: rgba(255, 100, 100, 0.5);
}

/* ===== PREVIEW CONTAINER ===== */
.preview-container {
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    overflow: hidden;
}

.preview-image {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    border-radius: 6px;
}

.preview-dims {
    font-size: 0.8rem;
    color: #a0a0a0;
    margin-top: 10px;
    text-align: center;
}

/* ===== MODE SELECTOR ===== */
.mode-selector {
    margin-bottom: 25px;
}

.mode-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #c0c0c0;
    margin-bottom: 12px;
}

.mode-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mode-btn {
    background: rgba(39, 197, 161, 0.1);
    border: 1px solid rgba(39, 197, 161, 0.2);
    color: #b0b0b0;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.mode-btn:hover {
    border-color: rgba(39, 197, 161, 0.4);
    background: rgba(39, 197, 161, 0.15);
    color: #e0e0e0;
}

.mode-btn.active {
    background: linear-gradient(135deg, rgba(39, 197, 161, 0.3), rgba(61, 217, 181, 0.2));
    border-color: #27c5a1;
    color: #27c5a1;
}

.mode-btn svg {
    width: 20px;
    height: 20px;
}

/* ===== OPERATION OPTIONS ===== */
.operation-options {
    background: rgba(39, 197, 161, 0.05);
    border: 1px solid rgba(39, 197, 161, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.option-group {
    margin-bottom: 20px;
}

.option-group:last-child {
    margin-bottom: 0;
}

.option-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #c0c0c0;
    margin-bottom: 10px;
}

/* ===== FORMAT GRID ===== */
.format-grid,
.preset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 480px) {
    .format-grid,
    .preset-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.format-btn,
.preset-btn {
    background: rgba(39, 197, 161, 0.1);
    border: 1px solid rgba(39, 197, 161, 0.2);
    color: #b0b0b0;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.format-btn:hover,
.preset-btn:hover {
    border-color: rgba(39, 197, 161, 0.4);
    background: rgba(39, 197, 161, 0.15);
    color: #e0e0e0;
}

.format-btn.active,
.preset-btn.active {
    background: linear-gradient(135deg, rgba(39, 197, 161, 0.35), rgba(61, 217, 181, 0.25));
    border-color: #27c5a1;
    color: #27c5a1;
}

/* ===== QUALITY CONTROL ===== */
.quality-control {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quality-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(39, 197, 161, 0.15);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #27c5a1 0%, #3dd9b5 100%);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(39, 197, 161, 0.4);
}

.quality-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(39, 197, 161, 0.6);
}

.quality-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #27c5a1 0%, #3dd9b5 100%);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(39, 197, 161, 0.4);
}

.quality-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(39, 197, 161, 0.6);
}

.quality-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #27c5a1;
    min-width: 40px;
    text-align: right;
}

/* ===== RESIZE CONTROLS ===== */
.resize-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resize-input {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.resize-input label {
    font-size: 0.85rem;
    color: #a0a0a0;
    font-weight: 500;
}

.resize-input input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(39, 197, 161, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    color: #e0e0e0;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.resize-input input:focus {
    outline: none;
    border-color: #27c5a1;
    background: rgba(39, 197, 161, 0.08);
}

.preserve-aspect {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #b0b0b0;
    cursor: pointer;
    margin-top: 5px;
}

.preserve-aspect input {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #27c5a1;
}

/* ===== BUTTONS ===== */
.btn-primary,
.btn-download {
    background: linear-gradient(135deg, #27c5a1 0%, #1a9a7f 100%);
    border: none;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(39, 197, 161, 0.35);
}

.btn-primary:hover,
.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 197, 161, 0.5);
}

.btn-primary:active,
.btn-download:active {
    transform: translateY(0);
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.btn-download svg {
    width: 20px;
    height: 20px;
}

/* ===== PROGRESS CONTAINER ===== */
.progress-container {
    background: rgba(39, 197, 161, 0.1);
    border: 1px solid rgba(39, 197, 161, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.progress-bar {
    height: 8px;
    background: rgba(39, 197, 161, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #27c5a1 0%, #3dd9b5 100%);
    width: 30%;
    border-radius: 4px;
    animation: progressPulse 1.5s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { width: 30%; }
    50% { width: 70%; }
}

.progress-text {
    font-size: 0.9rem;
    color: #a0a0a0;
    margin: 0;
    text-align: center;
}

/* ===== RESULTS PANEL ===== */
.results-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #808080;
}

.placeholder-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    opacity: 0.4;
}

.placeholder-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.results-placeholder p {
    margin: 0;
    font-size: 0.95rem;
}

/* ===== METADATA SECTION ===== */
.metadata-section,
.results-section,
.error-section {
    margin-bottom: 25px;
}

.metadata-section:last-child,
.results-section:last-child {
    margin-bottom: 0;
}

.metadata-title,
.results-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f0f0f0;
    margin-bottom: 15px;
}

.metadata-grid,
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.metadata-item,
.info-item {
    background: rgba(39, 197, 161, 0.08);
    border: 1px solid rgba(39, 197, 161, 0.15);
    border-radius: 8px;
    padding: 12px;
}

.meta-label,
.info-label {
    display: block;
    font-size: 0.8rem;
    color: #808080;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value,
.info-value {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #27c5a1;
    word-break: break-word;
}

/* ===== COMPARISON GRID ===== */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.comparison-item {
    background: rgba(39, 197, 161, 0.08);
    border: 1px solid rgba(39, 197, 161, 0.15);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.comparison-label {
    font-size: 0.8rem;
    color: #808080;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-stat {
    font-size: 1.3rem;
    font-weight: 700;
    color: #27c5a1;
}

.comparison-separator {
    font-size: 1.5rem;
    color: #808080;
    text-align: center;
}

/* ===== SAVINGS CARD ===== */
.savings-card {
    background: rgba(39, 197, 161, 0.15);
    border: 1px solid rgba(39, 197, 161, 0.25);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.savings-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.savings-label {
    font-size: 0.85rem;
    color: #a0a0a0;
    font-weight: 500;
}

.savings-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #27c5a1;
}

/* ===== DOWNLOAD SECTION ===== */
.download-section {
    margin-bottom: 20px;
}

/* ===== OUTPUT INFO ===== */
.output-info {
    background: rgba(100, 200, 255, 0.05);
    border: 1px solid rgba(100, 200, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
}

.output-info .info-grid {
    margin: 0;
}

/* ===== ERROR SECTION ===== */
.error-section {
    background: rgba(255, 100, 100, 0.1);
    border: 1px solid rgba(255, 100, 100, 0.2);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.error-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
    color: #ff6464;
}

.error-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.error-message {
    font-size: 0.95rem;
    color: #ff8080;
    margin: 0;
}

/* ===== FEATURES SECTION ===== */
.features-section {
    padding: 60px 20px;
    background: linear-gradient(180deg, rgba(100, 200, 255, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
}

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

.features-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: #f0f0f0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 200, 255, 0.15);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(100, 200, 255, 0.3);
    background: rgba(100, 200, 255, 0.1);
}

.feature-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    color: #64c8ff;
}

.feature-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #e0e0e0;
}

.feature-card p {
    font-size: 0.95rem;
    color: #a0a0a0;
    margin: 0;
    line-height: 1.5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .converter-hero {
        padding: 4rem 1.5rem 3rem;
        min-height: 35vh;
    }

    .converter-title {
        font-size: clamp(1.5rem, 3vw, 2rem);
    }

    .converter-container {
        gap: 20px;
    }

    .converter-control,
    .results-panel {
        padding: 20px;
    }

    .panel-title {
        font-size: 1.2rem;
    }

    .upload-zone {
        min-height: 120px;
        padding: 20px;
    }

    .mode-buttons {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .comparison-separator {
        text-align: center;
        transform: rotate(90deg);
    }

    .savings-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
