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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0a0e27;
    min-height: 100vh;
    padding: 30px 20px;
    color: #e8e8e8;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
}

header {
    margin-bottom: 35px;
}

h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.8em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.1em;
    color: #94a3b8;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.main-content {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 25px;
    height: calc(100vh - 180px);
    min-height: 500px;
}

.input-section,
.output-section {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

label {
    display: block;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 12px;
    font-size: 0.95em;
    letter-spacing: -0.01em;
}

textarea {
    flex: 1;
    width: 100%;
    padding: 18px;
    font-size: 15px;
    border: 1.5px solid #1e293b;
    border-radius: 8px;
    resize: none;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    background: #0f172a;
    color: #f1f5f9;
    overflow-y: auto;
    min-height: 0;
    line-height: 1.6;
}

textarea::placeholder {
    color: #475569;
}

textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: #131b2e;
}

#output-container {
    flex: 1;
    border: 1.5px solid #1e293b;
    border-radius: 8px;
    padding: 8px;
    overflow-y: auto;
    background: #0f172a;
    min-height: 0;
}

.category-section {
    margin-bottom: 12px;
    padding: 6px 6px 12px 6px;
}

.category-header {
    color: #94a3b8;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 8px 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(52,65,85,0.14);
}

#output-container::-webkit-scrollbar {
    width: 8px;
}

#output-container::-webkit-scrollbar-track {
    background: transparent;
}

#output-container::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

#output-container::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

.output-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 6px;
    background: transparent;
    margin-bottom: 2px;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.output-item:hover {
    background: #1e293b;
    border-color: #334155;
}

.style-label {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    letter-spacing: 0.03em;
    text-transform: lowercase;
}

.style-text {
    font-size: 18px;
    word-wrap: break-word;
    line-height: 1.4;
    color: #f8fafc;
    -webkit-user-select: text;
    user-select: text;
    font-family: 'Noto Sans Symbols 2', 'Segoe UI Symbol', 'Apple Symbols', sans-serif;
    font-feature-settings: normal;
}

.copy-btn {
    padding: 7px 14px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 5px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

.copy-btn:hover {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

.copy-btn:active {
    transform: scale(0.97);
}

.copy-btn.copied {
    background: #065f46;
    border-color: #475569;
    color: #6ee7b7;
}

/* Responsive design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        height: auto;
    }

    .input-section textarea {
        min-height: 180px;
    }

    #output-container {
        min-height: 400px;
    }
    
    .output-item {
        grid-template-columns: 100px 1fr auto;
        gap: 12px;
        padding: 12px;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .output-item {
        grid-template-columns: 1fr auto;
        gap: 10px;
    }
    
    .style-label {
        grid-column: 1 / -1;
        margin-bottom: 4px;
    }

    #output-container {
        min-height: 300px;
    }
}
