body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #0f172a;
    color: white;
}

/* APP */
#app {
    max-width: 500px;
    margin: auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.header {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    background: #1e293b;
}

/* SCREENS */
.screen {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.active {
    display: block;
}

/* BUTTONS */
button {
    width: 100%;
    padding: 12px;
    margin: 5px 0;
    border: none;
    border-radius: 10px;
    background: #3b82f6;
    color: white;
    font-size: 16px;
}

/* BACK */
.back {
    width: auto;
    margin-bottom: 10px;
}

/* CARDS */
.card {
    background: #1e293b;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* CHAT */
.messages {
    height: calc(100vh - 140px);
    overflow-y: auto;
}

/* INPUT */
.inputBar {
    display:flex;
    gap:8px;
    align-items:center;
}

.inputBar input {
    flex:1;

    padding:12px;

    border-radius:12px;
    border:none;

    font-size:15px;
}
.inputBar button{
    width:56px;

    flex-shrink:0;

    padding:12px;

    border-radius:12px;
}
.msg {
    padding: 8px 12px;
    margin: 5px;
    border-radius: 10px;
    max-width: 70%;
}

.me {
    background: #3b82f6;
    margin-left: auto;
}

.other {
    background: #1e293b;
    margin-right: auto;
}

/* AUTH PAGE */
.auth-box {
    max-width: 340px;
    margin: 80px auto;
    padding: 20px;
    background: #1e293b;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* поля */
.auth-box input {
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-size: 15px;
}

/* кнопки только внутри auth */
.auth-box button {
    width: auto;              /* 🔥 убираем растягивание */
    padding: 10px;
    border-radius: 10px;
}

/* блок соц-кнопок */
.auth-social {
    display: flex;
    gap: 10px;
}

.auth-social button {
    flex: 1;                  /* равные кнопки */
    background: #334155;
}
/* уведомления */
.notification {
    background: #111;
    color: white;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Войти с помощью */
.auth-social-title {
    margin-top: 20px;
    margin-bottom: 10px;

    text-align: center;

    opacity: 0.8;
    font-size: 14px;
}

/* ФОТО АНКЕТ */
/* ГЛАВНОЕ ФОТО */
.main-media{
    width:100%;
    height:320px;

    object-fit:contain;

    border-radius:16px;

    display:block;

    background:#111827;
}

/* ПРЕВЬЮ */
.media-thumbs{
    display:flex;
    gap:8px;

    overflow-x:auto;

    margin-top:8px;
    padding-bottom:4px;
}

.media-thumb{
    width:70px;
    height:70px;

    object-fit:cover;

    border-radius:12px;

    flex-shrink:0;

    cursor:pointer;

    border:2px solid transparent;
}

.media-thumb:hover{
    border-color:#3b82f6;
}

/* FULLSCREEN VIEWER */
.media-viewer{
    position:fixed;
    inset:0;

    background:rgba(0,0,0,0.95);

    z-index:99999;

    display:none;

    align-items:center;
    justify-content:center;

    padding:10px;
}

.viewer-content{
    max-width:100%;
    max-height:100%;

    border-radius:12px;
}

/* EMOJI POPUP */

.emoji-popup{

    position:fixed;

    bottom:80px;
    left:50%;

    transform:translateX(-50%);

    z-index:9999;

    display:none;

    width:350px;
    max-width:95vw;

    border-radius:16px;

    overflow:hidden;

    box-shadow:0 10px 30px rgba(0,0,0,0.5);
}

.emoji-popup.show{
    display:block;
}