Files
ReSekai/src/pages/CreateStoryPage.css
T

1027 lines
17 KiB
CSS

.create-story-page {
max-width: 800px;
margin: 0 auto;
padding: 2rem;
}
.back-link {
display: inline-block;
color: #888;
text-decoration: none;
margin-bottom: 1.5rem;
transition: color 0.2s;
}
.back-link:hover {
color: #667eea;
}
.create-header {
text-align: center;
margin-bottom: 2rem;
}
.create-header h1 {
font-size: 2rem;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 0.5rem;
}
.create-header p {
color: #888;
}
.create-form {
display: flex;
flex-direction: column;
gap: 2rem;
}
.form-section {
background: #1a1a1a;
border-radius: 16px;
padding: 1.5rem;
border: 1px solid #333;
}
.form-section h2 {
font-size: 1.2rem;
color: #fff;
margin: 0 0 1.25rem;
padding-bottom: 0.75rem;
border-bottom: 1px solid #333;
}
.ai-tag {
font-size: 0.7rem;
padding: 0.2rem 0.5rem;
background: rgba(102, 126, 234, 0.2);
color: #a0b4ff;
border-radius: 6px;
font-weight: 500;
vertical-align: middle;
margin-left: 0.5rem;
}
.section-hint {
color: #888;
font-size: 0.85rem;
margin: -0.75rem 0 1rem;
}
.form-group {
margin-bottom: 1rem;
}
.form-group:last-child {
margin-bottom: 0;
}
.form-group label {
display: block;
color: #ccc;
font-size: 0.9rem;
margin-bottom: 0.5rem;
font-weight: 500;
}
.form-group input,
.form-group textarea {
width: 100%;
padding: 0.75rem 1rem;
background: #0d0d0d;
border: 2px solid #333;
border-radius: 10px;
color: white;
font-size: 1rem;
font-family: inherit;
transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
outline: none;
border-color: #667eea;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
color: #555;
}
.form-group textarea {
resize: vertical;
min-height: 80px;
}
.genres-grid,
.settings-grid {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-bottom: 1rem;
}
/* Выбранные теги */
.selected-tags {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-bottom: 1rem;
padding: 0.75rem;
background: rgba(102, 126, 234, 0.1);
border-radius: 10px;
border: 1px solid rgba(102, 126, 234, 0.2);
}
.selected-tag {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.4rem 0.6rem 0.4rem 0.9rem;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 500;
}
.tag-remove {
display: flex;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
background: rgba(255, 255, 255, 0.2);
border: none;
border-radius: 50%;
color: white;
font-size: 0.7rem;
cursor: pointer;
transition: background 0.2s;
}
.tag-remove:hover {
background: rgba(255, 255, 255, 0.4);
}
/* Кастомный жанр */
.custom-genre-input {
display: flex;
gap: 0.5rem;
}
.custom-genre-input input {
flex: 1;
}
.add-genre-btn {
width: 44px;
background: #2a2a2a;
border: 2px solid #333;
border-radius: 10px;
color: #667eea;
font-size: 1.2rem;
cursor: pointer;
transition: all 0.2s;
}
.add-genre-btn:hover:not(:disabled) {
background: #667eea;
border-color: #667eea;
color: white;
}
.add-genre-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
/* NSFW Toggle */
.nsfw-toggle {
display: flex;
align-items: center;
gap: 1rem;
padding: 1rem;
background: #0d0d0d;
border-radius: 12px;
border: 1px solid #333;
}
.toggle-switch {
position: relative;
width: 56px;
height: 30px;
flex-shrink: 0;
}
.toggle-switch input {
opacity: 0;
width: 0;
height: 0;
}
.toggle-switch .toggle-slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
transition: 0.3s;
border-radius: 30px;
}
.toggle-switch .toggle-slider:before {
position: absolute;
content: "";
height: 22px;
width: 22px;
left: 4px;
bottom: 4px;
background-color: white;
transition: 0.3s;
border-radius: 50%;
}
.toggle-switch input:checked + .toggle-slider {
background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
}
.toggle-switch input:checked + .toggle-slider:before {
transform: translateX(26px);
background-color: white;
}
.nsfw-info {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.nsfw-label {
font-weight: 600;
color: #888;
font-size: 1rem;
}
.nsfw-label.active {
color: #ff6b6b;
}
.nsfw-hint {
font-size: 0.8rem;
color: #888;
}
/* Temperature Selector */
.temperature-selector {
display: flex;
gap: 0.75rem;
}
.temp-btn {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 0.25rem;
padding: 1rem;
background: #0d0d0d;
border: 2px solid #333;
border-radius: 12px;
cursor: pointer;
transition: all 0.2s;
}
.temp-btn:hover {
border-color: #667eea;
}
.temp-btn.active {
border-color: #667eea;
background: linear-gradient(
135deg,
rgba(102, 126, 234, 0.15) 0%,
rgba(118, 75, 162, 0.15) 100%
);
}
.temp-label {
font-size: 0.95rem;
color: #ddd;
}
.temp-btn.active .temp-label {
color: #fff;
}
.temp-value {
font-size: 0.75rem;
color: #666;
}
.temp-btn.active .temp-value {
color: #667eea;
}
.genre-btn,
.setting-btn {
padding: 0.5rem 1rem;
background: #2a2a2a;
border: 2px solid #333;
border-radius: 20px;
color: #aaa;
font-size: 0.9rem;
cursor: pointer;
transition: all 0.2s;
}
.genre-btn:hover,
.setting-btn:hover {
border-color: #667eea;
color: #fff;
}
.genre-btn.selected,
.setting-btn.selected {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-color: transparent;
color: white;
}
.array-input {
display: flex;
gap: 0.5rem;
margin-bottom: 0.5rem;
}
.array-input input {
flex: 1;
}
.remove-btn {
width: 40px;
background: #2a2a2a;
border: 2px solid #333;
border-radius: 10px;
color: #ff6b6b;
cursor: pointer;
transition: all 0.2s;
}
.remove-btn:hover {
background: rgba(255, 107, 107, 0.1);
border-color: #ff6b6b;
}
.add-btn {
width: 100%;
padding: 0.6rem;
background: transparent;
border: 2px dashed #333;
border-radius: 10px;
color: #888;
font-size: 0.9rem;
cursor: pointer;
transition: all 0.2s;
}
.add-btn:hover {
border-color: #667eea;
color: #667eea;
}
.form-actions {
display: flex;
gap: 1rem;
justify-content: flex-end;
padding-top: 1rem;
}
.cancel-btn {
padding: 0.875rem 1.5rem;
background: #2a2a2a;
border: none;
border-radius: 12px;
color: #aaa;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
text-decoration: none;
transition: all 0.2s;
}
.cancel-btn:hover {
background: #333;
color: #fff;
}
.submit-btn {
padding: 0.875rem 2rem;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
border-radius: 12px;
color: white;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
}
.submit-btn:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}
.submit-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
}
/* Языки */
.language-grid {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.language-btn {
padding: 0.5rem 1rem;
background: #2a2a2a;
border: 2px solid #333;
border-radius: 10px;
color: #aaa;
font-size: 0.9rem;
cursor: pointer;
transition: all 0.2s;
}
.language-btn:hover {
border-color: #667eea;
color: #fff;
}
.language-btn.active {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-color: transparent;
color: white;
}
/* Tags grid */
.tags-grid {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-bottom: 1rem;
}
.tag-btn {
padding: 0.5rem 1rem;
background: #2a2a2a;
border: 2px solid #333;
border-radius: 20px;
color: #aaa;
font-size: 0.9rem;
cursor: pointer;
transition: all 0.2s;
}
.tag-btn:hover {
border-color: #667eea;
color: #fff;
}
.tag-btn.active {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-color: transparent;
color: white;
}
.tag-btn.setting.active {
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.setting-tag {
background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}
/* Remove tag button */
.remove-tag {
background: rgba(255, 255, 255, 0.2);
border: none;
border-radius: 50%;
width: 18px;
height: 18px;
color: white;
font-size: 0.8rem;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s;
}
.remove-tag:hover {
background: rgba(255, 255, 255, 0.4);
}
/* Custom tag input */
.custom-tag-input {
display: flex;
gap: 0.5rem;
}
.custom-tag-input input {
flex: 1;
padding: 0.75rem 1rem;
background: #0d0d0d;
border: 2px solid #333;
border-radius: 10px;
color: white;
font-size: 1rem;
}
.custom-tag-input input:focus {
outline: none;
border-color: #667eea;
}
.custom-tag-input button {
width: 44px;
background: #2a2a2a;
border: 2px solid #333;
border-radius: 10px;
color: #667eea;
font-size: 1.2rem;
cursor: pointer;
transition: all 0.2s;
}
.custom-tag-input button:hover:not(:disabled) {
background: #667eea;
border-color: #667eea;
color: white;
}
.custom-tag-input button:disabled {
opacity: 0.4;
cursor: not-allowed;
}
/* Field hints */
.field-hint {
font-size: 0.8rem;
color: #666;
margin-bottom: 0.5rem;
}
.word-count {
font-size: 0.8rem;
color: #888;
}
.word-count.over {
color: #ff6b6b;
}
/* Markdown input */
.markdown-input {
font-family: "Fira Code", "Monaco", monospace;
font-size: 0.9rem;
line-height: 1.6;
}
/* Markdown preview */
.markdown-preview {
margin-top: 1rem;
background: #0d0d0d;
border: 1px solid #333;
border-radius: 10px;
overflow: hidden;
}
.preview-header {
padding: 0.5rem 1rem;
background: #1a1a1a;
color: #888;
font-size: 0.85rem;
border-bottom: 1px solid #333;
}
.preview-content {
padding: 1rem;
color: #ccc;
font-size: 0.95rem;
line-height: 1.6;
max-height: 400px;
overflow-y: auto;
}
.preview-content h1,
.preview-content h2,
.preview-content h3,
.preview-content h4 {
color: #fff;
margin: 1rem 0 0.5rem;
}
.preview-content h1:first-child,
.preview-content h2:first-child,
.preview-content h3:first-child {
margin-top: 0;
}
.preview-content p {
margin: 0.5rem 0;
}
.preview-content strong {
color: #a0b4ff;
}
.preview-content em {
color: #c9a0ff;
}
.preview-content ul,
.preview-content ol {
margin: 0.5rem 0;
padding-left: 1.5rem;
}
.preview-content li {
margin: 0.25rem 0;
}
.preview-content code {
background: rgba(102, 126, 234, 0.2);
padding: 0.1rem 0.4rem;
border-radius: 4px;
font-family: "Fira Code", monospace;
font-size: 0.85em;
}
.preview-content pre {
background: #111;
padding: 1rem;
border-radius: 8px;
overflow-x: auto;
}
.preview-content pre code {
background: none;
padding: 0;
}
.preview-content blockquote {
border-left: 3px solid #667eea;
padding-left: 1rem;
margin: 0.5rem 0;
color: #999;
}
/* Character fields */
.character-fields {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.character-fields input,
.character-fields select,
.character-fields textarea {
padding: 0.75rem 1rem;
background: rgba(255, 255, 255, 0.05);
border: 1px solid #333;
border-radius: 8px;
color: white;
font-size: 0.95rem;
}
.character-fields input:focus,
.character-fields select:focus,
.character-fields textarea:focus {
outline: none;
border-color: #667eea;
}
/* Подсказки */
.hint {
display: block;
margin-top: 0.5rem;
font-size: 0.8rem;
color: #666;
}
/* Персонажи */
.character-card {
background: #0d0d0d;
border: 1px solid #333;
border-radius: 12px;
padding: 1rem;
margin-bottom: 1rem;
}
.character-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
}
.character-content {
display: flex;
gap: 1rem;
}
.character-avatar-section {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
flex-shrink: 0;
}
.character-avatar-preview {
width: 120px;
height: 180px;
border-radius: 12px;
object-fit: cover;
object-position: top center;
border: 2px solid #667eea;
background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
background-size: 200% 100%;
animation: avatar-loading 1.5s infinite;
}
.character-avatar-preview[src] {
animation: none;
background: none;
}
@keyframes avatar-loading {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
.character-avatar-placeholder {
width: 120px;
height: 180px;
border-radius: 12px;
background: #1a1a1a;
border: 2px dashed #333;
display: flex;
align-items: center;
justify-content: center;
font-size: 3rem;
color: #666;
}
.btn-generate-avatar {
padding: 0.4rem 0.8rem;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
border-radius: 8px;
color: white;
font-size: 0.9rem;
cursor: pointer;
transition: all 0.2s;
}
.btn-generate-avatar:hover:not(:disabled) {
transform: scale(1.05);
box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}
.btn-generate-avatar:disabled {
opacity: 0.7;
cursor: wait;
}
.character-fields {
flex: 1;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.character-number {
font-weight: 600;
color: #667eea;
font-size: 0.9rem;
}
.remove-btn.small {
width: 28px;
height: 28px;
font-size: 0.8rem;
}
.form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
}
.form-group select {
width: 100%;
padding: 0.75rem 1rem;
background: #0d0d0d;
border: 2px solid #333;
border-radius: 10px;
color: white;
font-size: 1rem;
font-family: inherit;
cursor: pointer;
transition: border-color 0.2s;
}
.form-group select:focus {
outline: none;
border-color: #667eea;
}
.form-group select option {
background: #1a1a1a;
color: white;
}
@media (max-width: 600px) {
.create-story-page {
padding: 1rem;
padding-top: max(1rem, env(safe-area-inset-top));
padding-bottom: max(1rem, env(safe-area-inset-bottom));
}
.form-section {
padding: 1rem;
}
.form-actions {
flex-direction: column;
}
.cancel-btn,
.submit-btn {
width: 100%;
text-align: center;
}
.form-row {
grid-template-columns: 1fr;
}
.language-grid {
flex-direction: column;
}
.language-btn {
text-align: center;
}
/* Temperature selector - вертикальный на мобильных */
.temperature-selector {
flex-direction: column;
}
.temp-btn {
flex-direction: row;
justify-content: space-between;
padding: 0.75rem 1rem;
}
.temp-label {
font-size: 0.9rem;
}
}
/* Character row with two selects */
.character-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.5rem;
}
.character-row select {
padding: 0.5rem;
background: #0d0d0d;
border: 2px solid #333;
border-radius: 8px;
color: white;
font-size: 0.9rem;
}
/* Character buttons */
.character-buttons {
display: flex;
gap: 1rem;
flex-wrap: wrap;
}
.add-btn.secondary {
background: transparent;
border: 2px solid #667eea;
color: #667eea;
}
.add-btn.secondary:hover {
background: rgba(102, 126, 234, 0.1);
}
/* NPC Selector Modal */
.npc-selector-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.8);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 1rem;
}
.npc-selector-modal {
background: #1a1a1a;
border-radius: 16px;
padding: 1.5rem;
max-width: 700px;
width: 100%;
max-height: 80vh;
overflow-y: auto;
}
.npc-selector-modal h3 {
margin: 0 0 1rem 0;
text-align: center;
}
.npc-selector-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 1rem;
margin-bottom: 1rem;
}
.npc-selector-item {
background: #0d0d0d;
border: 2px solid #333;
border-radius: 12px;
padding: 0.75rem;
cursor: pointer;
transition: all 0.2s;
text-align: center;
}
.npc-selector-item:hover {
border-color: #667eea;
transform: translateY(-2px);
}
.npc-selector-item img {
width: 100%;
height: 140px;
object-fit: cover;
object-position: top center;
border-radius: 8px;
margin-bottom: 0.5rem;
}
.npc-selector-item .npc-placeholder {
width: 100%;
height: 140px;
background: #1a1a1a;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-size: 3rem;
margin-bottom: 0.5rem;
}
.npc-selector-info {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.npc-selector-info strong {
font-size: 0.95rem;
}
.npc-selector-info span {
font-size: 0.8rem;
color: #888;
}