:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #6366f1;
    --border: rgba(255, 255, 255, 0.1);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--primary-gradient);
    filter: blur(120px);
    opacity: 0.15;
    border-radius: 50%;
    top: -100px;
    left: -100px;
}

.blob-2 {
    bottom: -100px;
    right: -100px;
    top: auto;
    left: auto;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
}

.tool-container {
    width: 100%;
    max-width: 900px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 3rem;
    box-shadow: var(--shadow-premium);
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header h1 {
    font-size: 2.8rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.encoder-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.input-card:focus-within {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

textarea {
    width: 100%;
    height: 180px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'Space Mono', monospace;
    font-size: 1.05rem;
    resize: none;
    outline: none;
    line-height: 1.6;
}

.actions-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-primary,
.btn-secondary {
    padding: 0.8rem 2.5rem;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    border: 1px solid var(--border);
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.action-link {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
}

.action-link:hover {
    color: var(--text-primary);
}

.copy-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.info-section {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.info-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: #a5b4fc;
}

.info-section p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 600px) {
    .tool-container {
        padding: 1.5rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .actions-group {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}