:root {
    --primary-color-start: #007BFF; /* A nice blue for this tool */
    --primary-color-end: #0056b3;
    --background-color: #f4f7fc;
    --card-background: #ffffff;
    --text-color-primary: #1e293b;
    --text-color-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 123, 255, 0.1);
}
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}
.main-container {
    width: 100%;
    max-width: 750px;
}
.tool-card, .extra-section {
    background: var(--card-background);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}
h1 {
    text-align: center;
    color: var(--text-color-primary);
    font-size: 28px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 10px;
}
.tagline {
    text-align: center;
    color: var(--text-color-secondary);
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 30px;
}
.input-group, .output-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}
.input-group label, .output-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color-secondary);
    margin-bottom: 8px;
}
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    color: var(--text-color-primary);
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    resize: vertical; /* Allow user to resize vertically */
}
textarea:focus {
    outline: none;
    border-color: var(--primary-color-start);
    box-shadow: 0 0 0 3px var(--shadow-color);
}
#outputText {
    background-color: #f8f9fa; /* Slightly different background for readonly field */
    cursor: text;
}
.button-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}
.action-btn, .secondary-btn, .reset-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.action-btn {
    background-image: linear-gradient(45deg, var(--primary-color-start), var(--primary-color-end));
    color: white;
}
.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow-color);
}
.secondary-btn, .reset-btn {
    background-color: #e2e8f0;
    color: var(--text-color-secondary);
    border: 1px solid var(--border-color);
}
.secondary-btn:hover, .reset-btn:hover {
    background-color: #cbd5e1;
    color: var(--text-color-primary);
}
.section-title {
    font-size: 22px; font-weight: 600; color: var(--text-color-primary); margin-bottom: 20px;
    border-bottom: 3px solid var(--primary-color-start); padding-bottom: 10px;
}
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.tool-button {
    display: block; padding: 15px; background-color: var(--background-color);
    color: var(--primary-color-start); text-decoration: none; font-weight: 600;
    text-align: center; border-radius: 10px; border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.tool-button:hover {
    background-color: var(--primary-color-start); color: white;
    transform: translateY(-3px); box-shadow: 0 4px 10px var(--shadow-color);
}
.how-to-use-list { list-style-type: none; padding-left: 0; counter-reset: steps-counter; }
.how-to-use-list li {
    position: relative; padding-left: 45px; margin-bottom: 15px;
    font-size: 16px; color: var(--text-color-secondary);
}
.how-to-use-list li::before {
    counter-increment: steps-counter; content: counter(steps-counter);
    position: absolute; left: 0; top: 0; width: 30px; height: 30px;
    background-color: var(--primary-color-start); color: white; border-radius: 50%;
    display: flex; justify-content: center; align-items: center; font-weight: 600;
}
.ad-container { margin: 30px auto; text-align: center; }
@media (max-width: 600px) {
    body { padding: 15px; }
    .tool-card, .extra-section { padding: 20px; }
    h1 { font-size: 24px; }
    .tagline { font-size: 15px; }
    .button-wrapper { grid-template-columns: 1fr; }
}