samu's picture
1st
7c7ef49
:root {
--primary-color: #6366f1;
--primary-hover: #4f46e5;
--bg-color: #f8fafc;
--card-bg: #ffffff;
--text-color: #1e293b;
--border-color: #e2e8f0;
--radius: 12px;
--divider-color: #e2e8f0;
--icon-color: #64748b;
--nav-width: 240px;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--bg-color);
color: var(--text-color);
line-height: 1.5;
min-height: 100vh;
}
.app-container {
display: flex;
min-height: 100vh;
}
h1 {
text-align: center;
font-size: 2.5rem;
margin-bottom: 2rem;
background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
h2 {
text-align: center;
font-size: 1.5rem;
margin-bottom: 1.5rem;
color: var(--text-color);
}
section {
background: var(--card-bg);
border: 1px solid var(--border-color);
border-radius: var(--radius);
padding: 2rem;
margin-bottom: 2rem;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
transition: transform 0.2s ease;
}
section:hover {
transform: translateY(-2px);
}
textarea, input[type="text"], .category-select {
width: 100%;
padding: 1rem;
margin-bottom: 1rem;
border: 2px solid var(--border-color);
border-radius: var(--radius);
font-size: 1rem;
transition: border-color 0.2s ease;
background: var(--bg-color);
resize: vertical;
min-height: 100px;
}
.category-wrapper {
margin-bottom: 1.5rem;
}
.category-select {
min-height: auto;
cursor: pointer;
appearance: none;
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
background-repeat: no-repeat;
background-position: right 1rem center;
background-size: 1em;
padding-right: 2.5rem;
}
.category-select:focus {
outline: none;
border-color: var(--primary-color);
}
.category-info {
margin-top: 0.5rem;
padding: 1rem;
background: var(--bg-color);
border-radius: var(--radius);
font-size: 0.9rem;
color: var(--text-color);
opacity: 0;
transform: translateY(-10px);
transition: all 0.3s ease;
}
.category-info.visible {
opacity: 1;
transform: translateY(0);
}
.category-info h4 {
margin: 0 0 0.5rem;
color: var(--primary-color);
}
.category-info ul {
margin: 0.5rem 0;
padding-left: 1.5rem;
}
.category-info li {
margin-bottom: 0.25rem;
}
.conventions-list, .elements-list {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-top: 0.5rem;
}
.convention-tag, .element-tag {
background: var(--primary-color);
color: white;
padding: 0.25rem 0.75rem;
border-radius: 1rem;
font-size: 0.8rem;
}
input[type="text"] {
min-height: auto;
}
textarea:focus, input[type="text"]:focus {
outline: none;
border-color: var(--primary-color);
}
input[type="file"] {
width: 100%;
padding: 0.5rem;
margin-bottom: 1rem;
cursor: pointer;
}
button {
width: 100%;
padding: 1rem;
background: var(--primary-color);
color: white;
border: none;
border-radius: var(--radius);
cursor: pointer;
font-size: 1rem;
font-weight: 600;
transition: all 0.2s ease;
margin-top: 1rem;
}
button:hover {
background: var(--primary-hover);
transform: translateY(-1px);
}
button:active {
transform: translateY(0);
}
button.loading {
opacity: 0.7;
cursor: not-allowed;
position: relative;
}
button.loading::after {
content: "";
position: absolute;
width: 20px;
height: 20px;
top: 50%;
left: 50%;
margin: -10px 0 0 -10px;
border: 3px solid rgba(255, 255, 255, 0.3);
border-top-color: white;
border-radius: 50%;
animation: spin 1s linear infinite;
}
.input-section {
position: relative;
margin: 2rem 0;
}
.divider {
position: relative;
text-align: center;
margin: 1.5rem 0;
}
.divider::before {
content: "";
position: absolute;
top: 50%;
left: 0;
right: 0;
height: 1px;
background: var(--divider-color);
}
.divider span {
position: relative;
background: var(--card-bg);
padding: 0 1rem;
color: var(--icon-color);
font-size: 0.9rem;
}
.file-input-wrapper {
position: relative;
width: 100%;
min-height: 150px;
border: 2px dashed var(--border-color);
border-radius: var(--radius);
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
cursor: pointer;
background: var(--bg-color);
}
.file-input-wrapper:hover,
.file-input-wrapper.highlight {
border-color: var(--primary-color);
background: rgba(99, 102, 241, 0.05);
}
.file-input-wrapper input[type="file"] {
position: absolute;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
.file-input-wrapper label {
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
color: var(--icon-color);
font-size: 0.95rem;
text-align: center;
padding: 2rem;
pointer-events: none;
}
.file-input-wrapper svg {
stroke: var(--icon-color);
transition: stroke 0.2s ease;
}
.file-input-wrapper:hover svg {
stroke: var(--primary-color);
}
textarea {
min-height: 120px;
line-height: 1.6;
}
.error-message {
color: #dc2626;
background: #fef2f2;
padding: 1rem;
border-radius: var(--radius);
margin-bottom: 1rem;
border: 1px solid #fecaca;
}
.result-text {
background: var(--bg-color);
padding: 1rem;
border-radius: var(--radius);
margin-bottom: 1rem;
}
.text-section {
margin-bottom: 1.5rem;
padding: 1rem;
background: var(--card-bg);
border: 1px solid var(--border-color);
border-radius: var(--radius);
}
.text-section:last-child {
margin-bottom: 0;
}
.section-title {
color: var(--primary-color);
font-size: 1.1rem;
margin: 0 0 0.5rem 0;
font-weight: 600;
}
.text-section p {
margin: 0;
line-height: 1.6;
white-space: pre-wrap;
}
.image-wrapper {
position: relative;
opacity: 0;
transform: translateY(10px);
transition: all 0.3s ease;
}
.image-wrapper.loaded {
opacity: 1;
transform: translateY(0);
}
@keyframes spin {
to { transform: rotate(360deg); }
}
#results, #resultsImg {
margin-top: 1.5rem;
display: grid;
gap: 1rem;
}
#results img, #resultsImg img {
width: 100%;
height: auto;
border-radius: var(--radius);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
transition: transform 0.2s ease;
}
#results img:hover, #resultsImg img:hover {
transform: scale(1.02);
}
.form-group {
display: flex;
flex-direction: column;
gap: 1rem;
}
.side-nav {
width: var(--nav-width);
background: var(--card-bg);
border-right: 1px solid var(--border-color);
padding: 2rem 1rem;
flex-shrink: 0;
}
.nav-header {
padding: 0 1rem 1rem;
border-bottom: 1px solid var(--border-color);
}
.nav-header h2 {
font-size: 1.1rem;
margin: 0;
text-align: left;
color: var(--text-color);
}
.nav-items {
padding-top: 1rem;
}
.nav-item {
display: flex;
align-items: center;
gap: 0.75rem;
width: 100%;
padding: 0.75rem 1rem;
background: transparent;
border: none;
border-radius: var(--radius);
color: var(--text-color);
font-size: 0.95rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
}
.nav-item svg {
stroke: var(--icon-color);
transition: stroke 0.2s ease;
}
.nav-item:hover {
background: var(--bg-color);
transform: translateX(4px);
}
.nav-item.active {
background: var(--primary-color);
color: white;
}
.nav-item.active svg {
stroke: white;
}
.main-content {
flex-grow: 1;
position: relative;
display: flex;
}
.content-area {
flex-grow: 1;
padding: 2rem;
max-width: calc(100% - var(--nav-width));
transition: max-width 0.3s ease;
}
.results-panel {
position: fixed;
right: 0;
top: 0;
bottom: 0;
width: 400px;
background: var(--card-bg);
border-left: 1px solid var(--border-color);
padding: 2rem;
overflow-y: auto;
transform: translateX(100%);
transition: transform 0.3s ease;
box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
}
.results-panel.visible {
transform: translateX(0);
}
.main-content.with-panel .content-area {
max-width: calc(100% - var(--nav-width) - 400px);
}
.interface {
display: none;
}
.interface.active {
display: block;
}
@media (max-width: 600px) {
body {
padding: 1rem;
}
section {
padding: 1.5rem;
}
h1 {
font-size: 2rem;
}
.file-input-wrapper {
min-height: 100px;
}
}
@media (max-width: 1200px) {
.results-panel {
width: 350px;
}
.main-content.with-panel {
max-width: calc(100% - var(--nav-width) - 350px);
}
}
@media (max-width: 768px) {
.app-container {
flex-direction: column;
}
.side-nav {
width: 100%;
border-right: none;
border-bottom: 1px solid var(--border-color);
padding: 1rem;
}
.nav-items {
display: flex;
gap: 1rem;
}
.nav-item {
flex: 1;
justify-content: center;
}
.nav-item svg {
display: none;
}
.main-content {
max-width: 100%;
padding: 1rem;
}
.results-panel {
position: fixed;
width: 100%;
height: 50%;
top: auto;
bottom: 0;
transform: translateY(100%);
}
.results-panel.visible {
transform: translateY(0);
}
.main-content.with-panel .content-area {
max-width: 100%;
padding-bottom: calc(50vh + 2rem);
}
}