
:root {
    --bg: #050608;
    --bg-alt: #101219;
    --card: #141827;
    --accent: #2563eb;
    --accent-purple: #a855f7;
    --accent-green: #22c55e;
    --text: #e5e7eb;
    --text-muted: #9ca3af;
    --border: #1f2933;
    --danger: #dc2626;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #111827 0, #020617 45%, #000 100%);
    color: var(--text);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.app-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(15,23,42,0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
}

.app-logo img {
    width: 32px;
    height: 32px;
    border-radius: 999px;
}

.header-link {
    font-size: 14px;
    color: var(--text);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.header-link:hover {
    border-color: var(--accent);
    background: rgba(37,99,235,0.15);
}

.nav-user {
    font-size: 14px;
    color: var(--text-muted);
}

.app-body {
    display: flex;
    align-items: stretch;
    flex: 1;
}

/* Sidebar */

.sidebar {
    width: 220px;
    background: #020617;
    border-right: 1px solid var(--border);
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sidebar-user {
    padding: 10px 10px 14px;
    border-radius: 16px;
    background: radial-gradient(circle at top left,
                                 rgba(37,99,235,0.3),
                                 rgba(15,23,42,1));
    border: 1px solid rgba(148,163,184,0.4);
}

.sidebar-user-name {
    font-weight: 600;
}

.sidebar-role {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-nav a {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 14px;
    color: var(--text);
}

.sidebar-nav a:hover {
    background: rgba(37,99,235,0.15);
}

.sidebar-nav a.admin-nav-link {
    border: 2px solid #EF4444;
    background: rgba(239, 68, 68, 0.1);
}

.sidebar-nav a.admin-nav-link:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #DC2626;
}

.sidebar-logout {
    margin-top: auto;
    padding-top: 18px;
}

.logout-btn {
    display: block;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    color: #fca5a5;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.4);
    text-align: center;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(220, 38, 38, 0.3);
    color: #fecaca;
    text-decoration: none;
}

.app-main {
    flex: 1;
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.app-main:has(.auth-wrapper) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

.app-footer {
    padding: 12px 24px;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    text-align: center;
    background: #020617;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-sep {
    color: var(--border);
}

/* Auth layout */

.auth-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 50px;
    align-items: stretch;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

.auth-info {
    background: radial-gradient(circle at top left, rgba(37,99,235,0.2), transparent 55%),
                radial-gradient(circle at bottom right, rgba(168,85,247,0.18), transparent 55%);
    border-radius: 28px;
    padding: 50px 40px;
    border: 1px solid rgba(148,163,184,0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.big-logo {
    width: 100px;
    height: 100px;
    border-radius: 999px;
    box-shadow: 0 0 30px rgba(59,130,246,0.6);
}

.auth-info h1 {
    margin-top: 22px;
    font-size: 34px;
}

.info-links {
    margin-top: 30px;
    display: flex;
    flex-direction: row;
    gap: 16px;
    justify-content: center;
}

.info-links a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.4);
    font-size: 14px;
}

.info-links a.social-icon {
    padding: 10px;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    justify-content: center;
    transition: transform 0.2s, border-color 0.2s;
}

.info-links a.social-icon:hover {
    transform: scale(1.1);
    border-color: var(--accent);
    text-decoration: none;
}

.info-links a.social-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.auth-info .centered {
    text-align: center;
}

.auth-info .big-logo.centered {
    display: block;
    margin: 0 auto 20px;
    width: 150px;
    height: 150px;
}

.auth-info h1.centered {
    text-align: center;
    margin-bottom: 12px;
    font-size: 38px;
}

.auth-info p.centered {
    text-align: center;
    margin-bottom: 30px;
    font-size: 18px;
}

.info-links-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.social-link-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 28px;
    border-radius: 14px;
    border: 1px solid rgba(148,163,184,0.4);
    background: rgba(15,23,42,0.6);
    color: var(--text);
    font-size: 17px;
    transition: all 0.2s;
    min-width: 240px;
}

.social-link-row:hover {
    border-color: var(--accent);
    background: rgba(37,99,235,0.15);
    text-decoration: none;
    transform: translateX(4px);
}

.social-icon-small {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(37,99,235,0.2);
}

.social-icon-small img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.auth-form {
    background: rgba(15,23,42,0.9);
    border-radius: 28px;
    padding: 35px 40px 40px;
    border: 1px solid rgba(148,163,184,0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tabs {
    display: flex;
    background: #020617;
    border-radius: 999px;
    padding: 5px;
    margin-bottom: 24px;
}

.tabs a {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    border-radius: 999px;
    font-size: 17px;
    color: var(--text-muted);
}

.tabs a.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-purple));
    color: white;
}

.register-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.reg-tab {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(148,163,184,0.4);
    background: transparent;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.reg-tab:hover {
    border-color: var(--accent);
    color: var(--text);
}

.reg-tab.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-purple));
    color: white;
    border-color: transparent;
}

.info-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(37,99,235,0.1);
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.discord-login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 15px;
}

.discord-login-divider::before,
.discord-login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.discord-login-divider span {
    padding: 0 16px;
}

.btn-discord {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    background: #5865F2;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.btn-discord:hover {
    background: #4752c4;
    transform: translateY(-1px);
    text-decoration: none;
}

.discord-btn-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.discord-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    flex-wrap: wrap;
}

.discord-status.discord-linked {
    background: rgba(88, 101, 242, 0.15);
    border: 1px solid rgba(88, 101, 242, 0.4);
}

.discord-status.discord-unlinked {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
}

.discord-status.discord-unlinked p {
    margin: 0 0 12px 0;
    color: var(--text-muted);
}

.discord-status.discord-unlinked .btn-discord {
    width: auto;
    padding: 12px 24px;
}

.discord-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.discord-badge {
    background: #5865F2;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.discord-id {
    color: var(--text);
    font-weight: 500;
}

.btn-danger {
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.5);
    color: #fca5a5;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: rgba(220, 38, 38, 0.35);
    color: #fecaca;
}

.btn-danger.small {
    padding: 8px 12px;
    font-size: 0.8rem;
}

.form-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

label {
    display: flex;
    flex-direction: column;
    font-size: 15px;
    gap: 6px;
}

input, select, textarea {
    background: #020617;
    border-radius: 12px;
    border: 1px solid #1f2937;
    padding: 14px 16px;
    color: var(--text);
    font-size: 16px;
}

.auth-form input, .auth-form select, .auth-form textarea {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 12px;
}

textarea { resize: vertical; }

.alert {
    background: #0f172a;
    border: 1px solid rgba(248,250,252,0.1);
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 13px;
}

.alert-error {
    background: rgba(220, 38, 38, 0.2);
    border: 2px solid var(--danger);
    color: #fca5a5;
    font-weight: 600;
}

.alert-success, .alert.success {
    background: rgba(34, 197, 94, 0.2);
    border: 2px solid var(--accent-green);
    color: #4ade80;
    font-weight: 600;
}

.forgot-link, .back-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 13px;
}

.forgot-link a, .back-link a {
    color: var(--text-muted);
}

.forgot-link a:hover, .back-link a:hover {
    color: var(--accent);
}

.flash-red {
    animation: flashRed 0.8s ease-out;
}

@keyframes flashRed {
    0% {
        background: rgba(220, 38, 38, 0.8);
        box-shadow: 0 0 30px rgba(220, 38, 38, 0.8), inset 0 0 60px rgba(220, 38, 38, 0.4);
        transform: scale(1.02);
    }
    100% {
        background: rgba(220, 38, 38, 0.2);
        box-shadow: none;
        transform: scale(1);
    }
}

.btn-primary, .btn-secondary, .btn-danger, .btn-warning {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.auth-form .btn-primary {
    padding: 14px 24px;
    font-size: 17px;
    margin-top: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-purple));
    color: white;
    box-shadow: 0 12px 30px rgba(37,99,235,0.4);
}

.btn-secondary {
    background: rgba(15,23,42,0.9);
    color: var(--text);
    border: 1px solid rgba(148,163,184,0.4);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-bracket-live {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
    animation: bracket-pulse 2s infinite;
}

.btn-bracket-live:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
    text-decoration: none;
    transform: translateY(-1px);
}

@keyframes bracket-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(34, 197, 94, 0.3); }
    50% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.5); }
}

.btn-bracket-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    background: rgba(100, 100, 100, 0.2);
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-success {
    background: var(--accent-green);
    color: white;
}

.small {
    padding: 4px 10px;
    font-size: 12px;
}

/* Cards & grid */

.card {
    background: radial-gradient(circle at top left, rgba(37,99,235,0.2), rgba(15,23,42,1));
    border-radius: 18px;
    padding: 18px 20px;
    border: 1px solid rgba(148,163,184,0.3);
    margin-bottom: 18px;
}

.card.full-width {
    width: 100%;
}

.page-header-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.page-header-row h1 {
    margin: 0;
    flex: 1;
}

.page-header-row .btn-secondary {
    white-space: nowrap;
}

.neon-blue {
    box-shadow: 0 0 24px rgba(59,130,246,0.4);
}
.neon-purple {
    box-shadow: 0 0 24px rgba(168,85,247,0.4);
}
.neon-green {
    box-shadow: 0 0 24px rgba(34,197,94,0.4);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.big-text {
    font-size: 20px;
    font-weight: 700;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th, .table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(31,41,55,0.8);
    text-align: left;
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
}

.soft-tag {
    margin-left: 8px;
    font-size: 12px;
}

/* Tournament cards */

.tournament-card {
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid rgba(148,163,184,0.35);
    background: radial-gradient(circle at top right, rgba(56,189,248,0.12), rgba(15,23,42,1));
}

.tournament-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148,163,184,0.2);
}

.tournament-card header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.5);
    background: rgba(15,23,42,0.8);
}

.tournament-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.tournament-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-icon {
    width: 24px;
    text-align: center;
    font-size: 16px;
}

.detail-label {
    color: var(--text-muted);
    font-size: 13px;
    min-width: 80px;
}

.detail-value {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.paypal-value {
    flex-wrap: wrap;
}

.btn-copy {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 6px;
    border: 1px solid rgba(148,163,184,0.4);
    background: rgba(15,23,42,0.9);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    border-color: var(--accent);
    background: rgba(37,99,235,0.15);
}

.tournament-timing {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.timing-box {
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(148,163,184,0.2);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timing-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timing-date {
    font-size: 14px;
    font-weight: 600;
}

.timing-countdown {
    font-size: 12px;
    font-weight: 500;
}

.tournament-rules {
    grid-column: 1 / -1;
    background: rgba(15,23,42,0.4);
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(148,163,184,0.15);
}

.rules-label {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.rules-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
}

.rules-list li {
    margin: 4px 0;
}

.tournament-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148,163,184,0.2);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 600px) {
    .tournament-grid {
        grid-template-columns: 1fr;
    }
}

/* Upcoming tournaments on dashboard */

.upcoming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.upcoming-card {
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(148,163,184,0.25);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: border-color 0.2s, transform 0.2s;
}

.upcoming-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.upcoming-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148,163,184,0.15);
}

.upcoming-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.badge.small {
    font-size: 12px;
    padding: 4px 10px;
}

.upcoming-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upcoming-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.upcoming-icon {
    width: 24px;
    text-align: center;
    font-size: 17px;
}

.upcoming-label {
    color: var(--text-muted);
    min-width: 85px;
}

.upcoming-value {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.countdown-tag {
    font-size: 13px;
    font-weight: 600;
    padding: 3px 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 5px;
}

.upcoming-btn {
    margin-top: auto;
    text-align: center;
    padding: 12px 20px;
    font-size: 15px;
}

.empty-state {
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.status-confirmed {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #4ade80;
}

.status-pending {
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.5);
    color: #fbbf24;
}

.twitch-link {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 10px;
    background: #9146ff;
    color: white;
    border-radius: 999px;
    font-size: 12px;
    text-decoration: none;
}

.twitch-link:hover {
    background: #772ce8;
    text-decoration: none;
}

.no-rank-badge {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #4ade80;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.paypal-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-copy {
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(37, 99, 235, 0.5);
    color: #60a5fa;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: rgba(37, 99, 235, 0.4);
}

/* Ranking */

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.rank-heading {
    margin-top: 16px;
    margin-bottom: 6px;
}

.rank-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rank-card {
    border-radius: 12px;
    padding: 10px 12px;
    background: #020617;
    border: 1px solid #1f2937;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rank-card.compact {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    min-width: auto;
}

.rank-card.compact .name {
    flex: 1;
}

.rank-card .name {
    font-weight: 600;
}

.rank-card .twitch-link {
    font-size: 12px;
    padding: 2px 8px;
    background: #9146ff;
    color: white;
    border-radius: 4px;
    text-decoration: none;
}

.rank-card .twitch-link:hover {
    background: #772ce8;
    text-decoration: none;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Forms */

.hint {
    font-size: 12px;
    color: var(--text-muted);
}

.request-card {
    border-radius: 16px;
    padding: 10px 14px;
    margin-bottom: 10px;
    border: 1px solid rgba(148,163,184,0.4);
}

.request-card header {
    display: flex;
    justify-content: space-between;
}

.info-box {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
}

.info-box p {
    margin: 0 0 8px 0;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.upload-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.upload-label-row label {
    margin: 0;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    font-style: italic;
    transition: transform 0.2s, box-shadow 0.2s;
}

.info-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--accent);
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card);
    border-radius: 16px;
    border: 1px solid rgba(148,163,184,0.4);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    padding: 20px;
}

.modal-large {
    max-width: 900px;
}

.screenshot-guide .guide-intro {
    font-size: 16px;
    margin-bottom: 24px;
    color: var(--text);
}

.guide-step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-purple));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.step-content strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--text);
}

.step-content p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.step-content ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.step-content li {
    margin-bottom: 4px;
}

.step-content em {
    color: var(--accent);
    font-style: normal;
}

.examples-title {
    margin: 32px 0 16px 0;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text);
}

.example-screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.example-item {
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--border);
}

.example-item p {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.example-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.example-item img:hover {
    transform: scale(1.02);
}

.screenshot-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.screenshot-thumb {
    display: block;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.screenshot-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkbox-row {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Ticket System */

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
}

.ticket-nav-link {
    display: flex;
    align-items: center;
}

.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-item {
    display: block;
    padding: 16px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.2s;
}

.ticket-item:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.ticket-item.closed {
    opacity: 0.7;
}

.ticket-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.ticket-id {
    font-weight: 700;
    color: var(--accent);
}

.ticket-category {
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.5);
    color: #c4b5fd;
    font-size: 12px;
}

.ticket-status {
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.ticket-status.status-open {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #4ade80;
}

.ticket-status.status-closed {
    background: rgba(107, 114, 128, 0.2);
    border: 1px solid rgba(107, 114, 128, 0.5);
    color: #9ca3af;
}

.unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: 700;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.ticket-subject {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.ticket-user {
    font-size: 13px;
    color: var(--text-muted);
}

.ticket-date {
    font-size: 12px;
    color: var(--text-muted);
}

.ticket-close-reason {
    font-size: 12px;
    color: #fbbf24;
    margin-top: 4px;
}

.ticket-view-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ticket-view-header h1 {
    margin: 0;
    flex: 1;
}

.ticket-meta {
    margin-top: 16px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
}

.ticket-meta p {
    margin: 6px 0;
}

.ticket-messages {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.message-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    position: relative;
}

.message-bubble.own {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--accent), var(--accent-purple));
    color: white;
    border-bottom-right-radius: 4px;
}

.message-bubble.other {
    align-self: flex-start;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.message-bubble.admin-msg.other {
    border-color: rgba(251, 191, 36, 0.5);
    background: rgba(251, 191, 36, 0.1);
}

.message-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 12px;
    opacity: 0.8;
}

.message-sender {
    font-weight: 600;
}

.message-content {
    line-height: 1.5;
}

.message-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.message-form textarea {
    flex: 1;
    resize: none;
}

.ticket-closed-notice {
    padding: 16px;
    background: rgba(107, 114, 128, 0.2);
    border-radius: 12px;
    text-align: center;
    color: var(--text-muted);
}

.close-ticket-form {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

/* Language Switcher */

.lang-switcher {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-right: 8px;
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 16px;
    background: rgba(255,255,255,0.1);
    transition: all 0.2s;
    text-decoration: none !important;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
    text-decoration: none !important;
}

.lang-btn.active {
    border-color: var(--accent);
    background: rgba(37,99,235,0.3);
}

.lang-flag {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 2px;
}

/* Beta Badge & Tag */
.beta-badge {
    background: linear-gradient(135deg, #a855f7, #6366f1);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-badge {
    background: linear-gradient(135deg, #dc2626, #f97316);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-broadcast {
    border: 1px solid rgba(220, 38, 38, 0.3);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(249, 115, 22, 0.05));
}

.beta-tag {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 4px;
    text-transform: uppercase;
}

/* Responsive */

@media (max-width: 900px) {
    .auth-wrapper {
        grid-template-columns: minmax(0,1fr);
    }
    .grid-3 {
        grid-template-columns: minmax(0,1fr);
    }
    .sidebar {
        display: none;
    }
    .app-main {
        max-width: 100%;
        padding: 16px;
    }
}
