/* ПЕРЕМЕННЫЕ ЦВЕТОВ (Светлая тема по умолчанию) */
:root {
    --bg-page: #ebedf0;
    --bg-app: #ffffff;
    --bg-header: #ffffff;
    --text-main: #333333;
    --text-muted: #888888;
    --border-color: #e5e5e5;
    --bg-answer: #f5f5f5;
    --bg-badge: #ffffff;
    --border-badge: #dddddd;
    --text-badge: #555555;
    --bg-modal: #ffffff;
    --bg-modal-btn: #f5f5f5;
    --hover-badge: #f0f0f0;
}

/* ТЕМНАЯ ТЕМА */
body.dark-theme {
    --bg-page: #000000;
    --bg-app: #121212;
    --bg-header: #121212;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --border-color: #2a2a2a;
    --bg-answer: #1e1e1e;
    --bg-badge: #1e1e1e;
    --border-badge: #333333;
    --text-badge: #e0e0e0;
    --bg-modal: #1e1e1e;
    --bg-modal-btn: #2a2a2a;
    --hover-badge: #2a2a2a;
}

body {
    background-color: var(--bg-page);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    margin: 0;
    display: flex;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.app-container {
    width: 100%;
    max-width: 650px;
    background: var(--bg-app);
    min-height: 100vh;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    position: relative;
    transition: background-color 0.3s ease;
}

/* ШАПКА И КНОПКА ТЕМЫ */
.header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-header);
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center; /* Заголовок по центру */
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header h1 {
    font-size: 16px;
    margin: 0;
    font-weight: 600;
}

.theme-toggle {
    position: absolute;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 50%;
    transition: color 0.3s;
}

.theme-toggle:hover {
    color: #337ab7;
}

.feed-container {
    padding: 0;
    padding-bottom: 80px;
}

/* ОРИГИНАЛЬНЫЕ КЛАССЫ FUNPAY (Адаптированные под переменные) */
.review-item {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.review-item-row { margin-bottom: 10px; }

.review-item-user {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 15px;
}

.review-item-photo { margin-right: 15px; }

.review-item-photo img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.user-meta {
    display: flex;
    flex-direction: column;
}

.review-item-date { font-size: 14px; color: var(--text-main); }
.review-item-detail { font-size: 14px; color: var(--text-muted); }

.review-item-rating {
    margin-left: auto;
    color: #ffc107;
    font-size: 16px;
    letter-spacing: 2px;
}

.review-item-text {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-main);
    margin-bottom: 15px;
}

.h5.mb5 {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 5px;
    margin-top: 15px;
    font-weight: bold;
}

.review-item-answer {
    background: var(--bg-answer);
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-main);
}

/* РЕАКЦИИ */
.reactions-bar {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.reaction-badge {
    display: inline-flex;
    align-items: center;
    background: var(--bg-badge);
    border: 1px solid var(--border-badge);
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 13px;
    color: var(--text-badge);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, border-color 0.3s;
}

.reaction-badge:hover { background: var(--hover-badge); }
.reaction-badge:active { transform: scale(0.95); }

.seller-link {
    font-size: 13px;
    color: #337ab7;
    text-decoration: none;
    display: inline-block;
    margin-top: 15px;
}
.seller-link:hover { text-decoration: underline; }

.loading, .error {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

/* ПЛАВАЮЩАЯ КНОПКА ДОБАВЛЕНИЯ */
.floating-add-btn {
    position: fixed;
    bottom: 20px;
    right: 50%;
    transform: translateX(300px);
    width: 56px;
    height: 56px;
    background-color: #337ab7;
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(51, 122, 183, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 100;
}

@media (max-width: 650px) {
    .floating-add-btn { right: 20px; transform: none; }
    .floating-add-btn:active { transform: scale(0.9); }
}

.floating-add-btn:hover { background-color: #286090; }
.floating-add-btn:active { transform: translateX(300px) scale(0.9); }

/* МОДАЛЬНОЕ ОКНО */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--bg-modal);
    width: 100%;
    max-width: 340px;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.modal-content h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: var(--text-main);
}

.modal-content p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.modal-btn-download {
    display: block;
    background: #337ab7;
    color: #fff;
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 10px;
}

.modal-btn-close {
    background: var(--bg-modal-btn);
    color: var(--text-main);
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
