body {
    font-family: 'Roboto', sans-serif;
    background-color: #0e0e10;
    color: #dad8de;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 20px auto;
}

h1 {
    color: #9147ff;
}

.button {
    background-color: #9147ff;
    color: #dad8de;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    margin: 10px;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.special-button {
    margin-bottom: 8px;
    display: block;
}

.blackout-row {
    background-color: #000000;
    color: #000000;
}

.button:hover {
    background-color: #bf94ff;
}

.hidden {
    display: none;
}

/* --- Команды (сворачивающиеся блоки) --- */
.collapsible {
    background-color: #18181b;
    color: #bf94ff;
    cursor: pointer;
    padding: 15px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: background-color 0.3s;
}

.collapsible.active,
.collapsible:hover {
    background-color: #23232e;
}

.content {
    max-height: 0;
    padding: 0 15px;
    overflow: hidden;
    background-color: #0e0e10;
    border-radius: 8px;
    transition: max-height 0.5s ease-out, padding 0.5s ease;
}

.content.open {
    max-height: 1500px;
    padding: 15px;
}

.command {
    background-color: #18181b;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-align: left;
}

.command-header {
    font-weight: bold;
    color: #9147ff;
    text-align: left;
}

.description {
    margin-top: 10px;
    text-align: left;
}

/* --- Поисковый инпут --- */
.search-input {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    width: calc(100% - 40px);
    max-width: 400px;
}

/* ===========================
   ОСНОВНАЯ ТАБЛИЦА 7TV
   =========================== */

#emoteStatsTable {
    width: 600px;           
    table-layout: fixed;   
    margin: 20px auto;     
    border-collapse: collapse;
}

#emoteStatsTable,
#emoteStatsTable th,
#emoteStatsTable td {
    border: 1px solid #18181b;
}

#emoteStatsTable th,
#emoteStatsTable td {
    padding: 15px;
    text-align: left;
    overflow: hidden; 
    white-space: nowrap; 
    text-overflow: ellipsis;
}

/* Шапка */
#emoteStatsTable th {
    background-color: #18181b;
    color: #bf94ff;
}

/* Содержимое ячеек */
#emoteStatsTable td {
    background-color: #23232e;
}


#emoteStatsTable th:nth-child(1),
#emoteStatsTable td:nth-child(1) {
    width: 10px;
    text-align: center;
}

#emoteStatsTable th:nth-child(2),
#emoteStatsTable td:nth-child(2) {
    width: 40px;
    text-align: center;
}

#emoteStatsTable th:nth-child(3),
#emoteStatsTable td:nth-child(3) {
    width: 60px;
}

#emoteStatsTable th:nth-child(4),
#emoteStatsTable td:nth-child(4) {
    width: 60px;
    text-align: center;
}


#emoteStatsTable td.name-column {
    max-width: 200px; 
}

/* ===========================
   ТАБЛИЦА АРХИВНЫХ ДАННЫХ
   =========================== */

#archiveStatsContainer {
    display: flex;
    justify-content: center; 
    padding: 20px; 
}

#archiveStatsTable {
    table-layout: fixed; 
    width: 100%; 
    max-width: 500px;
    border-collapse: collapse; 
    background-color: #23232e;
}

#archiveStatsTable th,
#archiveStatsTable td {
    border: 1px solid #18181b; 
    padding: 8px; 
    text-align: left; 
    color: #dad8de; 
    overflow: hidden; 
    white-space: nowrap;
    text-overflow: ellipsis; 
}

#archiveStatsTable th {
    background-color: #18181b;
    color: #bf94ff; 
}

#archiveStatsTable td.number-column {
    width: auto; 
    text-align: center; 
}

#archiveStatsTable th.number-column {
    width: auto; 
    text-align: center; 
}

#archiveStatsTable td.name-column {
    width: auto; 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#archiveStatsTable th.name-column {
    width: auto; 
}

#archiveStatsTable td.second-number-column {
    width: auto; 
    text-align: center; 
}

#archiveStatsTable th.second-number-column {
    width: auto;
    text-align: center; 
}

#archiveStatsContainer {
    overflow-x: auto;
}

/* ===========================
   ТАБЛИЦА AIRTABLE
   =========================== */

#airtableDataTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    table-layout: auto;
    border-radius: 8px;
    overflow: hidden;
}

#airtableDataTable th,
#airtableDataTable td {
    padding: 15px;
    text-align: left;
    word-wrap: break-word;
    border-bottom: 1px solid #41414D;
}

#airtableDataTable th {
    background-color: #18181b;
    color: #bf94ff;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 2px solid #9147ff;
}

#airtableDataTable td.date-column {
    width: 25%;
}

#airtableDataTable td {
    background-color: #23232e;
    border-right: 1px solid #41414D;
}

#airtableDataTable tr:last-child td {
    border-bottom: none;
}

#airtableDataTable td:last-child {
    border-right: none;
}

#airtableDataTable tr:hover {
    background-color: #2c2c36;
}

#airtableDataTable td.name-column {
    width: 100%; 
    white-space: normal; 
}

#airtableDataTable td.tags-column .tag {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    margin-right: 5px;
    margin-bottom: 5px;
}

#airtableDataContainer {
    overflow-x: auto;
}

.tag-фильм {
    background-color: #850101;
}

.tag-аниме {
    background-color: #9b00a3;
}

.tag-сериал {
    background-color: #008b87;
}

.tag-игра {
    background-color: #856a00;
}

.tag-мульт {
    background-color: #000275;
}

.link-button {
    background-color: #9147ff;
    color: #dad8de;
    padding: 5px 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
}

.link-button:hover {
    background-color: #bf94ff;
}

.note {
    margin-top: 20px;
    background-color: #18181b;
    color: #bf94ff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    text-align: left;
    position: absolute;
    top: 140px;
    right: 20px;
}

/* --- Адаптивность --- */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        max-width: 100%;
        margin: 10px auto;
        padding: 0 10px;
    }

    h1 {
        font-size: 1.8em;
    }

    .button {
        display: block;
        width: 100%;
        margin: 10px 0;
        font-size: 16px;
    }

    .collapsible {
        font-size: 16px;
        padding: 10px;
    }

    .command {
        padding: 10px;
    }

    .search-input {
        width: calc(100% - 20px);
        max-width: 100%;
    }

    #emoteStatsTable,
    #emoteStatsTable th,
    #emoteStatsTable td,
    #archiveStatsTable th,
    #archiveStatsTable td,
    #airtableDataTable th,
    #airtableDataTable td {
        font-size: 14px;
        padding: 8px;
    }

    .note {
        position: relative;
        top: 20px;
        right: 0;
        max-width: 100%;
    }

    /* Настройка столбцов для мобильных устройств */
    #archiveStatsTable th.name-column,
    #archiveStatsTable td.name-column,
    #archiveStatsTable th.date-column,
    #archiveStatsTable td.date-column,
    #archiveStatsTable th.status-column,
    #archiveStatsTable td.status-column,
    #airtableDataTable td.number-column,
    #airtableDataTable td.link-column,
    #airtableDataTable td.tags-column {
        width: auto;
    }
}

/* ===========================
   ТАБЛИЦА ЧАТА
   =========================== */
#chatStatsTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#chatStatsTable,
#chatStatsTable th,
#chatStatsTable td {
    border: 1px solid #18181b;
}

#chatStatsTable th,
#chatStatsTable td {
    padding: 15px;
    text-align: left;
}

#chatStatsTable th {
    background-color: #18181b;
    color: #bf94ff;
}

#chatStatsTable td {
    background-color: #23232e;
}

/* ===========================
   СНЕЖИНКИ 
   =========================== */
.snowflake {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    user-select: none;
    pointer-events: none;
    color: #fff;
    opacity: 0;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-fill-mode: forwards;
}

/* ===========================
   ASCII РИСУНКИ
   =========================== */
.ascii-image {
    background-color: #18181b;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-align: left;
    color: #dad8de;
}

.ascii-image h3 {
    color: #9147ff;
    margin-top: 0;
}

.ascii-image pre {
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 60ch; 
    color: #dad8de;
    margin: 0 auto;
    text-align: center;
}
