:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #f8f9fa;
    --text-color: #2b2d42;
    --light-text: #6c757d;
    --border-color: #e9ecef;
    --success-color: #4cc9f0;
    --error-color: #f72585;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f1f5fe;
    min-height: 100vh;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.app-header {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem 2rem;
}

h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 400;
}

.toolbar {
    display: flex;
    gap: 0.8rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.btn {
    padding: 0.7rem 1.2rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-icon {
    width: 18px;
    height: 18px;
}

.editor-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border-color);
    height: 440px;
}

@media (max-width: 768px) {
    .editor-container {
        grid-template-columns: 1fr;
    }
}

.editor-column {
    background: white;
    display: flex;
    flex-direction: column;
}

.editor-header {
    padding: 0.8rem 1rem;
    background: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-label {
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--light-text);
}

.char-count {
    font-size: 0.8rem;
    color: var(--light-text);
}

textarea {
    flex: 1;
    padding: 1rem;
    border: none;
    resize: none;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-color);
    background: white;
}

textarea:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--primary-color);
}

#minifiedCode {
    background: #f8fafc;
}

.stats-container {
    padding: 1.5rem 2rem;
    background: var(--secondary-color);
    border-top: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: white;
    padding: 1.2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--light-text);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.stat-diff {
    font-size: 0.9rem;
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.positive {
    color: var(--success-color);
}

.negative {
    color: var(--error-color);
}

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}