:root {
    --surface: #ffffff;
    --surface-muted: #f4f6fb;
    --border: #e3e8f2;
    --text-main: #1c2333;
    --text-muted: #5f6b85;
    --primary: #f39c12;
    --primary-dark: #e67e22;
    --accent: #36cfc9;
    --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.08);
    --gradient: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

/* Beautifier Interface */
.beautifier-interface {
    margin-bottom: 3rem;
}

.tool-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    padding: 32px;
    transition: background 0.3s ease, border 0.3s ease;
}

.panel-head {
    margin-bottom: 24px;
}

.panel-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.panel-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* Editor Styles */
.editor-wrapper {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-muted);
    min-height: 400px;
}

.ace-editor {
    width: 100%;
    min-height: 400px;
}

.editor-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-action:hover {
    background: rgba(243, 156, 18, 0.08);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-action i {
    font-size: 14px;
}

/* Options Panel */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    font-size: 15px;
}

.option-label span {
    user-select: none;
}

.option-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-main);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.option-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

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

.option-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    padding-left: 0;
}

.radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-main);
}

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

.radio-label span {
    user-select: none;
}

.btn-primary {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    border-radius: 12px;
    border: none;
    background: var(--gradient);
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 50px rgba(243, 156, 18, 0.25);
}

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

/* Output Panel */
.output-panel {
    margin-top: 24px;
}

.output-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

/* Content Section */
.content-section {
    margin-top: 3rem;
    padding-top: 2rem;
}

.content-block h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    margin-top: 32px;
}

.content-block h2:first-child {
    margin-top: 0;
}

.content-block h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 24px;
    margin-bottom: 12px;
}

.content-block p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.content-block ul {
    margin-bottom: 20px;
    padding-left: 24px;
}

.content-block li {
    margin-bottom: 10px;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 16px;
}

.content-block li strong {
    color: var(--text-main);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .tool-wrapper {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 767px) {
    .panel {
        padding: 24px;
    }

    .panel-title {
        font-size: 20px;
    }

    .editor-wrapper {
        min-height: 300px;
    }

    .ace-editor {
        min-height: 300px;
    }

    .option-desc {
        padding-left: 0;
    }

    .editor-actions,
    .output-actions {
        flex-direction: column;
    }

    .btn-action {
        width: 100%;
    }

    .radio-group {
        flex-direction: column;
        gap: 12px;
    }
}

/* Custom ACE Editor Theme Adjustments */
.ace-xcode .ace_content .ace_variable {
    color: #2d5ada;
}

.ace-xcode .ace_content .ace_string {
    color: #cc5b5c;
}

.ace-xcode .ace_content .ace_constant.ace_numeric {
    color: #008100;
}

.ace-xcode .ace_content .ace_boolean {
    color: #0b7500;
}

.ace-xcode .ace_content .ace_keyword {
    color: #a300b5;
}

.ace-xcode .ace_content .ace_function {
    color: #0000a2;
}

.ace-xcode {
    background: #ffffff;
}

.ace-xcode .ace_gutter {
    background: #f8f9fa;
    color: #6c757d;
}

.ace-github {
    background: #ffffff;
}

.ace-github .ace_gutter {
    background: #f6f8fa;
    color: #6e7681;
}

