/* ===== Основные контейнеры ===== */
.app-page {
    margin: 20px auto;
}

.app-page ul {
    margin: 1em 0 1.5em 1.5em;
    padding: 0;
    list-style: none
}

.app-page ul li {
    position: relative;
    padding-left: 1.8em;
}

.app-page ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 5px;
    height: 5px;
    background-color: #0077ff;
    border-radius: 50%;
}

.single-app-card {
    margin: 0 auto;
    padding: 20px;
    border-radius: 12px;
    background: var(--bg-card-color);
    border: 1px solid var(--border-card);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ===== Заголовок приложения ===== */
.app-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--border-card);
}

.single-app-logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
}

.app-header-text {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.single-app-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}


.app-short-desc {
    font-size: 14px;
    line-height: 1.4;
}

.app-description {
	border-bottom: 1px solid var(--border-card);
	text-align: justify;
}

/* ===== Кнопка Telegram ===== */
.btn-tg-group {
    display: flex;
    flex-direction: column; /* вертикально */
    gap: 10px; /* расстояние между кнопками */
    min-width: 200px; /* чтобы не были слишком узкие */
}

.btn-tg {
    display: flex;
    justify-content: center; /* текст и иконка по центру */
    align-items: center;
    gap: 6px;
    width: 100%; /* растянуть на всю ширину */
    background: #2f87fa;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
    box-sizing: border-box;
}
.btn-tg:hover {
    background: #1a5fcc;
}
.btn-tg .btn-tg-icon {
    width: 16px;
    height: 16px;
    filter: invert(100%);
}

.instr{
	text-align:center;
}

/* ===== Категории и теги ===== */
.cat-badge {
    background: #e0f0ff;
    color: #2f87fa;
    padding: 4px 10px;
    margin: 2px 4px 2px 0;
    border-radius: 8px;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}
.cat-badge:hover,
.tag-badge:hover {
    background: #2f87fa;
    color: #fff;
}

.app-tags-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    line-height: 1.35;
    padding-top: 1em;
    border-top: 1px solid var(--border-card);
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 8px;
    background: #e0f0ff;
    color: #2f87fa;
    text-decoration: none;
    white-space: nowrap;
    font-size: 13px;
}

/* ===== Блок похожих приложений ===== */
.related-apps {
    margin: 40px auto;
}
.related-apps h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: stretch;
}

.related-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.related-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    background: var(--bg-card-color);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
    animation-delay: calc(var(--i) * 0.1s);
}
.related-card:hover {
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    background: var(--bg-card-color-hover, #f5f5f5);
}

.related-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
}

.related-title {
    font-size: 16px;
    font-weight: 600;
    margin: 8px 0 4px;
    flex-shrink: 0;
}

.related-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-top: auto;
}

/* ===== Анимация ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Модальное окно ===== */
.modal-wrapper {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-overlay);
	transition: opacity 0.3s ease;
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-card-color);
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    font-family: 'Roboto', sans-serif;
    position: relative;
    font-size: 1rem;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: #888;
    cursor: pointer;
}
.modal-close:hover { color: var(--text-color); }

.modal-header { padding: 0 20px; }
.modal-title {
    font-size: 20px;
    padding: 15px 0;
    font-weight: 100;
}
.modal-separator {
    margin: 0 0 20px;
    border: none;
    border-bottom: 1px solid var(--border-card);
}

.modal-body { padding: 0 20px 0; }
.modal-footer {
    padding: 0 20px 20px;
    display: flex;
    gap: 10px;
}
.modal-footer button {
    flex: 1 1 50%;
    padding: 10px;
    font-size: 14px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

/* ===== Форма жалобы ===== */
#complaint-form button {
    display: inline-block;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 4px;
    padding: 0.5em 1em;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}
#complaint-form button[type="submit"],
#complaint-success-modal button[type="button"] {
    background-color: #08c;
    color: #fff;
}
#complaint-form button[type="submit"]:hover,
#complaint-success-modal button[type="button"]:hover {
    background-color: #0078b0;
}
#complaint-form button[type="button"] {
    background-color: #e9e9e9;
    color: #495057;
}
#complaint-form button[type="button"]:hover {
    background-color: #d1d3d8;
}

#complaint-form input[type="email"] {
    width: 100%;
    font-size: 1rem;
    padding: 0.625em;
    border: 1px solid #dbdbdb;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: 'Roboto', sans-serif;
    margin-bottom: 1rem;
	background: var(--bg-card-color);
	color: var(--text-color);
}
#complaint-form input[type="email"]:hover {
    border-color: #b5b5b5;
}
#complaint-form input[type="email"]:focus {
    outline: none;
    border-color: #3273dc;
    box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25);
}

#complaint-form select,
#complaint-form textarea {
    width: 100%;
    font-size: 1rem;
    padding: 0.625em;
    border: 1px solid #dbdbdb;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: 'Roboto', sans-serif;
	background: var(--bg-card-color);
	color: var(--text-color);
}
#complaint-form select { margin-bottom: 1rem; }
#complaint-form textarea {
    resize: vertical;
    min-height: 120px;
}
#complaint-form select:hover,
#complaint-form textarea:hover { border-color: #b5b5b5; }
#complaint-form select:focus,
#complaint-form textarea:focus {
    outline: none;
    border-color: #3273dc;
    box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25);
}

.hidden-check-field {
    position: absolute !important;
    left: -9999px;
    top: -9999px;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    margin: .5rem 0 .5rem;
    font-family: 'Roboto', sans-serif;
	background: var(--bg-card-color);
	color: var(--text-color);
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}
.checkbox-label:hover { border-color: #b5b5b5; }
.checkbox-label input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    margin: 0;
}
.checkbox-label input[type="checkbox"]::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    background-color: #08c;
    position: absolute;
    top: 3px;
    left: 3px;
    transform: scale(0);
    transition: transform 0.2s ease-in-out;
    border-radius: 2px;
}
.checkbox-label input[type="checkbox"]:checked::before {
    transform: scale(1);
}
.checkbox-label input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25);
    border-color: #08c;
}

#complaint-error {
    font-size: 0.9rem;
    color: #d93025;
    margin-bottom: 1rem;
}

/* ===== Уведомления ===== */
.complaint-alert {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 20px 0;
    font-size: 15px;
    box-sizing: border-box;
    gap: 12px;
}
.complaint-alert-text { flex: 1; }

.complaint-open-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}
.complaint-open-btn:hover { background: #c82333; }

/* ===== Адаптив ===== */
@media(max-width:1024px){
    .related-grid { grid-template-columns: repeat(3, 1fr); }
}
@media(max-width:700px){
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .app-tags-block{ gap: 8px 10px; }
    .app-header-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .app-title { font-size: 20px; }
    .app-logo { width: 70px; height: 70px; }
	.btn-tg-group {width:100%}
    .btn-tg { width: 100%; justify-content: center; }
    .tag-badge,
    .category-badge {
        margin: 6px 6px 6px 0;
        font-size: 15px;
    }
}
@media(max-width:600px){
    .complaint-alert {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .complaint-open-btn { width: 100%; }
}
@media(max-width:500px){
    .related-grid { grid-template-columns: 1fr; }
}
