:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --background: #0a0c0e;
    --surface: #161819;
    --surface-hover: #1d1f20;
    --border: #2a2d30;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --gradient-start: #0a0c0e;
    --gradient-end: #141618;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 20%),
        linear-gradient(to bottom right, var(--gradient-start), var(--gradient-end));
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2.5rem;
    animation: fadeIn 0.4s ease-out;
}

h1 {
    text-align: center;
    color: var(--text-primary);
    font-size: 2.25rem;
    margin-bottom: 3.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

h1 svg {
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.2));
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.editor-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.01em;
}

.language-selector {
    position: relative;
    width: 220px;
}

#language-select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    background-color: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.language-selector::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    pointer-events: none;
}

#code-input {
    width: 100%;
    min-height: 400px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.button-group {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

button {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

button:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 8px -1px rgba(0, 0, 0, 0.15),
        0 3px 6px -1px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

button:active {
    transform: translateY(0);
    background: rgba(59, 130, 246, 0.15);
    box-shadow: 
        0 2px 4px -1px rgba(0, 0, 0, 0.1),
        0 1px 2px -1px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}


button svg {
    vertical-align: middle;
    margin-right: 6px;
}

#result-container {
    margin-top: 2rem;
    padding: 1.75rem;
    background-color: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.share-info p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.url-group {
    display: flex;
    gap: 12px;
}

#share-url {
    flex: 1;
    padding: 12px 16px;
    background-color: rgba(31, 41, 55, 0.5);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
}

.language-txt {
    color: var(--text-primary);
    white-space: pre-wrap;
    font-family: 'JetBrains Mono', monospace;
}

pre code.language-txt {
    color: var(--text-primary);
}

#view-container {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.code-preview {
    position: relative;
}

.code-preview h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.code-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 1.25rem;
}

#view-container pre {
    margin: 0;
    padding: 1.5rem;
    background-color: rgba(31, 41, 55, 0.5);
    border-radius: 10px;
    border: 1px solid var(--border);
    overflow-x: auto;
}

.language-info {
    margin-top: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Focus states */
#language-select:focus,
#code-input:focus,
#share-url:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 6px;
    border: 3px solid rgba(31, 41, 55, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.75rem;
        margin-bottom: 2.5rem;
    }
    
    .editor-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .language-selector {
        width: 100%;
    }
    
    .url-group {
        flex-direction: column;
    }
    
    button {
        width: 100%;
        justify-content: center;
    }
    
    #view-container {
        padding: 1.5rem;
    }
}

/* Syntax Highlighting Theme Overrides */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #636f88;
}

.token.punctuation {
    color: #81a1c1;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
    color: #81a1c1;
}

.token.number {
    color: #b48ead;
}

.token.boolean {
    color: #81a1c1;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #a3be8c;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #81a1c1;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #81a1c1;
}

.language-json .token.property {
    color: #79c0ff;
}

.language-json .token.string {
    color: #a5d6ff;
}

.language-json .token.number {
    color: #79c0ff;
}

.language-json .token.boolean {
    color: #ff7b72;
}

.language-json .token.null {
    color: #ff7b72;
}

.token.function,
.token.class-name {
    color: #88c0d0;
}

.token.regex,
.token.important,
.token.variable {
    color: #d08770;
}
