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

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 1200px;
}

.title {
    text-align: center;
    color: white;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.title i {
    background: linear-gradient(135deg, #037CFB 0%, #4DB6FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Editor Wrapper */
.editor-wrapper {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Toolbar */
.toolbar {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.language-select {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.toolbar-btn {
    background: rgba(3, 124, 251, 0.2);
    color: #4DB6FF;
    border: 1px solid #037CFB;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toolbar-btn:hover {
    background: rgba(3, 124, 251, 0.3);
    transform: translateY(-2px);
}

.theme-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.theme-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn i {
    font-size: 1rem;
}

.theme-btn[data-theme="vscode"] i {
    color: #007ACC;
}

.theme-btn[data-theme="monokai"] i {
    color: #F92672;
}

.theme-btn[data-theme="dracula"] i {
    color: #BD93F9;
}

.theme-btn:hover,
.theme-btn.active {
    border-color: currentColor;
    transform: scale(1.1);
}

/* Editor Container */
.editor-container {
    display: flex;
    min-height: 500px;
    max-height: 600px;
    overflow: hidden;
}

.line-numbers {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 0.5rem;
    text-align: right;
    user-select: none;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    overflow-y: hidden;
    min-width: 3.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.line-number {
    line-height: 1.6;
    padding: 0 0.5rem;
}

.code-area {
    flex: 1;
    position: relative;
    overflow: auto;
}

.code-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    background: transparent;
    color: transparent;
    caret-color: white;
    border: none;
    outline: none;
    resize: none;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
    z-index: 2;
}

.code-highlight {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    margin: 0;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
    pointer-events: none;
    z-index: 1;
    color: #D4D4D4;
}

.code-highlight code {
    display: block;
    color: #D4D4D4;
}

/* Status Bar */
.status-bar {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    flex-wrap: wrap;
    gap: 1rem;
}

.status-left,
.status-right {
    display: flex;
    gap: 1.5rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-item i {
    color: #4DB6FF;
}

/* Examples */
.examples {
    margin-top: 2rem;
    text-align: center;
}

.examples h3 {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.example-btn {
    background: linear-gradient(135deg, rgba(3, 124, 251, 0.2) 0%, rgba(77, 182, 255, 0.2) 100%);
    border: 1px solid rgba(77, 182, 255, 0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.example-btn:hover {
    background: linear-gradient(135deg, rgba(3, 124, 251, 0.3) 0%, rgba(77, 182, 255, 0.3) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(77, 182, 255, 0.3);
}

/* Syntax Highlighting Themes */

/* VS Code Dark (Default) */
.editor-container[data-theme="vscode"] .keyword { color: #569CD6; }
.editor-container[data-theme="vscode"] .string { color: #CE9178; }
.editor-container[data-theme="vscode"] .comment { color: #6A9955; font-style: italic; }
.editor-container[data-theme="vscode"] .number { color: #B5CEA8; }
.editor-container[data-theme="vscode"] .function { color: #DCDCAA; }
.editor-container[data-theme="vscode"] .operator { color: #D4D4D4; }
.editor-container[data-theme="vscode"] .tag { color: #569CD6; }
.editor-container[data-theme="vscode"] .attribute { color: #9CDCFE; }
.editor-container[data-theme="vscode"] .value { color: #CE9178; }
.editor-container[data-theme="vscode"] .selector { color: #D7BA7D; }
.editor-container[data-theme="vscode"] .property { color: #9CDCFE; }
.editor-container[data-theme="vscode"] .builtin { color: #4EC9B0; }

/* Monokai */
.editor-container[data-theme="monokai"] { background: #272822; }
.editor-container[data-theme="monokai"] .keyword { color: #F92672; }
.editor-container[data-theme="monokai"] .string { color: #E6DB74; }
.editor-container[data-theme="monokai"] .comment { color: #75715E; font-style: italic; }
.editor-container[data-theme="monokai"] .number { color: #AE81FF; }
.editor-container[data-theme="monokai"] .function { color: #A6E22E; }
.editor-container[data-theme="monokai"] .operator { color: #F92672; }
.editor-container[data-theme="monokai"] .tag { color: #F92672; }
.editor-container[data-theme="monokai"] .attribute { color: #A6E22E; }
.editor-container[data-theme="monokai"] .value { color: #E6DB74; }
.editor-container[data-theme="monokai"] .selector { color: #A6E22E; }
.editor-container[data-theme="monokai"] .property { color: #66D9EF; }
.editor-container[data-theme="monokai"] .builtin { color: #66D9EF; }

/* Dracula */
.editor-container[data-theme="dracula"] { background: #282A36; }
.editor-container[data-theme="dracula"] .keyword { color: #FF79C6; }
.editor-container[data-theme="dracula"] .string { color: #F1FA8C; }
.editor-container[data-theme="dracula"] .comment { color: #6272A4; font-style: italic; }
.editor-container[data-theme="dracula"] .number { color: #BD93F9; }
.editor-container[data-theme="dracula"] .function { color: #50FA7B; }
.editor-container[data-theme="dracula"] .operator { color: #FF79C6; }
.editor-container[data-theme="dracula"] .tag { color: #FF79C6; }
.editor-container[data-theme="dracula"] .attribute { color: #50FA7B; }
.editor-container[data-theme="dracula"] .value { color: #F1FA8C; }
.editor-container[data-theme="dracula"] .selector { color: #50FA7B; }
.editor-container[data-theme="dracula"] .property { color: #8BE9FD; }
.editor-container[data-theme="dracula"] .builtin { color: #8BE9FD; }

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .title {
        font-size: 1.8rem;
    }

    .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .editor-container {
        min-height: 400px;
    }

    .status-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Copy notification */
@keyframes fadeInOut {
    0%, 100% { opacity: 0; transform: translateY(-10px); }
    10%, 90% { opacity: 1; transform: translateY(0); }
}

.copy-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #037CFB 0%, #4DB6FF 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(3, 124, 251, 0.3);
    animation: fadeInOut 2s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
