:root {
    --surface: #ffffff;
    --surface-muted: #f4f6fb;
    --border: #e3e8f2;
    --text-main: #1c2333;
    --text-muted: #5f6b85;
    --primary: #f39c12;
    --primary-dark: #e67e22;
    --accent: #36cfc9;
    --success: #2ecc71;
    --error: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.08);
    --shadow-medium: 0 10px 25px rgba(15, 23, 42, 0.1);
    --gradient: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

/* Playground Interface */
.playground-interface {
    margin-bottom: 3rem;
}

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

/* Panel Styles */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: background 0.3s ease, border 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-muted);
    gap: 16px;
    flex-wrap: wrap;
}

.panel-title-group {
    flex: 1;
    min-width: 200px;
}

.panel-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 4px 0;
}

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

.panel-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Editor Styles */
.editor-panel {
    min-height: 500px;
}

.editor-wrapper {
    flex: 1;
    position: relative;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface-muted);
    min-height: 400px;
    overflow: hidden;
}

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

.editor-footer {
    padding: 16px 24px;
    background: var(--surface-muted);
    border-top: 1px solid var(--border);
}

/* Console Styles */
.console-panel {
    min-height: 500px;
}

.console-container {
    flex: 1;
    padding: 20px;
    background: #1e1e1e;
    color: #d4d4d4;
    
    font-size: 13px;
    line-height: 1.6;
    overflow-y: auto;
    min-height: 400px;
    max-height: 500px;
}

.console-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    text-align: center;
    color: var(--text-muted);
}

.console-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
    color: #5f6b85;
}

.console-placeholder p {
    font-size: 14px;
    margin: 0;
    color: #5f6b85;
}

.console-line {
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    word-wrap: break-word;
    word-break: break-word;
}

.console-prompt {
    color: #4CAF50;
    font-weight: 600;
    flex-shrink: 0;
}

.console-message {
    flex: 1;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.console-message.log {
    color: #d4d4d4;
}

.console-message.error {
    color: #f44336;
}

.console-message.warn {
    color: #ff9800;
}

.console-message.info {
    color: #2196F3;
}

/* Output Section */
.output-section {
    margin-top: 0;
}

.output-panel {
    min-height: 300px;
}

.output-container {
    flex: 1;
    padding: 20px;
    background: var(--surface-muted);
    min-height: 250px;
    max-height: 400px;
    overflow-y: auto;
    border-top: 1px solid var(--border);
}

.output-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 210px;
    text-align: center;
    color: var(--text-muted);
}

.output-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.output-placeholder p {
    font-size: 14px;
    margin: 0;
}

.output-content {
    color: var(--text-main);
    line-height: 1.6;
}

/* Button Styles */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    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);
    position: relative;
}

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

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

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    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;
}

.btn-text {
    display: inline-block;
}

.shortcut-hint {
    margin-left: 8px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    
}

/* 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);
}

/* Scrollbar Styling */
.console-container::-webkit-scrollbar,
.output-container::-webkit-scrollbar {
    width: 8px;
}

.console-container::-webkit-scrollbar-track,
.output-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.console-container::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

.console-container::-webkit-scrollbar-thumb:hover {
    background: #5f6b85;
}

.output-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.output-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* 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;
}

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

    .editor-panel,
    .console-panel {
        min-height: 400px;
    }

    .editor-wrapper,
    .ace-editor {
        min-height: 350px;
    }

    .console-container {
        min-height: 350px;
        max-height: 400px;
    }
}

@media (max-width: 767px) {
    .panel-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .panel-actions {
        width: 100%;
        justify-content: flex-end;
    }

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

    .panel-subtitle {
        font-size: 12px;
    }

    .editor-panel,
    .console-panel {
        min-height: 350px;
    }

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

    .console-container {
        min-height: 300px;
        max-height: 350px;
    }

    .output-container {
        min-height: 200px;
        max-height: 300px;
    }

    .btn-action .btn-text {
        display: none;
    }

    .btn-action {
        padding: 10px;
        min-width: 40px;
    }

    .btn-primary {
        width: 100%;
        padding: 16px 24px;
    }

    .shortcut-hint {
        display: none;
    }
}

@media (max-width: 480px) {
    .playground-wrapper {
        gap: 16px;
    }

    .panel {
        border-radius: 16px;
    }

    .panel-header {
        padding: 16px;
    }

    .editor-footer {
        padding: 12px 16px;
    }

    .console-container,
    .output-container {
        padding: 16px;
    }
}

