/* --- Support Page Modern Design --- */

:root {
    --mylands-color: #00c896;
    --mycommands-color: #5865f2;
    --myeconomy-color: #f1c40f;
    --mylands-glow: rgba(0, 200, 150, 0.4);
    --mycommands-glow: rgba(88, 101, 242, 0.4);
    --myeconomy-glow: rgba(241, 196, 15, 0.4);
}

.support-page-modern {
    padding-top: 6rem;
    min-height: 80vh;
    background: radial-gradient(circle at 10% 20%, rgba(88, 101, 242, 0.05), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 200, 150, 0.05), transparent 40%);
}

/* --- Hero --- */
.support-hero-modern {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.support-title-modern {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.support-subtitle-modern {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Support Grid --- */
.support-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* --- Support Card --- */
.support-card-modern {
    background: rgba(22, 27, 34, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.support-card-modern:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.support-card-modern.card-discord:hover {
    border-color: #5865F2;
    box-shadow: 0 10px 40px -10px rgba(88, 101, 242, 0.4);
}

.support-card-modern.card-spigot:hover {
    border-color: #ed8106;
    box-shadow: 0 10px 40px -10px rgba(237, 129, 6, 0.4);
}

.support-card-modern.card-tickets:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 40px -10px rgba(0, 200, 150, 0.4);
}

.support-icon-box {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
}

.support-card-modern:hover .support-icon-box {
    transform: rotate(10deg) scale(1.1);
    color: #fff;
}

.card-discord:hover .support-icon-box {
    background: #5865F2;
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.4);
}

.card-spigot:hover .support-icon-box {
    background: #ed8106;
    box-shadow: 0 0 20px rgba(237, 129, 6, 0.4);
}

.card-tickets:hover .support-icon-box {
    background: var(--accent);
    box-shadow: 0 0 20px rgba(0, 200, 150, 0.4);
}

.support-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.support-card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

/* --- Support Links (Spigot) --- */
.support-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}

.support-link-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-light);
    text-decoration: none !important;
    transition: all 0.3s ease;
    font-weight: 500;
}

.support-link-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
    color: #fff;
}

/* --- Ticket Form Section --- */
.ticket-form-section {
    background: rgba(22, 27, 34, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 3rem;
    backdrop-filter: blur(10px);
    max-width: 800px;
    margin: 0 auto 4rem;
}

.ticket-form-header {
    margin-bottom: 2rem;
    text-align: center;
}

.ticket-form-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-group-modern {
    margin-bottom: 1.5rem;
}

.form-label-modern {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control-modern {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.form-control-modern:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px rgba(0, 200, 150, 0.1);
}

textarea.form-control-modern {
    resize: vertical;
    min-height: 120px;
}

/* --- Form Components Refined --- */
select.form-control-modern {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
    cursor: pointer;
}

select.form-control-modern option {
    background-color: #1a1f29;
    color: #fff;
    padding: 10px;
}

/* Custom File Input Styling */
input[type="file"].form-control-modern {
    padding: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    height: auto;
    align-items: center;
    display: flex;
}

input[type="file"].form-control-modern::file-selector-button {
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 20px;
    margin-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
}

input[type="file"].form-control-modern:hover::file-selector-button {
    background: var(--accent);
    color: #fff;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.form-hint-modern {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- My Tickets List --- */
.my-tickets-section {
    max-width: 900px;
    margin: 0 auto;
}

.ticket-list-modern {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ticket-item-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: rgba(22, 27, 34, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.ticket-item-modern:hover {
    background: rgba(22, 27, 34, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.ticket-info-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ticket-status-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-open {
    background: rgba(0, 200, 150, 0.15);
    color: var(--accent);
    border: 1px solid rgba(0, 200, 150, 0.3);
}

.status-closed {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ticket-title-text {
    font-weight: 600;
    color: #fff;
    font-size: 1.05rem;
}

.ticket-meta-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Ticket Conversation View --- */
.ticket-view-header {
    background: linear-gradient(135deg, rgba(22, 27, 34, 0.9) 0%, rgba(22, 27, 34, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.ticket-view-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--secondary));
}

.ticket-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem !important;
    /* Override inline style */
    flex-wrap: wrap;
    gap: 15px;
}

.ticket-back.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 10px;
}

.ticket-back.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(-5px);
}

.ticket-header-meta {
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 12px !important;
    /* Override inline style */
}

.ticket-status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-open {
    background: rgba(0, 200, 150, 0.2);
    color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 200, 150, 0.1);
}

.status-closed {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.ticket-meta-divider {
    color: rgba(255, 255, 255, 0.1);
}

.ticket-view-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 0%, #ccc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.ticket-view-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}


.ticket-conversation-modern {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    /* Increased gap */
    max-width: 900px;
    margin: 0 auto 6rem;
    /* Added margin bottom to prevent overlap with sticky reply box */
}

.message-bubble {
    display: flex;
    gap: 1.5rem;
    max-width: 85%;
    /* Reduced width for cleaner look */
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-bubble.is-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    align-self: flex-start;
    /* Align to top */
    margin-top: 5px;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    min-width: 200px;
}

/* User Bubble Styles (Green/Accent) */
.is-user .message-content {
    background: linear-gradient(135deg, rgba(0, 200, 150, 0.1) 0%, rgba(0, 200, 150, 0.05) 100%);
    border-color: rgba(0, 200, 150, 0.2);
    border-radius: 18px 0 18px 18px;
}

/* Admin Bubble Styles (Blue/Discord) */
.is-admin .message-content {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.1) 0%, rgba(88, 101, 242, 0.05) 100%);
    border-color: rgba(88, 101, 242, 0.2);
    border-radius: 0 18px 18px 18px;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.is-user .message-header {
    flex-direction: row-reverse;
    border-bottom-color: rgba(0, 200, 150, 0.1);
}

.is-admin .message-header {
    border-bottom-color: rgba(88, 101, 242, 0.1);
}

.message-author {
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
}

.badge-role {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.badge-admin {
    background: #5865F2;
    color: white;
}

.message-date {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.message-text {
    line-height: 1.7;
    color: var(--text-light);
    white-space: pre-wrap;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Logs & Attachments in tickets */
.logs-block {
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.logs-summary {
    padding: 10px 15px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.2s;
}

.logs-summary:hover {
    background: rgba(0, 0, 0, 0.4);
}

.logs-content {
    padding: 15px;
    margin: 0;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #ccc;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.attachments-list {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.85rem;
    text-decoration: none !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.attachment-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Reply Box */
.reply-box-modern {
    background: rgba(22, 27, 34, 0.85);
    /* Increased opacity */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    position: relative;
    /* bottom: 30px;  Removed sticky positioning */
    /* Kept sticky but added bottom offset */
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    /* Stronger shadow to separate */
    z-index: 100;
}