:root {
  --body-color: 0,0,0;

  --bg-primary: 9,10,15;
  --bg-secondary: 9,10,15;
  --bg-tertiary: 39,39,39;

  --color: 223,223,223;
  --color-2: 165,172,185;
  --text-muted: 79,79,79;

  --accent: 27,144,246;

  --ring: 53,102,236;
  --border: 32,37,47;

  --text-success: 34,197,94;
  --text-danger: 239,68,68;
}

@font-face {
    font-family: 'base';
    src: url('/assets/fonts/basic.woff2') format('woff2');
         url('/assets/fonts/basic.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'base2';
    src: 
         url('/assets/fonts/Nunito-ExtraBold.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}


html, body {
    height: 100%;
    margin: 0;
}

.place{
    max-width: 560px;
    flex: 1 0 auto;
}

*{
    font-family: 'base2'!important;
}

body{
    background: rgb(var(--body-color));
    color: rgb(var(--color));

    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto; /* Растягивается, если нужно */
}

footer {
    flex-shrink: 0; /* Не сжимается */
}

a{
    color: rgb(var(--accent));
    text-decoration: none;
}

input[type="text"],input[type="password"],input[type="email"]{
    background: rgb(var(--bg-primary));
    color: rgb(var(--color));
    border: none;
    outline: none;
    padding: 16px 32px;
    border-radius: 16px;
}

button{
    background: rgb(var(--accent));
    color: #000;
    outline: none;
    border: none;
    padding: 16px 32px;
    border-radius: 16px;
}

/* Боковая панель для имитации интерфейса планшета */
.sidebar {
    width: 60px;
    min-width: 60px;
    border-radius: 1.2rem;
}

.sidebar-icon {
    width: 40px; 
    height: 40px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    border-radius: 12px;
    color: rgb(var(--text-muted));
    transition: 0.2s ease;
}

.sidebar-icon.active, .sidebar-icon:hover {
    background: rgb(var(--bg-tertiary));
    color: rgb(var(--color));
}

/* Фильтры (All, Family, Friends) */
.pill {
    padding: 8px 20px;
    border-radius: 20px;
    background: transparent;
    color: rgb(var(--text-muted));
    font-size: 14px;
    font-weight: bold;
}

.h-fix{
    height: stretch;
}

.pill.active {
    background: rgb(var(--color));
    color: rgb(var(--body-color));
}

/* Карточки контактов */
.contacts-wrapper {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.contact-card {
    min-width: 140px;
    height: 220px;
    background: rgb(var(--bg-secondary));
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
}

.contact-btn {
    background: rgb(var(--bg-tertiary));
    color: rgb(var(--color));
    border-radius: 12px;
    padding: 10px;
    width: 100%;
    margin-top: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

/* Замена фото на 123 */
.photo-123 {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 900;
    color: rgb(var(--bg-tertiary));
    z-index: 0;
    user-select: none;
}

.contact-info {
    z-index: 1;
    text-align: center;
}

/* Bento Grid (Сетка виджетов) */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 100px;
    gap: 16px;
}

.bento-item {
    background: rgb(var(--bg-secondary));
    border-radius: 1.2rem;
    padding: 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Размеры ячеек */
.span-row-2 { grid-row: span 2; }
.span-row-3 { grid-row: span 3; }
.span-col-2 { grid-column: span 2; }

/* Кастомные цвета для виджетов как на скрине */
.bg-weather { background: rgb(var(--accent)); }
.bg-dusk { background: #F8F9FA; color: #000; }
.bg-birthday { background: #FFD166; color: #000; }
.bg-discover { background: #EF4444; color: #FFF; }