/* Code Minifier Styles */

.minifier-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.minifier-header {
    text-align: center;
    margin-bottom: 2rem;
}

.minifier-header h1 {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.minifier-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab:hover {
    border-color: var(--primary);
}

.tab.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: transparent;
}

/* Main Section */
.minifier-main {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.input-section,
.output-section {
    margin-bottom: 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.section-header label {
    color: var(--text-light);
    font-weight: 500;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.375rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.minifier-main textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    resize: vertical;
    box-sizing: border-box;
}

.minifier-main textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.minifier-main textarea[readonly] {
    background: rgba(88, 101, 242, 0.05);
}

/* Controls */
.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.minify-btn,
.beautify-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.minify-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.minify-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

.beautify-btn {
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    color: var(--text-light);
}

.beautify-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Stats */
.stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    color: var(--text-light);
}

.stat.savings .stat-value {
    color: #10b981;
}

/* Options Panel */
.options-panel {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.options-panel h3 {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 1rem;
}

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

.option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
}

.option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    max-width: calc(100% - 2rem);
    text-align: center;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

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

    .minifier-header h1 {
        font-size: 2rem;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab {
        flex: 1 1 calc(33.333% - 0.5rem);
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .minifier-main {
        padding: 1rem;
    }

    .minifier-main textarea {
        min-height: 150px;
    }

    .controls {
        flex-direction: column;
    }

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

    .stats {
        gap: 1rem;
        flex-wrap: wrap;
    }

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

@media (max-width: 480px) {
    .minifier-header h1 {
        font-size: 1.75rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .actions {
        width: 100%;
    }

    .action-btn {
        flex: 1;
    }
}
