brainstorm-ui / src /styles /global.css
hsila's picture
style: fix responsive layout issues for category buttons and header
d7eb2df
:root {
color-scheme: dark;
font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
background-color: #0d1117;
color: #f0f6fc;
}
body {
margin: 0;
min-height: 100vh;
background: radial-gradient(circle at top, rgba(88, 166, 255, 0.08), transparent 55%), #0d1117;
}
main {
max-width: 1040px;
margin: 0 auto;
padding: clamp(16px, 5vw, 40px);
}
h1,
h2,
h3,
h4 {
font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
color: #f0f6fc;
margin: 0;
}
p {
margin: 0;
color: #c9d1d9;
}
.app-header {
margin-bottom: clamp(24px, 5vw, 40px);
}
.app-header h1 {
font-size: clamp(1.75rem, 3vw, 2.25rem);
display: flex;
align-items: center;
gap: 0.6rem;
}
.app-header h1 span {
font-size: 1.8rem;
}
.app-header p {
margin-top: 10px;
max-width: 100%;
line-height: 1.7;
}
.control-panel,
.pagination-panel {
background: rgba(22, 27, 34, 0.92);
border: 1px solid #30363d;
border-radius: 14px;
padding: clamp(16px, 4vw, 24px);
margin-bottom: clamp(20px, 4vw, 32px);
box-shadow: 0 10px 30px rgba(2, 12, 27, 0.35);
}
.control-panel h2 {
font-size: 1.1rem;
margin-bottom: 16px;
}
.field {
display: flex;
flex-direction: column;
gap: 12px;
margin-bottom: 18px;
}
.field:last-of-type {
margin-bottom: 0;
}
.field-label {
font-weight: 600;
color: #9ebdf2;
text-transform: uppercase;
font-size: 0.75rem;
letter-spacing: 0.08em;
}
.radio-group,
.per-page-group {
display: flex;
flex-wrap: wrap;
gap: 20px !important;
}
.radio-pill input,
.per-page-option input {
display: none;
}
.radio-pill span,
.per-page-option span {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 10px 20px;
border-radius: 30px;
border: 1px solid #30363d;
background: rgba(15, 18, 25, 0.85);
color: #c9d1d9;
font-size: 0.9rem;
cursor: pointer;
transition: border 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
min-width: 100px;
max-width: 200px;
}
.radio-pill input:checked + span,
.per-page-option input:checked + span {
border-color: #1f6feb;
color: #fff;
background: #1f6feb;
box-shadow: 0 6px 18px rgba(31, 111, 235, 0.28);
}
select,
button,
textarea {
font-family: inherit;
}
select {
padding: 10px 12px;
border-radius: 10px;
border: 1px solid #30363d;
background: rgba(15, 18, 25, 0.85);
color: #f0f6fc;
font-size: 0.95rem;
}
.cards {
display: grid;
gap: clamp(16px, 3vw, 24px);
}
.card {
border: 1px solid rgba(48, 54, 61, 0.85);
border-radius: 14px;
padding: clamp(18px, 3vw, 28px);
background: rgba(13, 17, 23, 0.92);
box-shadow: 0 18px 32px rgba(2, 12, 27, 0.45);
}
.card h3 {
font-size: 1.15rem;
color: #58a6ff;
margin-bottom: 14px;
}
.card-section {
border-top: 1px solid rgba(48, 54, 61, 0.7);
padding-top: 14px;
margin-top: 18px;
}
.card-section:first-of-type {
border-top: none;
padding-top: 0;
margin-top: 0;
}
.card-section h4 {
font-size: 0.95rem;
color: #79c0ff;
margin-bottom: 8px;
}
.card-section ul {
margin: 0;
padding-left: 20px;
color: #c9d1d9;
}
.card-section li {
margin-bottom: 6px;
line-height: 1.6;
}
.card-section p {
margin: 0;
line-height: 1.7;
}
.summary {
margin-bottom: clamp(16px, 3vw, 24px);
font-size: 0.95rem;
color: #9ebdf2;
}
.pagination-panel {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
}
.pagination-panel button {
flex: none;
border: 1px solid #30363d;
background: rgba(15, 18, 25, 0.9);
color: #f0f6fc;
padding: 10px 20px;
border-radius: 10px;
font-weight: 600;
cursor: pointer;
transition: background 0.2s ease, border 0.2s ease;
}
.pagination-panel button:hover:not([disabled]) {
border-color: #1f6feb;
color: #fff;
}
.pagination-panel button[disabled] {
opacity: 0.45;
cursor: not-allowed;
}
.page-info {
flex: 1;
text-align: center;
font-size: 0.95rem;
color: #c9d1d9;
}
@media (max-width: 720px) {
.pagination-panel {
flex-direction: column;
align-items: stretch;
}
.pagination-panel button {
width: 100%;
}
.page-info {
width: 100%;
text-align: center;
}
}
/* User section styles */
.user-section {
margin-top: 1.5rem;
padding-top: 1.5rem;
border-top: 1px solid #30363d;
display: flex;
justify-content: space-between;
align-items: center;
}
.user-info {
display: flex;
align-items: center;
gap: 1rem;
}
.user-name {
color: #c9d1d9;
font-size: 0.9rem;
}
.logout-btn {
background-color: #da3633;
color: white;
border: none;
border-radius: 6px;
padding: 0.5rem 1rem;
font-size: 0.875rem;
cursor: pointer;
transition: background-color 0.2s ease;
}
.logout-btn:hover {
background-color: #b91c1c;
}
.login-btn-header {
background-color: #238636;
color: white;
border: none;
border-radius: 6px;
padding: 0.75rem 1.5rem;
font-size: 0.9rem;
cursor: pointer;
transition: background-color 0.2s ease;
}
.login-btn-header:hover {
background-color: #2ea043;
}
/* Task card styles with toggle */
.card {
background-color: #161b22;
border: 1px solid #30363d;
border-radius: 12px;
padding: 1.5rem;
margin-bottom: 1rem;
transition: all 0.2s ease;
}
.card.completed {
background-color: rgba(35, 134, 54, 0.1);
border-color: rgba(35, 134, 54, 0.3);
}
.card.completed h3 {
color: #3fb950;
}
.card-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 1rem;
gap: 1rem;
}
.task-toggle {
display: flex;
align-items: center;
flex-shrink: 0;
}
.task-checkbox {
display: none;
}
.toggle-label {
display: flex;
align-items: center;
gap: 0.5rem;
cursor: pointer;
user-select: none;
}
.toggle-slider {
width: 44px;
height: 24px;
background-color: #30363d;
border-radius: 12px;
position: relative;
transition: background-color 0.2s ease;
}
.toggle-slider::before {
content: '';
position: absolute;
width: 18px;
height: 18px;
background-color: #f0f6fc;
border-radius: 50%;
top: 3px;
left: 3px;
transition: transform 0.2s ease;
}
.task-checkbox:checked + .toggle-label .toggle-slider {
background-color: #238636;
}
.task-checkbox:checked + .toggle-label .toggle-slider::before {
transform: translateX(20px);
}
.toggle-text {
font-size: 0.875rem;
color: #8b949e;
transition: color 0.2s ease;
}
.task-checkbox:checked + .toggle-label .toggle-text {
color: #3fb950;
font-weight: 500;
}
@media (max-width: 540px) {
main {
padding: clamp(14px, 6vw, 28px);
}
.control-panel,
.pagination-panel {
padding: clamp(14px, 6vw, 20px);
}
.radio-group,
.per-page-group {
flex-direction: column;
gap: 12px;
}
.radio-pill span,
.per-page-option span {
width: 100%;
justify-content: center;
}
.card-header {
flex-direction: column;
align-items: stretch;
}
.task-toggle {
align-self: flex-end;
}
.user-section {
flex-direction: column;
gap: 1rem;
align-items: stretch;
}
.user-info {
justify-content: center;
}
}
@media (max-width: 541px) {
.radio-group {
flex-direction: column;
gap: 12px;
}
}
/* Main content visibility for authentication */
.main-content {
display: none;
}
.main-content.authenticated {
display: block;
}