:root {
    --bg-dark: #121212;
    --card-bg: #1e1e1e;
    --primary: #EB5757;
    --primary-hover: #d94a4a;
    --danger: #cf3030;
    --danger-hover: #b02424;
    --text-main: #f1f1f1;
    --text-muted: #a0a0a0;
    --border: #333;
    --radius: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 50px;
}

a {
    color: var(--primary);
}

a.hover {
    color: var(--primary-hover);
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #444; }

#app {
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    animation: fadeIn 0.5s ease-out;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.logo a {
    display: block;
    height: 40px;
    text-decoration: none;
}

.logo img {
    height: 100%;
    width: auto;
    pointer-events: none; 
}

.card {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
}

.controls-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.toggle-label {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.toggle-label input {
    margin-right: 8px;
    accent-color: var(--primary);
    cursor: pointer;
}

.editor-wrapper, .code-view {
    display: flex;
    position: relative;
    background: #0a0a0a;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden; 
    height: 60vh; 
    min-height: 400px;
}

.editor-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(235, 87, 87, 0.2);
}

.line-numbers, textarea, .code-content {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    line-height: 24px;    
    padding-top: 10px;    
    padding-bottom: 10px; 
}

.line-numbers {
    background: #121212;
    color: #555;
    padding-left: 12px;
    padding-right: 12px;
    text-align: right;
    border-right: 1px solid var(--border);
    user-select: none;
    min-width: 48px;
    box-sizing: border-box;
    overflow: hidden; 
}

.line-numbers div {
    height: 24px; 
}

.line-numbers.hidden {
    display: none;
}

textarea, .code-content {
    flex: 1;
    border: none;
    color: var(--text-main);
    padding-left: 16px;
    padding-right: 16px;
    resize: none;
    outline: none;
    white-space: pre;
    box-sizing: border-box;
    width: 100%;
    overflow-y: scroll; 
    height: 100%;
    background-color: transparent;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0px,                
        transparent 24px,               
        rgba(255, 255, 255, 0.04) 24px, 
        rgba(255, 255, 255, 0.04) 48px  
    );
    background-attachment: local; 
    background-position: 0 10px;  
}

textarea.no-stripes, .code-content.no-stripes {
    background-image: none !important;
}

.code-content {
    overflow: auto; 
}

.link-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: #0a0a0a;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    align-items: center;
}

.link-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--primary);
    padding: 0 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    outline: none;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.1s, background 0.2s;
    color: white;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}
.btn:active { transform: scale(0.98); }

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
}

.primary { background: var(--primary); }
.primary:hover { background: var(--primary-hover); }

.secondary { background: #333; margin-top: 0; }
.secondary:hover { background: #444; }

.btn-full { width: 100%; margin-top: 15px; }

.meta-info {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
}

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

@media (max-width: 600px) {
    #app { padding: 10px; width: 100%; }
    .card { padding: 15px; }
    textarea { font-size: 14px; }
}