.formatter-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: auto;
    padding: 2rem 0 3rem 0;
}

.formatter-tool {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.15);
    overflow: hidden;
    position: relative;
}

.formatter-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.formatter-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.formatter-header p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.formatter-content {
    padding: 2rem;
    background: #ffffff;
    position: relative;
    z-index: 1;
}

.formatter-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-group {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.option-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    display: block;
}

.option-group select,
.option-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.format-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.code-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.code-input-group {
    display: flex;
    flex-direction: column;
}

.code-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-textarea {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s;
    background: #ffffff;
    color: #333333;
}

.code-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.code-textarea.output {
    background: #f8f9fa;
}

.code-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.code-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.code-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.25);
}

.code-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.code-stat {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-label {
    opacity: 0.9;
    font-size: 0.9rem;
}

.formatter-history {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.formatter-history h3 {
    margin-top: 0;
    color: #333;
}

.history-item {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid #667eea;
}

.history-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.presets {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.preset-btn {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin: 0.25rem;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.preset-btn:hover {
    background: #667eea;
    color: white;
}

@media (max-width: 768px) {
    .code-section {
        grid-template-columns: 1fr;
    }
    
    .code-actions {
        flex-direction: column;
    }
    
    .code-btn {
        width: 100%;
        justify-content: center;
    }
}
