vimalk78's picture
feat: add frontend controls for similarity temperature and difficulty weight
5686111
/* Crossword Puzzle Styles */
/* Advanced Settings Styles */
.advanced-settings {
background: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 8px;
margin-bottom: 20px;
overflow: hidden;
}
.advanced-settings-header {
display: flex;
align-items: center;
padding: 12px 16px;
background: #e9ecef;
cursor: pointer;
user-select: none;
transition: background-color 0.2s ease;
}
.advanced-settings-header:hover {
background: #dee2e6;
}
.settings-icon {
margin-right: 8px;
font-size: 1.1rem;
}
.settings-title {
flex: 1;
font-weight: 600;
color: #2c3e50;
}
.expand-icon {
color: #6c757d;
font-size: 0.9rem;
}
.advanced-settings-content {
padding: 20px;
}
.setting-group {
margin-bottom: 24px;
}
.setting-group:last-child {
margin-bottom: 0;
}
.setting-label {
display: flex;
justify-content: space-between;
align-items: center;
font-weight: 600;
color: #2c3e50;
margin-bottom: 8px;
}
.setting-value {
background: #e9ecef;
padding: 2px 8px;
border-radius: 12px;
font-size: 0.9rem;
color: #495057;
}
.slider-container {
margin-bottom: 8px;
}
.slider {
width: 100%;
height: 6px;
border-radius: 3px;
background: #dee2e6;
outline: none;
-webkit-appearance: none;
cursor: pointer;
}
.slider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 20px;
height: 20px;
border-radius: 50%;
background: #3498db;
cursor: pointer;
transition: transform 0.2s ease;
}
.slider::-webkit-slider-thumb:hover {
transform: scale(1.1);
}
.slider::-moz-range-thumb {
width: 20px;
height: 20px;
border-radius: 50%;
background: #3498db;
cursor: pointer;
border: none;
}
.slider-labels {
display: flex;
justify-content: space-between;
margin-top: 4px;
font-size: 0.85rem;
color: #6c757d;
}
.setting-description {
font-size: 0.9rem;
color: #6c757d;
font-style: italic;
}
.presets-section {
margin-top: 20px;
padding-top: 20px;
border-top: 1px solid #dee2e6;
}
.presets-label {
font-weight: 600;
color: #2c3e50;
margin-bottom: 10px;
}
.presets-container {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.preset-button {
padding: 6px 12px;
border: 2px solid #6c757d;
background: white;
color: #6c757d;
border-radius: 16px;
cursor: pointer;
transition: all 0.2s ease;
font-size: 0.85rem;
font-weight: 500;
}
.preset-button:hover {
border-color: #3498db;
color: #3498db;
}
.preset-button.active {
border-color: #3498db;
background: #3498db;
color: white;
}
.settings-info {
margin-top: 16px;
padding: 12px;
background: #e3f2fd;
border-radius: 6px;
border-left: 4px solid #2196f3;
}
.info-item {
margin-bottom: 8px;
font-size: 0.85rem;
color: #1976d2;
}
.info-item:last-child {
margin-bottom: 0;
}
.crossword-app {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.app-header {
text-align: center;
margin-bottom: 30px;
}
.app-title {
color: #2c3e50;
font-size: 2.5rem;
margin-bottom: 10px;
}
/* Topic Selector Styles */
.topic-selector {
background: #f8f9fa;
padding: 20px;
border-radius: 8px;
margin-bottom: 20px;
}
.topic-selector h3 {
margin-top: 0;
color: #2c3e50;
}
.topic-buttons {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 15px;
}
.topic-btn {
padding: 8px 16px;
border: 2px solid #3498db;
background: white;
color: #3498db;
border-radius: 20px;
cursor: pointer;
transition: all 0.3s ease;
font-weight: 500;
}
.topic-btn:hover {
background: #3498db;
color: white;
}
.topic-btn.selected {
background: #3498db;
color: white;
}
.selected-count {
color: #7f8c8d;
font-size: 0.9rem;
margin: 0;
}
/* Custom Topics Styles */
.custom-topics-container {
margin-top: 20px;
padding-top: 15px;
border-top: 1px solid #e9ecef;
}
.custom-topics-container h3 {
color: #2c3e50;
margin-bottom: 8px;
}
.custom-topics-description {
color: #7f8c8d;
font-size: 0.9rem;
margin-bottom: 15px;
margin-top: 0;
}
.custom-topic-input-container {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 10px;
}
.custom-topic-input {
flex: 1;
padding: 8px 12px;
border: 2px solid #ddd;
border-radius: 4px;
font-size: 0.9rem;
transition: border-color 0.3s ease;
}
.custom-topic-input:focus {
outline: none;
border-color: #3498db;
}
.remove-topic-btn {
background: #e74c3c;
color: white;
border: none;
border-radius: 4px;
width: 30px;
height: 30px;
cursor: pointer;
transition: background-color 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
}
.remove-topic-btn:hover {
background: #c0392b;
}
.add-topic-btn {
background: #27ae60;
color: white;
border: none;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s ease;
font-size: 0.9rem;
margin-top: 5px;
}
.add-topic-btn:hover {
background: #229954;
}
/* Custom Sentence Input Styles */
.sentence-input-container {
margin-top: 20px;
margin-bottom: 15px;
}
.sentence-label {
display: block;
margin-bottom: 8px;
color: #2c3e50;
font-weight: 500;
font-size: 0.95rem;
}
.sentence-input {
width: 100%;
padding: 12px;
border: 2px solid #e1e8ed;
border-radius: 8px;
font-family: inherit;
font-size: 0.9rem;
line-height: 1.4;
resize: vertical;
min-height: 80px;
background: white;
transition: border-color 0.3s ease, box-shadow 0.3s ease;
box-sizing: border-box;
}
.sentence-input:focus {
outline: none;
border-color: #3498db;
box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}
.sentence-input::placeholder {
color: #95a5a6;
font-style: italic;
}
.sentence-info {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 6px;
font-size: 0.8rem;
}
.char-count {
color: #7f8c8d;
}
.clear-sentence-btn {
background: #e74c3c;
color: white;
border: none;
padding: 4px 8px;
border-radius: 4px;
cursor: pointer;
font-size: 0.75rem;
transition: background-color 0.2s ease;
}
.clear-sentence-btn:hover {
background: #c0392b;
}
.clear-sentence-btn:active {
background: #a93226;
}
/* Multi-Theme Toggle Styles */
.multi-theme-toggle-container {
margin-top: 20px;
margin-bottom: 15px;
padding: 15px;
background: #f0f4f8;
border: 1px solid #e1e8ed;
border-radius: 8px;
}
.multi-theme-toggle {
display: flex;
align-items: center;
cursor: pointer;
margin-bottom: 8px;
}
.multi-theme-checkbox {
width: 18px;
height: 18px;
margin-right: 10px;
cursor: pointer;
accent-color: #3498db;
}
.multi-theme-label {
font-weight: 500;
color: #2c3e50;
font-size: 0.95rem;
user-select: none;
}
.multi-theme-description {
margin: 0;
font-size: 0.85rem;
color: #5a6c7d;
line-height: 1.4;
font-style: italic;
padding-left: 28px;
}
/* AI Toggle Styles */
.ai-toggle-container {
margin: 20px 0;
padding: 15px;
background: #f8f9fa;
border-radius: 8px;
border: 2px solid #e9ecef;
transition: all 0.3s ease;
}
.ai-toggle-container:has(.ai-checkbox:checked) {
background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
border-color: #3498db;
}
.ai-toggle {
display: flex;
align-items: center;
cursor: pointer;
font-weight: 500;
margin-bottom: 8px;
}
.ai-checkbox {
width: 20px;
height: 20px;
margin-right: 12px;
cursor: pointer;
accent-color: #3498db;
}
.ai-label {
font-size: 1rem;
color: #2c3e50;
user-select: none;
}
.ai-status {
color: #27ae60;
font-weight: 600;
font-size: 0.9rem;
}
.ai-description {
margin: 0;
font-size: 0.85rem;
color: #6c757d;
line-height: 1.4;
padding-left: 32px;
}
/* Puzzle Controls */
.puzzle-controls {
display: flex;
gap: 15px;
margin-bottom: 20px;
justify-content: center;
}
.control-btn {
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
font-weight: 600;
transition: background-color 0.3s ease;
}
.control-btn:disabled {
background: #bdc3c7 !important;
color: #7f8c8d !important;
cursor: not-allowed;
opacity: 0.7;
}
.generate-btn {
background: #27ae60;
color: white;
}
.generate-btn:hover {
background: #229954;
}
.generate-btn:disabled {
background: #bdc3c7;
cursor: not-allowed;
}
.reset-btn {
background: #e74c3c;
color: white;
}
.reset-btn:hover {
background: #c0392b;
}
.reveal-btn {
background: #f39c12;
color: white;
}
.reveal-btn:hover {
background: #e67e22;
}
/* Loading Spinner */
.loading-spinner {
display: flex;
flex-direction: column;
align-items: center;
padding: 40px;
}
.spinner {
width: 40px;
height: 40px;
border: 4px solid #f3f3f3;
border-top: 4px solid #3498db;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 15px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.loading-message {
color: #7f8c8d;
font-size: 1.1rem;
}
/* Puzzle Info */
.puzzle-info {
display: flex;
justify-content: space-between;
align-items: center;
margin: 20px 0 10px 0;
padding: 10px 15px;
background: #f8f9fa;
border-radius: 6px;
border-left: 4px solid #3498db;
}
.puzzle-stats {
font-size: 0.9rem;
color: #6c757d;
font-weight: 500;
}
.ai-generated-badge {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 4px 12px;
border-radius: 15px;
font-size: 0.8rem;
font-weight: 600;
text-shadow: 0 1px 2px rgba(0,0,0,0.2);
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* Puzzle Layout */
.puzzle-layout {
display: grid;
grid-template-columns: 1fr 300px;
gap: 30px;
margin-top: 20px;
}
@media (max-width: 768px) {
.puzzle-layout {
grid-template-columns: 1fr;
gap: 20px;
}
.puzzle-info {
flex-direction: column;
gap: 8px;
text-align: center;
}
.ai-toggle-container {
padding: 12px;
}
.ai-description {
padding-left: 0;
text-align: center;
}
}
/* Puzzle Grid */
.puzzle-container {
display: flex;
justify-content: center;
}
.puzzle-grid {
display: grid;
gap: 0;
margin: 0 auto;
width: fit-content;
height: fit-content;
}
.grid-cell {
width: 35px;
height: 35px;
position: relative;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
background: white;
}
.grid-cell::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: -1px;
bottom: -1px;
border: 1px solid #2c3e50;
pointer-events: none;
z-index: 10;
}
.black-cell {
background: #f0f0f0;
}
.black-cell::before {
background: #f0f0f0;
border: 1px solid #2c3e50;
}
.white-cell {
background: white;
}
.empty-cell {
background: transparent;
border: none;
visibility: hidden;
}
.empty-cell::before {
display: none;
}
.cell-input {
width: 100%;
height: 100%;
border: none !important;
text-align: center;
font-size: 16px;
font-weight: bold;
background: transparent;
outline: none;
text-transform: uppercase;
position: relative;
z-index: 5;
}
.cell-input:focus {
background: #e8f4fd;
box-shadow: inset 0 0 0 2px #3498db;
}
.cell-number {
position: absolute;
top: 1px;
left: 2px;
font-size: 10px;
font-weight: bold;
color: #2c3e50;
line-height: 1;
z-index: 15;
pointer-events: none;
}
.solution-text {
color: #2c3e50 !important;
font-weight: bold !important;
background: white !important;
}
.solution-text:disabled {
opacity: 1 !important;
cursor: default;
}
/* Specifically for solution state */
.grid-cell .solution-text {
border: none !important;
background: white !important;
}
/* Clue List */
.clue-list {
background: #f8f9fa;
padding: 20px;
border-radius: 8px;
max-height: 600px;
overflow-y: auto;
}
.clue-section {
margin-bottom: 25px;
}
.clue-section h4 {
color: #2c3e50;
margin-bottom: 15px;
font-size: 1.2rem;
border-bottom: 2px solid #3498db;
padding-bottom: 5px;
}
.clue-section ol {
padding-left: 0;
list-style: none;
}
.clue-item {
display: flex;
margin-bottom: 8px;
padding: 8px;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.2s ease;
}
.clue-item:hover {
background: #e9ecef;
}
.clue-number {
font-weight: bold;
color: #3498db;
margin-right: 10px;
min-width: 25px;
}
.clue-text {
flex: 1;
color: #2c3e50;
}
/* Error Messages */
.error-message {
background: #f8d7da;
color: #721c24;
padding: 15px;
border-radius: 5px;
margin: 20px 0;
border: 1px solid #f5c6cb;
}
/* Success Messages */
.success-message {
background: #d4edda;
color: #155724;
padding: 15px;
border-radius: 5px;
margin: 20px 0;
border: 1px solid #c3e6cb;
text-align: center;
font-weight: 600;
}
/* Tab Navigation */
.tab-nav {
display: flex;
border-bottom: 2px solid #e9ecef;
margin-bottom: 20px;
gap: 2px;
}
.tab-btn {
padding: 12px 20px;
border: none;
background: #f8f9fa;
color: #6c757d;
cursor: pointer;
border-radius: 8px 8px 0 0;
font-weight: 500;
transition: all 0.3s ease;
}
.tab-btn:hover {
background: #e9ecef;
color: #495057;
}
.tab-btn.active {
background: #3498db;
color: white;
}
/* Debug Tab Styles */
.debug-tab {
background: #f8f9fa;
border-radius: 8px;
padding: 20px;
margin-top: 20px;
}
.debug-nav {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 20px;
border-bottom: 2px solid #e9ecef;
padding-bottom: 15px;
}
.debug-nav-btn {
padding: 8px 16px;
border: 1px solid #dee2e6;
background: white;
color: #495057;
border-radius: 20px;
cursor: pointer;
font-size: 0.9rem;
font-weight: 500;
transition: all 0.3s ease;
}
.debug-nav-btn:hover {
background: #e9ecef;
border-color: #adb5bd;
}
.debug-nav-btn.active {
background: #3498db;
color: white;
border-color: #3498db;
}
.debug-content {
min-height: 300px;
}
.debug-section h3 {
color: #2c3e50;
margin-bottom: 15px;
border-bottom: 1px solid #dee2e6;
padding-bottom: 8px;
}
.debug-section h4 {
color: #495057;
margin-top: 20px;
margin-bottom: 10px;
}
.debug-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 10px;
margin-bottom: 20px;
}
.debug-grid > div {
padding: 8px 12px;
background: white;
border-radius: 4px;
border: 1px solid #e9ecef;
font-size: 0.9rem;
}
.debug-grid strong {
color: #2c3e50;
}
/* Word Table Styles */
.word-table-container {
max-height: 400px;
overflow-y: auto;
border: 1px solid #dee2e6;
border-radius: 6px;
background: white;
}
.word-table {
width: 100%;
border-collapse: collapse;
font-size: 0.85rem;
}
.word-table th {
background: #f8f9fa;
padding: 8px 12px;
text-align: left;
border-bottom: 2px solid #dee2e6;
font-weight: 600;
color: #495057;
position: sticky;
top: 0;
z-index: 1;
}
.word-table th.sorted-column {
background: #e3f2fd;
color: #1976d2;
font-weight: 700;
}
.word-table th[style*="cursor: pointer"]:hover {
background: #e9ecef;
}
.word-table td {
padding: 6px 12px;
border-bottom: 1px solid #f1f3f4;
}
.word-table tr:hover {
background-color: #f8f9fa;
}
.word-table td:first-child {
font-weight: 600;
color: #2c3e50;
}
.debug-section ul {
margin: 10px 0;
padding-left: 20px;
}
.debug-section li {
margin: 5px 0;
font-size: 0.9rem;
line-height: 1.4;
}
/* Probability Distribution Styling */
.prob-summary {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px 15px;
margin: 15px 0 20px 0;
padding: 15px;
background: #f8f9fa;
border-radius: 8px;
font-size: 0.9rem;
}
.chart-container {
margin: 20px 0;
padding: 20px;
background: #ffffff;
border: 1px solid #dee2e6;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.chart-description {
background: #e3f2fd;
padding: 12px 15px;
border-radius: 6px;
border-left: 4px solid #1976d2;
margin-top: 15px;
font-size: 0.9rem;
line-height: 1.4;
color: #1565c0;
}
.probability-table-container {
max-height: 600px;
overflow-y: auto;
border: 1px solid #dee2e6;
border-radius: 8px;
}
.probability-table {
width: 100%;
border-collapse: collapse;
font-size: 0.9rem;
}
.probability-table th {
background: #495057;
color: white;
padding: 12px 8px;
text-align: left;
font-weight: 600;
position: sticky;
top: 0;
z-index: 10;
border-bottom: 2px solid #343a40;
}
.probability-table td {
padding: 8px;
border-bottom: 1px solid #e9ecef;
vertical-align: middle;
}
.probability-table tr:hover {
background: #f8f9fa;
}
.probability-table tr.selected-word {
background: #e8f5e8;
border-left: 4px solid #4CAF50;
}
.probability-table tr.selected-word:hover {
background: #d4edda;
}
.probability-cell {
display: flex;
align-items: center;
gap: 10px;
}
.prob-text {
min-width: 60px;
font-weight: 600;
}
.prob-bar {
height: 16px;
border-radius: 8px;
transition: all 0.3s ease;
min-width: 2px;
}
.probability-table td:first-child {
text-align: center;
color: #6c757d;
font-weight: 600;
}
.probability-table td:last-child {
text-align: center;
font-size: 1.1rem;
font-weight: bold;
color: #4CAF50;
}
.probability-table tr:not(.selected-word) td:last-child {
color: #f44336;
}
/* Responsive */
@media (max-width: 768px) {
.debug-nav {
justify-content: center;
}
.debug-nav-btn {
font-size: 0.8rem;
padding: 6px 12px;
}
.debug-grid {
grid-template-columns: 1fr;
}
.word-table {
font-size: 0.75rem;
}
.word-table th,
.word-table td {
padding: 4px 8px;
}
.prob-summary {
grid-template-columns: repeat(2, 1fr);
text-align: center;
}
.chart-container {
padding: 10px;
margin: 10px 0;
}
.probability-table {
font-size: 0.75rem;
}
.probability-table th,
.probability-table td {
padding: 6px 4px;
}
.prob-text {
min-width: 50px;
font-size: 0.8rem;
}
.prob-bar {
height: 12px;
}
}