:root {
    --bg-color: #f0f4f8;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --success: #10b981;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background: var(--card-bg);
    width: 100%;
    max-width: 640px;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.header {
    margin-bottom: 24px;
}

.header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.header p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Переключатели вкладок */
.tabs {
    display: flex;
    gap: 8px;
    background: #f1f5f9;
    padding: 6px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.tabs button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: calc(var(--radius) - 4px);
    transition: all 0.2s ease;
}

.tabs button.active {
    background: var(--card-bg);
    color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Формы */
.form-row {
    display: flex;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
    flex: 1;
    min-width: 0; /* предотвращает переполнение flex-элементов */
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
}

input[type="text"], textarea, select {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-main);
    background-color: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
}

input[type="text"]:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    background-color: var(--card-bg);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Стилизация выпадающих списков */
.select-wrapper {
    position: relative;
}

select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 40px;
}

.select-wrapper::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text-muted);
    pointer-events: none;
}

textarea {
    resize: vertical;
}

/* Главная Кнопка */
.btn-generate {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-generate:hover {
    background: var(--primary-hover);
}

/* Окно вывода */
.result-box {
    margin-top: 24px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-height: 80px;
    position: relative;
}

.placeholder-text {
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
    line-height: 40px;
}

#prompt-output {
    font-size: 14px;
    line-height: 1.6;
    color: #0f172a;
    white-space: pre-wrap;
    word-break: break-word;
}

#action-bar {
    margin-top: 16px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
    display: flex;
    justify-content: flex-end;
}

.btn-copy {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #0f172a;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-copy:hover {
    background: #1e293b;
}

/* Уведомление */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #0f172a;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 100;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Медиа-запрос для мобильных устройств */
@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .container {
        padding: 20px;
    }
}
