* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navbar */
.navbar {
    background: rgb(26, 26, 26);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.nav-container {
    width: 100%;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-container h2 {
    color: #e8e8e8;
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.user-info {
    color: #e8e8e8;
    font-size: 0.9rem;
}

.nav-link {
    color: #e8e8e8;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.2s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Cards */
.login-card,
.ticket-form-card,
.error-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 50px auto;
    text-align: center;
}

.ticket-form-card {
    max-width: 800px;
    text-align: left;
}

.dashboard-header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
}

.form-group input[type="file"] {
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
}

.form-group input[type="file"]:focus {
    outline: none;
    border-color: #667eea;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #666;
}

.file-list {
    margin-top: 10px;
}

.file-list-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-list-items li {
    padding: 8px 12px;
    margin: 5px 0;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #667eea;
    font-size: 0.9rem;
    color: #333;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

/* Messages */
.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    text-align: left;
    margin-bottom: 20px;
}

/* Tickets List */
.tickets-list {
    display: grid;
    gap: 20px;
}

.tickets-section {
    margin-bottom: 30px;
}

.tickets-section h2 {
    color: white;
    margin-bottom: 12px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}

/* Compact row-based ticket list */
.ticket-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.ticket-row {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
    min-height: 0;
    position: relative;
}

.ticket-row:last-child {
    border-bottom: none;
}

.ticket-row:hover {
    background: #f7f8ff;
}

.ticket-row__indicator {
    flex-shrink: 0;
    width: 4px;
    align-self: stretch;
    background: transparent;
    transition: background 0.15s;
}

.ticket-row:hover .ticket-row__indicator {
    background: #667eea;
}

/* Green indicator for rows with a staff reply */
.ticket-row--has-reply .ticket-row__indicator {
    background: #22c55e;
}

.ticket-header-badges {
    display: flex;
    align-items: center;
    gap: 8px;

}

.ticket-reply-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.ticket-reply-badge__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;

}

.ticket-row__main {
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 14px;
    min-width: 0;
}

.ticket-row__title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-row__number {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: #999;
    font-weight: 400;
}

.ticket-row__badges {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
}

.ticket-row__date {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: #aaa;
    padding: 0 14px 0 0;
    white-space: nowrap;
}

.ticket-state {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ticket-state-new {
    background: #cfe2ff;
    color: #084298;
}

.ticket-state-open {
    background: #fff3cd;
    color: #856404;
}

.ticket-state-closed {
    background: #d1e7dd;
    color: #0f5132;
}

.ticket-priority {
    padding: 3px 10px;
    border-radius: 10px;
    background: #f0f0f0;
    font-size: 0.75rem;
}

/* Ticket Detail */
.ticket-detail {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.ticket-header-detail {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.ticket-header-detail h1 {
    flex: 1;
    margin-right: 20px;
}

.ticket-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ticket-info {
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.ticket-info p {
    margin: 8px 0;
}

.ticket-articles {
    margin-top: 30px;
    margin-bottom: 30px;
}

.ticket-response-form {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.ticket-response-form h2 {
    margin-bottom: 20px;
    color: #667eea;
}

.ticket-articles h2 {
    margin-bottom: 20px;
    color: #667eea;
}

.article {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    color: #666;
}

.article-header strong {
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.article-body {
    line-height: 1.6;
    color: #333;
}

.article-html-content {
    line-height: 1.6;
}

.article-html-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

.article-html-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.article-html-content table td,
.article-html-content table th {
    padding: 8px;
    border: 1px solid #e0e0e0;
}

.article-html-content pre {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    overflow-x: auto;
    border: 1px solid #e0e0e0;
}

.article-html-content code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.article-text-content {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.article-attachments {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.article-attachments strong {
    display: block;
    margin-bottom: 10px;
    color: #667eea;
    font-size: 0.9rem;
}

.attachment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.attachment-list li {
    margin: 8px 0;
}

.attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

.attachment-link:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.attachment-icon {
    font-size: 1.1rem;
}

.attachment-size {
    color: #666;
    font-size: 0.85rem;
    margin-left: auto;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.empty-state p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
}

.error-card {
    text-align: center;
}

.error-message {
    font-size: 1.2rem;
    color: #721c24;
    margin: 20px 0;
}

.error-details {
    color: #666;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 10px;
        padding: 0 1rem;
    }

    .nav-brand {
        width: 100%;
        justify-content: center;
    }

    .navbar-logo {
        height: 32px;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
    }

    .ticket-row__main {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .ticket-row__badges {
        padding: 0 8px;
    }

    .ticket-row__date {
        display: none;
    }

    .form-actions {
        flex-direction: column;
    }

    .ticket-detail {
        padding: 20px 15px;
    }

    .article-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .article {
        padding: 15px;
    }
}

/* Dashboard Home */
.hero-section {
    margin: 40px 0;
    color: white;
}

.hero-section h1 {
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.action-card {
    background: white;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #667eea;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.action-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.action-card:hover::before {
    transform: scaleX(1);
}

.action-card:nth-child(2)::before {
    background: #764ba2;
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.support-icon {
    background: linear-gradient(135deg, #667eea 0%, #5b72df 100%);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.mod-icon {
    background: linear-gradient(135deg, #764ba2 0%, #6b4396 100%);
    box-shadow: 0 8px 20px rgba(118, 75, 162, 0.4);
}

.action-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.action-card p {
    color: #666;
    line-height: 1.6;
}

/* Resource Links Section */
.resource-links {
    margin: 10px 0 30px;
}

.resource-links__heading {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

.resource-links__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.resource-link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px 18px;
    text-decoration: none;
    color: white;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.resource-link-card:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    color: white;
}

.resource-link-card__icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.resource-link-card__icon--github {
    background: linear-gradient(135deg, #24292e 0%, #3d444d 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.resource-link-card__icon--discord {
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.resource-link-card__icon--wiki {
    background: linear-gradient(135deg, #0ea5a0 0%, #0b8580 100%);
    box-shadow: 0 4px 12px rgba(14, 165, 160, 0.4);
}

.resource-link-card__body {
    flex: 1;
    min-width: 0;
}

.resource-link-card__body h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    margin: 0 0 3px;
}

.resource-link-card__body p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.72);
    margin: 0;
    line-height: 1.4;
}

.resource-link-card__arrow {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.2s ease;
}

.resource-link-card:hover .resource-link-card__arrow {
    color: rgba(255, 255, 255, 0.9);
}

/* Interstitial Page */
.interstitial-card {
    background: white;
    border-radius: 16px;
    padding: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    margin: 40px auto;
}

.interstitial-title {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 10px;
    text-align: center;
}

.interstitial-subtitle {
    color: #666;
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.faq-list {
    margin-bottom: 40px;
}

.faq-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.faq-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.faq-content h4 {
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 1.1rem;
}

.faq-content p {
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.interstitial-actions {
    max-width: 400px;
    margin: 0 auto;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Animations */
.bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
}

.slide-up {
    opacity: 0;
    animation: slideUp 0.6s ease forwards;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale3d(.3, .3, .3); }
    20% { transform: scale3d(1.1, 1.1, 1.1); }
    40% { transform: scale3d(.9, .9, .9); }
    60% { opacity: 1; transform: scale3d(1.03, 1.03, 1.03); }
    80% { transform: scale3d(.97, .97, .97); }
    100% { opacity: 1; transform: scale3d(1, 1, 1); }
}

@keyframes slideUp {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@media (max-width: 768px) {
    .interstitial-card {
        padding: 30px 20px;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-content {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}
