:root {
    --bg-dark: #0f0f12;
    --bg-panel: #18181b;
    --bg-editor: #1e1e24;
    --border: #2a2a30;
    --accent: #6c5ce7;
    --text-main: #e2e2e7;
    --text-dim: #8b8b95;
    --html-color: #ff6b6b;
    --css-color: #48dbfb;
    --js-color: #feca57;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

header {
    background-color: var(--bg-panel);
    padding: 0 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon {
    font-size: 24px;
    background: linear-gradient(135deg, #a55eea, #45aaf2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.ver {
    color: var(--accent);
    font-size: 12px;
    background: rgba(108, 92, 231, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 5px;
    border: 1px solid rgba(108, 92, 231, 0.2);
}

.status-badge {
    font-size: 12px;
    color: #2ed573;
    background: rgba(46, 213, 115, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-badge::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background-color: #2ed573;
    border-radius: 50%;
    box-shadow: 0 0 8px #2ed573;
}


.main {
    display: flex;
    flex: 1;
    height: calc(100vh - 60px);
}

.editors{
    width: 40%;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    background-color: var(--bg-panel);
}

.editor-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--border);
    position: relative;
    transition: background-color 0.2s;
}

.editor-box:last-child {
    border-bottom: none;
}


.html-box { border-left: 3px solid var(--html-color); }
.css-box { border-left: 3px solid var(--css-color); }
.js-box { border-left: 3px solid var(--js-color); }


.editor-header {
    background-color: var(--bg-panel);
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    user-select: none;
}

.lang-icon {
    font-family: 'Fira Code', monospace;
    font-weight: bold;
}
.html-icon { color: var(--html-color); }
.css-icon { color: var(--css-color); }
.js-icon { color: var(--js-color); }


textarea {
    flex: 1;
    width: 100%;
    background-color: var(--bg-editor);
    color: #dcdcdc;
    border: none;
    resize: none;
    padding: 15px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    outline: none;
}

textarea::placeholder {
    color: rgba(255,255,255,0.2);
}


.editor-box:focus-within .editor-header {
    background-color: rgba(255,255,255,0.03);
    color: white;
}


#html-code { color: #ffe3e3; }
#css-code { color: #e3faff; }
#js-code { color: #fff9e3; }


.preview-container {
    flex: 1;
    background-color: white;
    position: relative;
    display: flex;
    flex-direction: column;
}

.preview-toolbar {
    height: 36px;
    background-color: #f0f0f4;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.red { background-color: #ff5f56; border: 1px solid #e0443e; }
.yellow { background-color: #ffbd2e; border: 1px solid #dea123; }
.green { background-color: #27c93f; border: 1px solid #1aab29; }

.address-bar {
    margin-left: 10px;
    background: white;
    padding: 2px 12px;
    border-radius: 4px;
    font-size: 11px;
    color: #888;
    flex: 1;
    text-align: center;
    border: 1px solid #e0e0e0;
    font-family: sans-serif;
}

iframe {
    flex: 1;
    width: 100%;
    border: none;
    display: block;
}


::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-editor);
}
::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-radius: 5px;
    border: 2px solid var(--bg-editor);
}
::-webkit-scrollbar-thumb:hover {
    background: #52525b;
}