Files
ruby-sea-battle/frontend/src/styles.css
T

345 lines
5.9 KiB
CSS

:root {
--bg: #f3f8fc;
--bg-accent: #e3eff8;
--primary: #2f80ed;
--primary-dark: #1d6bd8;
--primary-soft: #dbeafe;
--text: #1e3a5f;
--text-soft: #5b7a9d;
--danger: #e0483e;
--radius: 14px;
font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
background:
radial-gradient(1000px 500px at 80% -10%, var(--bg-accent), transparent),
radial-gradient(800px 400px at 10% 110%, #e8f6f3, transparent),
var(--bg);
color: var(--text);
min-height: 100vh;
}
.page {
min-height: 100vh;
display: flex;
flex-direction: column;
}
.menu {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 36px;
padding: 40px 20px 80px;
}
.title {
font-size: clamp(44px, 8vw, 84px);
font-weight: 800;
letter-spacing: 2px;
margin: 0;
color: var(--text);
text-shadow: 0 4px 0 rgba(47, 128, 237, 0.12);
}
.menu-buttons {
display: flex;
flex-direction: column;
gap: 18px;
width: min(360px, 90vw);
}
.btn {
border: none;
border-radius: var(--radius);
cursor: pointer;
font-family: inherit;
font-weight: 700;
transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn-big {
padding: 18px 28px;
font-size: 22px;
color: #fff;
background: linear-gradient(180deg, var(--primary), var(--primary-dark));
box-shadow: 0 6px 0 rgba(29, 107, 216, 0.35), 0 10px 20px rgba(47, 128, 237, 0.25);
}
.btn-big:hover {
transform: translateY(-2px);
box-shadow: 0 8px 0 rgba(29, 107, 216, 0.35), 0 14px 24px rgba(47, 128, 237, 0.3);
}
.btn-big:active {
transform: translateY(2px);
box-shadow: 0 3px 0 rgba(29, 107, 216, 0.35);
}
.btn-primary {
padding: 10px 22px;
font-size: 16px;
color: #fff;
background: var(--primary);
}
.btn-primary:hover {
background: var(--primary-dark);
}
.btn-primary:disabled {
opacity: 0.6;
cursor: default;
}
.join-section {
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
}
.join-label {
font-size: 17px;
font-weight: 600;
color: var(--text-soft);
letter-spacing: 0.5px;
}
.code-input-row {
display: flex;
align-items: center;
gap: 14px;
}
.code-inputs {
display: flex;
gap: 10px;
}
.code-cell {
width: 58px;
height: 68px;
font-size: 32px;
font-weight: 700;
text-align: center;
text-transform: uppercase;
color: var(--text);
background: #fff;
border: 2px solid #c9dcee;
border-radius: 12px;
outline: none;
transition: border-color 0.12s ease, box-shadow 0.12s ease;
caret-color: var(--primary);
}
.code-cell:focus {
border-color: var(--primary);
box-shadow: 0 0 0 4px var(--primary-soft);
}
.code-submit {
width: 58px;
height: 68px;
font-size: 30px;
border: none;
border-radius: 12px;
background: var(--primary);
color: #fff;
cursor: pointer;
transition: background 0.12s ease, transform 0.12s ease;
}
.code-submit:hover:not(:disabled) {
background: var(--primary-dark);
transform: translateX(2px);
}
.code-submit:disabled {
background: #b9cfe4;
cursor: default;
}
/* Профиль внизу */
.profile-bar {
display: flex;
justify-content: center;
align-items: center;
padding: 16px;
border-top: 1px solid rgba(30, 58, 95, 0.08);
background: rgba(255, 255, 255, 0.6);
backdrop-filter: blur(6px);
}
.profile-user {
display: flex;
align-items: center;
gap: 12px;
}
.profile-avatar {
width: 44px;
height: 44px;
border-radius: 50%;
object-fit: cover;
border: 2px solid #fff;
box-shadow: 0 2px 6px rgba(30, 58, 95, 0.2);
}
.profile-avatar-placeholder {
display: flex;
align-items: center;
justify-content: center;
background: var(--primary);
color: #fff;
font-weight: 700;
font-size: 20px;
}
.profile-name {
font-weight: 700;
font-size: 17px;
}
.profile-loading {
color: var(--text-soft);
}
.link-button {
background: none;
border: none;
color: var(--primary);
font-size: 15px;
cursor: pointer;
font-family: inherit;
padding: 4px 6px;
}
.link-button:hover {
text-decoration: underline;
}
/* Модальное окно */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(30, 58, 95, 0.35);
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
z-index: 10;
}
.modal {
position: relative;
background: #fff;
border-radius: 20px;
padding: 32px;
width: min(400px, 100%);
box-shadow: 0 20px 60px rgba(30, 58, 95, 0.3);
display: flex;
flex-direction: column;
gap: 16px;
}
.modal-close {
position: absolute;
top: 10px;
right: 14px;
background: none;
border: none;
font-size: 28px;
color: var(--text-soft);
cursor: pointer;
line-height: 1;
}
.modal-title {
margin: 0;
font-size: 26px;
text-align: center;
}
.auth-form {
display: flex;
flex-direction: column;
gap: 14px;
}
.field {
display: flex;
flex-direction: column;
gap: 6px;
font-size: 14px;
font-weight: 600;
color: var(--text-soft);
}
.field input[type='text'],
.field input[type='password'] {
padding: 12px 14px;
font-size: 16px;
border: 2px solid #c9dcee;
border-radius: 10px;
outline: none;
font-family: inherit;
}
.field input:focus {
border-color: var(--primary);
box-shadow: 0 0 0 4px var(--primary-soft);
}
.avatar-picker {
display: flex;
align-items: center;
gap: 12px;
}
.avatar-preview {
width: 56px;
height: 56px;
border-radius: 50%;
object-fit: cover;
border: 2px solid #c9dcee;
}
.avatar-placeholder {
display: flex;
align-items: center;
justify-content: center;
background: var(--primary-soft);
color: var(--primary);
font-size: 24px;
font-weight: 700;
}
.form-error {
background: #fdecea;
color: var(--danger);
padding: 10px 14px;
border-radius: 10px;
font-size: 14px;
}
@media (max-width: 480px) {
.code-cell {
width: 48px;
height: 58px;
font-size: 26px;
}
.code-submit {
width: 48px;
height: 58px;
}
}