.support-container {
    width: calc(100% - 40px);
    max-width: 1100px;
    margin: 40px auto;
    padding: 30px;
    box-sizing: border-box;
    color: #e8e3d8;
}

.support-panel {
    width: 100%;
    background: #171717;
    border: 1px solid #34302a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-sizing: border-box;
}

.support-panel h2,
.support-panel h3 {
    color: #d6b36a;
    margin-top: 0;
}

.support-description {
    color: #aaa49a;
    font-size: 14px;
    line-height: 1.6;
}

.support-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.support-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.support-field label {
    color: #d6c49e;
    font-size: 14px;
    font-weight: 600;
}

.support-field input,
.support-field select,
.support-field textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    border: 1px solid #454039;
    border-radius: 7px;
    background: #101010;
    color: #eee8dc;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.support-field input:focus,
.support-field select:focus,
.support-field textarea:focus {
    border-color: #b8944e;
    box-shadow: 0 0 0 2px rgba(184, 148, 78, 0.12);
}

.support-field textarea {
    min-height: 130px;
    resize: vertical;
}

.support-field input[type="file"] {
    padding: 10px;
}

.support-field small {
    color: #8f8980;
    font-size: 12px;
}

.support-submit,
.support-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 12px 22px;
    border: 1px solid #b8944e;
    border-radius: 7px;
    background: linear-gradient(135deg, #b8944e, #8c6930);
    color: #17130d;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s ease;
}

.support-submit:hover,
.support-button:hover {
    background: linear-gradient(135deg, #d0ae68, #a9823d);
    transform: translateY(-1px);
}

.support-success,
.support-error {
    width: 100%;
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    box-sizing: border-box;
    font-size: 14px;
}

.support-success {
    color: #a9d9ad;
    background: rgba(49, 112, 59, 0.15);
    border: 1px solid rgba(82, 157, 92, 0.35);
}

.support-error {
    color: #e7a2a2;
    background: rgba(140, 42, 42, 0.15);
    border: 1px solid rgba(180, 65, 65, 0.35);
}

.support-ticket-list {
    width: 100%;
}

.support-ticket-table {
    width: 100%;
    border-collapse: collapse;
    color: #ddd5c7;
}

.support-ticket-table th,
.support-ticket-table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #34302a;
    font-size: 13px;
}

.support-ticket-table th {
    color: #c7a45f;
    font-weight: 700;
    background: #1d1b18;
}

.support-ticket-table tr:hover td {
    background: rgba(184, 148, 78, 0.05);
}

.ticket-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 13px;
    border: 1px solid #806638;
    border-radius: 6px;
    color: #d6b36a;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: 0.2s ease;
}

.ticket-action:hover {
    background: rgba(184, 148, 78, 0.12);
    border-color: #c7a45f;
}

.support-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.status-open {
    color: #d9c17e;
    background: rgba(184, 148, 78, 0.15);
}

.status-waiting_support {
    color: #e5b46d;
    background: rgba(196, 132, 48, 0.15);
}

.status-waiting_player {
    color: #8fc4e8;
    background: rgba(62, 133, 184, 0.15);
}

.status-closed {
    color: #aaa;
    background: rgba(130, 130, 130, 0.15);
}

.support-empty {
    padding: 25px;
    color: #928b80;
    text-align: center;
    font-size: 14px;
}

.ticket-page-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
    box-sizing: border-box;
}

.ticket-page-header h2 {
    margin: 0;
    color: #d6b36a;
    font-size: 25px;
}

.ticket-page-header p {
    margin: 8px 0 0;
    color: #aaa49a;
    font-size: 14px;
}

.ticket-header-title {
    min-width: 0;
}

.ticket-admin-header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 25px 15px;
}

.ticket-admin-header .ticket-header-title {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ticket-admin-header .ticket-header-title p,
.ticket-admin-header .ticket-header-title h2 {
    width: 100%;
    text-align: center;
}

.ticket-admin-header .ticket-header-title p {
    margin: 0;
}

.ticket-admin-header .ticket-header-title h2 {
    margin: 5px 0 0;
}

.support-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid #514735;
    border-radius: 7px;
    background: #201e1a;
    color: #d6b36a;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: 0.2s ease;
}

.support-back-button:hover {
    background: #30291e;
    border-color: #a8894e;
}

.ticket-details {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin: 0 0 25px;
    padding: 0;
    box-sizing: border-box;
}

.ticket-detail {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px;
    border: 1px solid #34302a;
    border-radius: 9px;
    background: #191816;
    box-sizing: border-box;
}

.ticket-detail > span {
    color: #9f9789;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticket-detail > strong {
    color: #e6dfd2;
    font-size: 14px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.ticket-subject {
    width: 100%;
    padding: 18px;
    margin-bottom: 25px;
    border: 1px solid #34302a;
    border-radius: 9px;
    background: #191816;
    box-sizing: border-box;
}

.ticket-subject span {
    display: block;
    margin-bottom: 8px;
    color: #9f9789;
    font-size: 12px;
    text-transform: uppercase;
}

.ticket-subject strong {
    color: #e6dfd2;
    font-size: 15px;
}

.ticket-conversation {
    width: 100%;
    margin: 0 0 25px;
    padding: 22px;
    border: 1px solid #34302a;
    border-radius: 10px;
    background: #171614;
    box-sizing: border-box;
}

.conversation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid #34302a;
}

.conversation-header h3 {
    margin: 0;
    color: #d6b36a;
    font-size: 18px;
}

.conversation-header span {
    color: #918a80;
    font-size: 12px;
}

.conversation-messages {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-sizing: border-box;
}

.message-item {
    width: fit-content;
    max-width: 85%;
    padding: 15px 17px;
    border: 1px solid #39342b;
    border-radius: 10px;
    background: #211f1b;
    box-sizing: border-box;
}

.message-player {
    align-self: flex-start;
    border-left: 3px solid #a8894e;
}

.message-admin {
    align-self: flex-end;
    border-right: 3px solid #638da9;
    background: #1b2023;
}

.message-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.message-heading strong {
    color: #d6b36a;
    font-size: 13px;
}

.message-admin .message-heading strong {
    color: #8fc4e8;
}

.message-heading span {
    color: #89837a;
    font-size: 11px;
}

.message-content {
    color: #ddd6ca;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.message-attachments {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 14px;
}

.ticket-image-link {
    display: inline-block;
    max-width: 100%;
}

.ticket-image-link img {
    display: block;
    max-width: 100%;
    width: auto;
    max-height: 300px;
    border: 1px solid #494237;
    border-radius: 8px;
    object-fit: contain;
}

.message-attachments > span {
    color: #928b80;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.ticket-reply-panel {
    width: 100%;
    padding: 22px;
    border: 1px solid #34302a;
    border-radius: 10px;
    background: #171614;
    box-sizing: border-box;
}

.ticket-reply-panel h3 {
    margin: 0 0 20px;
    color: #d6b36a;
    font-size: 18px;
}

.ticket-reply-panel form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.ticket-reply-panel textarea,
.ticket-reply-panel input[type="file"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.ticket-closed-notice {
    width: 100%;
    padding: 20px;
    border: 1px solid #514735;
    border-radius: 9px;
    background: #211e19;
    box-sizing: border-box;
}

.ticket-closed-notice strong {
    color: #d6b36a;
}

.ticket-closed-notice p {
    margin: 8px 0 0;
    color: #aaa49a;
    font-size: 13px;
}

.ticket-view-page {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ticket-view-page > .support-success,
.ticket-view-page > .support-error {
    margin-bottom: 18px;
}

@media (max-width: 800px) {
    .support-container {
        width: calc(100% - 30px);
        padding: 20px;
    }

    .support-ticket-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .ticket-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .ticket-admin-header {
        align-items: center;
        text-align: center;
    }

    .ticket-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 550px) {
    .support-container {
        width: calc(100% - 20px);
        padding: 15px;
        margin: 20px auto;
    }

    .support-panel {
        padding: 18px;
    }

    .ticket-details {
        grid-template-columns: 1fr;
    }

    .ticket-conversation,
    .ticket-reply-panel {
        padding: 15px;
    }

    .message-item {
        width: 100%;
        max-width: 100%;
    }

    .conversation-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .ticket-page-header h2 {
        font-size: 21px;
    }

    .support-submit {
        width: 100%;
    }
}