
/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6c5ce7;
    --primary-dark: #5541d7;
    --background: #f6f7fb;
    --surface: #ffffff;
    --text: #202235;
    --muted: #777b91;
    --border: #e6e7ef;
    --success: #16845b;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

/* ===== Header ===== */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 18px 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.logo {
    font-size: 25px;
    font-weight: 800;
    color: var(--primary);
}

header p {
    color: var(--muted);
    font-size: 14px;
}

/* ===== Main Layout ===== */
main {
    width: min(1100px, 90%);
    margin: 40px auto;
}

.hero {
    text-align: center;
    margin-bottom: 35px;
}

.hero h1 {
    font-size: clamp(28px, 5vw, 43px);
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    max-width: 650px;
    margin: 0 auto;
    color: var(--muted);
}

/* ===== Cards ===== */
.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    align-items: start;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 27px;
    box-shadow: 0 8px 30px rgba(30, 30, 70, 0.04);
}

.card h2 {
    font-size: 21px;
    margin-bottom: 6px;
}

.card .subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 22px;
}

/* ===== Form ===== */
.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 7px;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.12);
}

input::placeholder,
textarea::placeholder {
    color: #a3a5b5;
}

/* ===== Buttons ===== */
button {
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

button:hover {
    transform: translateY(-1px);
}

button:focus-visible {
    outline: 3px solid rgba(108, 92, 231, 0.35);
    outline-offset: 3px;
}

.generate-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 14px;
    font-size: 15px;
}

.generate-btn:hover {
    background: var(--primary-dark);
}

.secondary-btn {
    background: #eeebff;
    color: var(--primary-dark);
}

.secondary-btn:hover {
    background: #e1dcff;
}

/* ===== Output Section ===== */
.output-section {
    margin-bottom: 23px;
}

.output-section h3 {
    font-size: 15px;
    margin-bottom: 9px;
}

.output-box {
    background: #fafaff;
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 14px;
    min-height: 55px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    font-size: 14px;
}

.output-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 10px;
}

.output-actions button {
    font-size: 13px;
    padding: 9px 13px;
}

.empty-message {
    color: var(--muted);
    font-size: 14px;
}

/* ===== Status Message ===== */
.status {
    margin-top: 15px;
    color: var(--success);
    font-size: 13px;
    min-height: 20px;
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 25px 15px;
    color: var(--muted);
    font-size: 13px;
}

/* ===== Responsive Design ===== */
@media (max-width: 760px) {
    header {
        padding: 16px 5%;
        flex-direction: column;
        align-items: flex-start;
    }

    main {
        width: 92%;
        margin: 28px auto;
    }

    .container {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 21px;
    }

    .hero h1 {
        font-size: 30px;
    }
}

@media (max-width: 400px) {
    .card {
        padding: 16px;
    }

    .output-actions {
        flex-direction: column;
    }

    .output-actions button {
        width: 100%;
    }
}
