body {
    font-family: Arial;
    text-align: center;
    background-color: #f0f0f0;
}

#gifContainer img {
    margin: 10px;
    width: 200px;
}
/* ТЕМЫ */
body.light {
    background-color: #f0f0f0;
    color: #000;
}

body.dark {
    background-color: #0b0c1a;
    background-image:
            radial-gradient(white 1px, transparent 1px),
            radial-gradient(white 1px, transparent 1px);
    background-size: 50px 50px, 100px 100px;
    background-position: 0 0, 50px 50px;
    color: #fff ;
}

@keyframes starsMove {
    from { background-position: 0 0, 50px 50px; }
    to { background-position: 100px 100px, 150px 150px; }
}

body.dark {
    animation: starsMove 200s linear infinite;
}


/* КНОПКА */
#themeToggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 60px;
    height: 30px;
    background-color: #ccc;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s;
}

/* КРУЖОК */
#circle {
    width: 26px;
    height: 26px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

/* АКТИВНОЕ СОСТОЯНИЕ */
body.dark #themeToggle {
    background-color: #333;
}

body.dark #circle {
    transform: translateX(30px);
}

/* HOVER подсказка (дополнительно можно улучшить) */
#themeToggle:hover::after {
    content: "Сменить тему";
    position: absolute;
    top: 40px;
    left: 0;
    background: black;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
}
#gifContainer img {
    margin: 10px;
    width: 200px;
    cursor: pointer;
    transition: transform 0.2s;
}

#gifContainer img:hover {
    transform: scale(1.1);
}
/* ЦЕНТР */
.search-box {
    margin-top: 80px;
}

/* ЗАГОЛОВОК */
.search-box h1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
}

/* СТРОКА */
.search-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* INPUT */
.search-bar input {
    width: 300px;
    padding: 12px 15px;
    border-radius: 25px;
    border: none;
    outline: none;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* КНОПКА */
.search-bar button {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    background: black;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

/* ЭФФЕКТЫ */
.search-bar button:hover {
    transform: scale(1.05);
}

.search-bar button:active {
    transform: scale(0.95);
}
body.dark .search-bar input {
    background: #1e1e1e;
    color: white;
}

body.dark .search-bar button {
    background: white;
    color: black;
}
/* Модальное окно */
.modal {
    display: none; /* Скрыта по умолчанию */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Гифка */
.modal img {
    max-width: 100%;
    max-height: 90%;
    border-radius: 10px;
    object-fit: contain;
}

/* ===== Модалка для авторизации ===== */
.auth-modal {
    display: none; /* только это оставить */
    position: fixed;
    z-index: 3000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);

    justify-content: center;
    align-items: center;
    pointer-events: auto;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease;
}

.auth-modal #authContent {
    background: linear-gradient(135deg, #ffffff, #f7f7f7);
    border-radius: 20px;
    width: 350px;
    max-width: 90%;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
    text-align: left;
    transition: all 0.3s;
    pointer-events: all;
}

body.dark .auth-modal #authContent {
    background: #1e1e1e;
    color: #fff;
}

/* Крестик закрытия */
#authClose {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
}

#authClose:hover {
    color: #ff416c;
}

/* Табы */
#authTabs {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

#authTabs button {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 10px 10px 0 0;
    background: #eee;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

#authTabs button:hover {
    background: #ddd;
}

#authTabs button.active {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
}

/* Формы */
.auth-modal input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid #ccc;
    outline: none;
    font-size: 16px;
    transition: all 0.2s;
}

.auth-modal input:focus {
    border-color: #ff416c;
    box-shadow: 0 0 8px rgba(255,65,108,0.5);
    background-color: #fff;
}

body.dark .auth-modal input {
    background: #2c2c2c;
    border: 1px solid #555;
    color: #fff;
}

.auth-modal input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid #ccc;
    outline: none;
    font-size: 16px;
    transition: all 0.2s;

    /* ✅ Новое свойство */
    box-sizing: border-box;
}

/* Кнопки регистрации/входа */
/* ===== Кнопки регистрации/входа ===== */
.auth-modal button {
    background: linear-gradient(135deg, #ff416c, #ff4b2b); /* обычный градиент */
    color: black; /* текст всегда чёрный */
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease; /* плавный переход */
    outline: none; /* убираем контур при фокусе */
}

/* Hover эффект */
.auth-modal button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #ff5b80, #ff5b40); /* чуть светлее при hover */
    color: black; /* текст остаётся читаемым */
}

/* Нажатие (active) */
.auth-modal button:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, #e03b5c, #e03b2b); /* немного темнее при клике */
    color: black; /* текст остаётся чёрным */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); /* лёгкая тень при нажатии */
}

.auth-modal p {
    font-size: 14px;
    color: #ff416c;
    min-height: 18px;
}

/* Скрытые формы */
.form {
    display: none;
}

/* Активная форма */
.form.active {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}
#profileContent {
    background: linear-gradient(135deg, #ffffff, #f7f7f7);
    border-radius: 20px;
    padding: 30px;
    width: 300px;
    text-align: center;
    position: relative;
}

body.dark #profileContent {
    background: #1e1e1e;
    color: white;
}

#profileContent button {
    margin-top: 10px;
}
/* ===== КРЕСТИК ПРОФИЛЯ ===== */
#profileClose {
    position: absolute;
    top: 15px;
    right: 20px;

    font-size: 32px; /* 🔥 БОЛЬШЕ */
    font-weight: bold;

    color: #888;
    cursor: pointer;

    transition: all 0.2s;
    z-index: 10;
}

/* ХОВЕР */
#profileClose:hover {
    color: #ff416c;
    transform: scale(1.2);
}

