* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #fff, #4facfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.language-select {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-select:hover {
    background: rgba(255, 255, 255, 0.3);
}

.language-select option {
    background: #2a5298;
}

.format-options {
    display: flex;
    gap: 20px;
    align-items: center;
}

.format-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.format-options input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.format-options input[type="number"] {
    width: 60px;
    padding: 5px 10px;
    border-radius: 5px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-align: center;
}

.editor-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.editor-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.editor-section h3 {
    margin-bottom: 15px;
    font-size: 1.2em;
    opacity: 0.9;
}

#input-code {
    width: 100%;
    min-height: 400px;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    resize: vertical;
    outline: none;
}

#input-code::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#output-container {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 15px;
    min-height: 400px;
    overflow: auto;
}

#output-container pre {
    margin: 0;
    background: transparent !important;
}

#output-container code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    padding: 0 10px;
}

.format-btn, .copy-btn, .clear-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.format-btn {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    color: #fff;
}

.format-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

.copy-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.copy-btn.copied {
    background: #4caf50;
}

.clear-btn {
    background: rgba(255, 59, 48, 0.2);
    color: #ff3b30;
}

.clear-btn:hover {
    background: rgba(255, 59, 48, 0.3);
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 25px;
    border-radius: 10px;
    text-align: center;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
    margin-right: 8px;
}

.stat-item span:last-child {
    font-size: 18px;
    font-weight: bold;
}

.features {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
}

.features h3 {
    margin-bottom: 15px;
    font-size: 1.3em;
}

.features ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.features li {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 15px;
}

@media (max-width: 968px) {
    .editor-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .button-container {
        flex-direction: row;
        justify-content: center;
        padding: 0;
    }
    
    header h1 {
        font-size: 2em;
    }
}