You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

457 lines
7.6 KiB
CSS

/* Italiano Vivo — Design System */
:root {
/* Cores da bandeira italiana + neutros */
--verde: #009246;
--bianco: #ffffff;
--rosso: #ce2b37;
--bg: #f8f9fa;
--surface: #ffffff;
--text: #1a1a2e;
--text-muted: #6c757d;
--border: #e2e8f0;
--shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
--radius: 12px;
--font: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: var(--font);
background: var(--bg);
color: var(--text);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
#root {
max-width: 480px;
margin: 0 auto;
min-height: 100vh;
padding: 16px;
}
/* Tipografia */
h1 {
font-size: 1.75rem;
font-weight: 700;
margin-bottom: 8px;
}
h2 {
font-size: 1.35rem;
font-weight: 600;
margin-bottom: 12px;
}
h3 {
font-size: 1.1rem;
font-weight: 600;
margin-bottom: 8px;
}
p {
margin-bottom: 8px;
}
.text-muted {
color: var(--text-muted);
font-size: 0.9rem;
}
.text-it {
font-style: italic;
color: var(--verde);
}
/* Cards */
.card {
background: var(--surface);
border-radius: var(--radius);
padding: 16px;
margin-bottom: 12px;
box-shadow: var(--shadow);
border: 1px solid var(--border);
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
/* Botões */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 12px 20px;
border: none;
border-radius: var(--radius);
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
text-decoration: none;
}
.btn:active {
transform: scale(0.97);
}
.btn-primary {
background: var(--verde);
color: var(--bianco);
}
.btn-primary:hover {
background: #007a3a;
}
.btn-secondary {
background: var(--border);
color: var(--text);
}
.btn-secondary:hover {
background: #d1d5db;
}
.btn-danger {
background: var(--rosso);
color: var(--bianco);
}
.btn-record {
width: 64px;
height: 64px;
border-radius: 50%;
background: var(--rosso);
color: white;
font-size: 1.5rem;
border: 3px solid #ff6b7a;
}
.btn-record.recording {
animation: pulse 1.2s infinite;
background: #ff4757;
}
@keyframes pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.08); }
}
.audio-pair {
display: flex;
gap: 8px;
align-items: center;
flex-shrink: 0;
}
.btn-play {
width: 44px;
height: 44px;
border-radius: 50%;
background: var(--verde);
color: white;
font-size: 1.2rem;
flex-shrink: 0;
transition: transform 0.1s ease, background 0.2s ease;
}
.btn-play.playing {
animation: pulse 1s infinite;
}
.btn-slow {
background: #6c757d;
font-size: 1.1rem;
}
.btn-fast {
background: var(--verde);
font-size: 1.1rem;
}
/* Trail badges */
.trail-badge {
display: inline-block;
padding: 4px 10px;
border-radius: 20px;
font-size: 0.75rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.trail-bambino { background: #d4edda; color: #155724; }
.trail-viaggio { background: #cce5ff; color: #004085; }
.trail-vivere { background: #fff3cd; color: #856404; }
/* Feedback cards */
.feedback-axis {
padding: 12px;
border-left: 4px solid var(--border);
margin-bottom: 8px;
background: var(--bg);
border-radius: 0 var(--radius) var(--radius) 0;
}
.feedback-axis.success { border-left-color: var(--verde); }
.feedback-axis.warning { border-left-color: #ffc107; }
.feedback-axis.error { border-left-color: var(--rosso); }
.natural-version {
background: #e8f5e9;
padding: 10px 14px;
border-radius: var(--radius);
margin: 8px 0;
font-size: 1.05rem;
}
.natural-version::before {
content: "🇮🇹 Um italiano diria: ";
font-weight: 700;
font-size: 0.85rem;
display: block;
margin-bottom: 4px;
color: var(--verde);
}
/* Voice booth */
.voice-booth {
text-align: center;
padding: 24px 16px;
background: linear-gradient(135deg, #f8f9fa, #e8f5e9);
border-radius: var(--radius);
margin: 16px 0;
}
.voice-booth p {
margin-bottom: 16px;
font-size: 1.1rem;
}
/* Grammar errors list */
.grammar-error {
padding: 8px 12px;
background: #fff3cd;
border-radius: 8px;
margin-bottom: 6px;
font-size: 0.9rem;
}
.grammar-error .fix {
color: var(--verde);
font-weight: 600;
}
.grammar-error.blocks_understanding {
background: #f8d7da;
}
/* SRS flashcard */
.flashcard {
perspective: 1000px;
min-height: 200px;
cursor: pointer;
}
.flashcard-inner {
background: var(--surface);
border-radius: var(--radius);
padding: 32px 24px;
text-align: center;
box-shadow: var(--shadow);
border: 2px solid var(--border);
min-height: 200px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.flashcard-inner .it {
font-size: 1.4rem;
font-weight: 600;
color: var(--verde);
margin-bottom: 8px;
}
.flashcard-inner .pt {
font-size: 1rem;
color: var(--text-muted);
}
.rating-buttons {
display: flex;
gap: 8px;
justify-content: center;
margin-top: 16px;
}
.rating-btn {
width: 44px;
height: 44px;
border-radius: 50%;
border: 2px solid var(--border);
background: var(--surface);
font-weight: 700;
cursor: pointer;
transition: all 0.15s;
}
.rating-btn:hover { border-color: var(--verde); color: var(--verde); }
.rating-btn.selected { background: var(--verde); color: white; border-color: var(--verde); }
/* Loading & Error states */
.loading {
text-align: center;
padding: 40px;
color: var(--text-muted);
}
.error-banner {
background: #f8d7da;
color: #721c24;
padding: 12px 16px;
border-radius: var(--radius);
margin-bottom: 16px;
}
/* Navigation */
.nav-bar {
display: flex;
gap: 8px;
margin-bottom: 20px;
overflow-x: auto;
padding-bottom: 4px;
}
.nav-tab {
padding: 8px 16px;
border-radius: 20px;
border: 1px solid var(--border);
background: var(--surface);
font-size: 0.9rem;
font-weight: 500;
cursor: pointer;
white-space: nowrap;
transition: all 0.2s;
}
.nav-tab.active {
background: var(--verde);
color: white;
border-color: var(--verde);
}
/* Chunk list */
.chunk-item {
display: flex;
align-items: center;
gap: 12px;
padding: 12px;
border-bottom: 1px solid var(--border);
}
.chunk-item:last-child { border-bottom: none; }
.chunk-text {
flex: 1;
}
.chunk-text .it {
font-weight: 600;
color: var(--verde);
}
.chunk-text .pt {
font-size: 0.85rem;
color: var(--text-muted);
}
/* Dialogue */
.dialogue-line {
display: flex;
gap: 10px;
align-items: flex-start;
padding: 10px 0;
}
.dialogue-line.learner {
flex-direction: row-reverse;
}
.dialogue-bubble {
max-width: 80%;
padding: 10px 14px;
border-radius: 16px;
font-size: 0.95rem;
}
.dialogue-line.italian .dialogue-bubble {
background: #e8f5e9;
border-bottom-left-radius: 4px;
}
.dialogue-line.learner .dialogue-bubble {
background: #e3f2fd;
border-bottom-right-radius: 4px;
}
/* Dissent button */
.dissent-btn {
margin-top: 12px;
padding: 8px 16px;
background: transparent;
border: 1px dashed var(--text-muted);
border-radius: 8px;
color: var(--text-muted);
font-size: 0.85rem;
cursor: pointer;
}
.dissent-btn:hover {
border-color: var(--verde);
color: var(--verde);
}
/* Header */
.app-header {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 20px;
padding-bottom: 12px;
border-bottom: 2px solid var(--verde);
}
.app-header h1 {
margin: 0;
font-size: 1.5rem;
}
.flag {
display: inline-flex;
width: 32px;
height: 22px;
border-radius: 3px;
overflow: hidden;
}
.flag span {
flex: 1;
}
.flag .green { background: var(--verde); }
.flag .white { background: var(--bianco); border: 1px solid #ddd; }
.flag .red { background: var(--rosso); }