* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0d0d0d;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 820px;
    width: 100%;
    background: #1a1a1a;
    border-radius: 20px;
    padding: 30px 35px 25px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
    border: 1px solid #2a2a2a;
}

header {
    text-align: center;
    margin-bottom: 28px;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #f0c27f, #fc5c7d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #888;
    font-size: 0.95rem;
    margin-top: 4px;
}

label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: #ccc;
}

textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #2e2e2e;
    background: #0f0f0f;
    color: #e8e8e8;
    font-size: 1rem;
    font-family: 'Segoe UI', monospace;
    resize: vertical;
    transition: border 0.25s, box-shadow 0.25s;
    line-height: 1.6;
}

textarea:focus {
    outline: none;
    border-color: #fc5c7d;
    box-shadow: 0 0 0 3px rgba(252, 92, 125, 0.25);
}

textarea::placeholder {
    color: #555;
}

textarea[readonly] {
    background: #131313;
    cursor: default;
}

.input-section,
.output-section {
    margin-bottom: 20px;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 18px 0 22px;
    align-items: center;
    justify-content: center;
}

.case-select {
    padding: 10px 16px;
    border-radius: 30px;
    border: 1px solid #3a3a3a;
    background: #1f1f1f;
    color: #ddd;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    min-width: 180px;
    transition: border 0.2s, box-shadow 0.2s;
}

.case-select:hover {
    border-color: #666;
}

.case-select:focus {
    border-color: #fc5c7d;
    box-shadow: 0 0 0 3px rgba(252, 92, 125, 0.2);
}

.case-select option {
    background: #1f1f1f;
    color: #ddd;
}

.btn {
    padding: 10px 22px;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.4px;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: #fc5c7d;
    color: #fff;
    border: none;
}

.btn-primary:hover {
    background: #e04a6a;
    box-shadow: 0 4px 14px rgba(252, 92, 125, 0.4);
}

.btn-secondary {
    background: #222;
    border: 1px solid #3a3a3a;
    color: #ddd;
}

.btn-secondary:hover {
    background: #303030;
    border-color: #f0c27f;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 10px 0 18px;
}

footer {
    text-align: center;
    color: #4a4a4a;
    font-size: 0.8rem;
    margin-top: 18px;
    border-top: 1px solid #262626;
    padding-top: 16px;
}

@media (max-width: 550px) {
    .container {
        padding: 18px 16px 16px;
    }
    header h1 {
        font-size: 1.8rem;
    }
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .case-select {
        min-width: unset;
    }
    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}