@import url('../fonts/fonts.css');

:root {
            --bg-color: #0a0502;
            --radial-start: #1c110a;
            --radial-end: #050302;
            --parch-light: #eaddbd;
            --parch-dark: #bba078;
            --gold-light: #fff2a8;
            --gold-mid: #f0d070;
            --gold-dark: #a87c24;
            --text-ink: #2e1a12;
            --text-muted: rgba(46, 26, 18, 0.75);
            --gold-border: #e8d9b1;
            --font-serif: 'Cinzel', serif;
            --font-sans: 'Outfit', sans-serif;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        html {
            background: #0a0502;
            height: -webkit-fill-available;
            height: 100dvh;
        }

        body {
            background: transparent;
            min-height: 100vh;
            min-height: -webkit-fill-available;
            min-height: 100dvh;
            color: #ebd3b4;
            font-family: var(--font-sans);
            line-height: 1.6;
            padding: 40px 20px;
            padding-top: calc(40px + env(safe-area-inset-top, 0px));
            padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
            position: relative;
            overflow-x: hidden;
        }

        /* Royal premium background using settings screen's login_bg */
        body::before {
            content: "";
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(180deg, rgba(16, 10, 6, 0.6) 0%, rgba(10, 5, 2, 0.75) 100%), 
                        url('../login_bg.png');
            background-size: cover;
            background-position: center top;
            background-repeat: no-repeat;
            z-index: -2;
            pointer-events: none;
        }

        /* Ambient glowing lights in the background for a modern gaming portal feel */
        body::after {
            content: "";
            position: fixed;
            top: 15%;
            left: 50%;
            transform: translateX(-50%);
            width: 90%;
            max-width: 1200px;
            height: 70%;
            background: radial-gradient(circle, rgba(240, 208, 112, 0.12) 0%, rgba(240, 208, 112, 0.03) 45%, rgba(0,0,0,0) 85%);
            z-index: -1;
            pointer-events: none;
            filter: blur(55px);
        }

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

        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 40px;
            border-bottom: 1px solid rgba(240, 216, 136, 0.15);
            padding-bottom: 20px;
        }

        .logo-area {
            display: flex;
            align-items: center;
            gap: 12px;
            text-decoration: none;
        }

        .logo-emblem {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 2px double var(--gold-mid);
            display: flex;
            justify-content: center;
            align-items: center;
            background: radial-gradient(circle, #3e2723 0%, #1a0f0d 100%);
            flex-shrink: 0;
            overflow: hidden;
        }

        .logo-emblem span {
            font-family: var(--font-serif);
            font-size: 1.2rem;
            color: var(--gold-mid);
            font-weight: 700;
        }

        .logo-text h2 {
            font-family: var(--font-serif);
            font-size: 1.3rem;
            font-weight: 900;
            letter-spacing: 2px;
            background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-mid) 50%, var(--gold-dark) 100%);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .lang-toggle {
            background: rgba(30, 20, 15, 0.6);
            border: 1px solid rgba(240, 216, 136, 0.3);
            border-radius: 20px;
            padding: 4px;
            display: flex;
            gap: 4px;
            cursor: pointer;
        }

        .lang-btn {
            border: none;
            background: transparent;
            color: #a8947c;
            font-family: var(--font-serif);
            font-size: 0.8rem;
            font-weight: bold;
            padding: 4px 10px;
            border-radius: 14px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .lang-btn.active {
            background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-mid) 100%);
            color: var(--text-ink);
        }

        /* Parchment Content Scroll */
        .parchment-scroll {
            border: 1px solid rgba(240, 216, 136, 0.25);
            border-radius: 12px;
            padding: 4px;
            box-shadow: 0 15px 35px rgba(0,0,0,0.6);
            background-color: rgba(30, 20, 15, 0.3);
            margin-bottom: 40px;
        }

        .parchment-scroll-inner {
            background: linear-gradient(135deg, var(--parch-light) 0%, var(--parch-dark) 100%);
            border-radius: 8px;
            padding: 40px 30px;
            border: 2px solid var(--gold-border);
            color: var(--text-ink);
            position: relative;
        }

        .parchment-scroll-inner::before, .parchment-scroll-inner::after {
            content: '♦';
            position: absolute;
            font-size: 10px;
            color: var(--text-ink);
            opacity: 0.6;
        }
        .parchment-scroll-inner::before { top: 8px; left: 10px; }
        .parchment-scroll-inner::after { bottom: 8px; right: 10px; }

        h1 {
            font-family: var(--font-serif);
            font-size: 2rem;
            margin-bottom: 24px;
            border-bottom: 2px double rgba(46, 26, 18, 0.3);
            padding-bottom: 12px;
            text-align: center;
        }

        h3 {
            font-family: var(--font-serif);
            font-size: 1.25rem;
            margin-top: 28px;
            margin-bottom: 12px;
            border-bottom: 1px solid rgba(46, 26, 18, 0.15);
            padding-bottom: 4px;
        }

        p {
            margin-bottom: 16px;
            color: var(--text-muted);
            font-weight: 500;
        }

        ul {
            margin-bottom: 16px;
            padding-left: 20px;
            color: var(--text-muted);
            font-weight: 500;
        }

        li {
            margin-bottom: 8px;
        }

        .back-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: var(--gold-mid);
            text-decoration: none;
            font-family: var(--font-serif);
            font-size: 0.95rem;
            transition: color 0.3s ease;
        }

        .back-link:hover {
            color: #ffffff;
        }

        .back-link svg {
            width: 18px;
            height: 18px;
            fill: currentColor;
        }

        .last-update {
            font-style: italic;
            font-size: 0.85rem;
            opacity: 0.7;
            margin-bottom: 24px;
        }

        .emblem-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 50%;
        }

        .support-intro {
            text-align: center;
            margin-bottom: 30px;
            font-style: italic;
        }

        .support-footer-email {
            margin-top: 12px;
            font-size: 13px;
            opacity: 0.7;
            font-family: 'Outfit', sans-serif;
        }

        body.modal-open {
            overflow: hidden;
        }

        .contact-area {
            text-align: center;
            margin-top: 40px;
            padding-top: 30px;
            border-top: 1px solid rgba(46, 26, 18, 0.15);
        }

        .contact-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            background: linear-gradient(135deg, #fff2a8 0%, #f0d070 40%, #dcb14f 75%, #a87c24 100%);
            border: 1px solid var(--gold-dark);
            border-radius: 30px;
            padding: 12px 28px;
            color: var(--text-ink);
            font-family: var(--font-serif);
            font-weight: bold;
            font-size: 0.95rem;
            text-decoration: none;
            letter-spacing: 1.5px;
            box-shadow: 0 4px 15px rgba(168, 124, 36, 0.25);
            transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
            margin-top: 15px;
            cursor: pointer;
        }

        .contact-btn:hover {
            transform: translateY(-3px) scale(1.03);
            box-shadow: 0 8px 25px rgba(168, 124, 36, 0.45);
            filter: brightness(1.08);
            color: var(--text-ink);
        }

        .contact-btn svg {
            width: 20px;
            height: 20px;
            fill: var(--text-ink);
            flex-shrink: 0;
        }

        @media (max-width: 600px) {
            body {
                padding: 20px 12px;
                padding-top: calc(20px + env(safe-area-inset-top, 0px));
                padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
            }
            .parchment-scroll-inner {
                padding: 24px 16px;
            }
            h1 {
                font-size: 1.5rem;
                margin-bottom: 18px;
            }
            h3 {
                font-size: 1.1rem;
                margin-top: 20px;
            }
            .contact-btn {
                padding: 10px 20px;
                font-size: 0.85rem;
            }
        }

        /* --- NEW SUPPORT PORTAL STYLES --- */

        .support-hero {
            text-align: center;
            margin-bottom: 40px;
            border-bottom: 1.5px dashed rgba(46, 26, 18, 0.15);
            padding-bottom: 30px;
        }

        .support-hero h1 {
            font-family: var(--font-serif);
            color: var(--text-ink);
            font-size: 2rem;
            margin-bottom: 15px;
            letter-spacing: 1px;
        }

        .support-hero p {
            color: var(--text-muted);
            max-width: 650px;
            margin: 0 auto 20px auto;
            font-size: 1rem;
            line-height: 1.6;
        }

        .hero-buttons {
            display: flex;
            justify-content: center;
            gap: 15px;
            flex-wrap: wrap;
            margin-top: 20px;
        }

        .hero-btn {
            background: rgba(255, 255, 255, 0.2);
            border: 1.5px solid var(--gold-dark);
            color: var(--text-ink);
            padding: 10px 20px;
            border-radius: 4px;
            font-family: var(--font-serif);
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
            font-size: 0.85rem;
            letter-spacing: 1px;
        }

        .hero-btn:hover {
            background: var(--gold-dark);
            color: #fff;
            box-shadow: 0 4px 10px rgba(168, 124, 36, 0.35);
            transform: translateY(-2px);
        }

        .support-grid {
            display: grid;
            grid-template-columns: 1.6fr 1fr;
            gap: 30px;
            margin-top: 30px;
            margin-bottom: 50px;
            border-bottom: 1.5px dashed rgba(46, 26, 18, 0.15);
            padding-bottom: 40px;
        }

        @media (max-width: 768px) {
            .support-grid {
                grid-template-columns: 1fr;
                gap: 40px;
            }
            .support-hero h1 {
                font-size: 1.6rem;
            }
        }

        .support-form-container {
            text-align: left;
        }

        .support-form-container h2 {
            font-family: var(--font-serif);
            color: var(--text-ink);
            margin-bottom: 10px;
            font-size: 1.6rem;
        }

        .section-desc {
            color: var(--text-muted);
            margin-bottom: 25px;
            font-size: 0.95rem;
        }

        .form-group {
            margin-bottom: 20px;
            text-align: left;
        }

        .form-group label {
            display: block;
            font-family: var(--font-serif);
            color: var(--text-ink);
            font-weight: bold;
            font-size: 0.9rem;
            margin-bottom: 8px;
            letter-spacing: 0.5px;
        }

        .form-group input[type="text"],
        .form-group input[type="email"],
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 12px;
            background: rgba(255, 255, 255, 0.4);
            border: 1px solid rgba(46, 26, 18, 0.3);
            border-radius: 4px;
            color: var(--text-ink);
            font-family: var(--font-sans);
            font-size: 0.95rem;
            transition: all 0.2s ease;
        }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--gold-dark);
            background: rgba(255, 255, 255, 0.75);
            box-shadow: 0 0 8px rgba(168, 124, 36, 0.15);
        }

        .file-upload-wrapper {
            position: relative;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .file-upload-wrapper input[type="file"] {
            font-family: var(--font-sans);
            font-size: 0.85rem;
            color: var(--text-ink);
            cursor: pointer;
        }

        .file-upload-info {
            font-size: 0.75rem;
            color: var(--text-muted);
            font-style: italic;
        }

        .support-sidebar {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .sidebar-card {
            background: rgba(255, 255, 255, 0.25);
            border: 1px solid rgba(46, 26, 18, 0.15);
            border-radius: 6px;
            padding: 22px;
            text-align: left;
            box-shadow: 0 4px 15px rgba(46, 26, 18, 0.05);
        }

        .sidebar-card h3 {
            font-family: var(--font-serif);
            color: var(--text-ink);
            margin-bottom: 12px;
            font-size: 1.15rem;
            border-bottom: 1px solid rgba(46, 26, 18, 0.1);
            padding-bottom: 6px;
            margin-top: 0 !important;
        }

        .sidebar-card p {
            font-size: 0.9rem;
            color: var(--text-muted);
            line-height: 1.6;
        }

        .sidebar-card ul {
            list-style: none;
            padding-left: 0;
            margin: 0;
        }

        .sidebar-card li {
            font-size: 0.9rem;
            color: var(--text-muted);
            margin-bottom: 12px;
            line-height: 1.5;
        }

        .sidebar-card a {
            color: #7a5010;
            text-decoration: none;
            font-weight: bold;
        }

        .sidebar-card a:hover {
            text-decoration: underline;
        }

        .bug-guide-card ul {
            list-style: disc !important;
            padding-left: 20px !important;
        }

        .bug-guide-card li {
            margin-bottom: 6px;
        }

        .cf-turnstile {
            margin: 15px 0;
            display: inline-block;
        }

        .status-msg {
            padding: 12px;
            border-radius: 4px;
            font-size: 0.9rem;
            font-weight: bold;
            margin-bottom: 15px;
            display: none;
            text-align: left;
        }

        .status-msg.info {
            display: block;
            background: rgba(168, 124, 36, 0.1);
            border-left: 4px solid var(--gold-dark);
            color: var(--text-ink);
        }

        .status-msg.error {
            display: block;
            background: rgba(217, 83, 79, 0.1);
            border-left: 4px solid #d9534f;
            color: #c9302c;
        }

        .status-msg.success {
            display: block;
            background: rgba(92, 184, 92, 0.1);
            border-left: 4px solid #5cb85c;
            color: #419641;
        }

        .submit-btn {
            width: 100%;
            background: linear-gradient(135deg, #fff2a8 0%, #f0d070 40%, #dcb14f 75%, #a87c24 100%);
            border: 1px solid var(--gold-dark);
            color: var(--text-ink);
            font-family: var(--font-serif);
            font-weight: bold;
            padding: 12px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 1rem;
            letter-spacing: 1px;
            box-shadow: 0 4px 10px rgba(168, 124, 36, 0.2);
            transition: all 0.2s ease;
        }

        .submit-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(168, 124, 36, 0.35);
        }

        .submit-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none !important;
            box-shadow: none !important;
        }

        /* --- ACCORDION FAQ STYLES --- */

        .faq-container {
            margin-top: 40px;
            text-align: left;
        }

        .faq-container h2 {
            font-family: var(--font-serif);
            color: var(--text-ink);
            margin-bottom: 10px;
            font-size: 1.8rem;
            text-align: center;
        }

        .accordion-group {
            margin-top: 25px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .accordion-item {
            border: 1px solid rgba(46, 26, 18, 0.15);
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.15);
            overflow: hidden;
            transition: all 0.3s ease;
        }

        .accordion-item.active {
            background: rgba(255, 255, 255, 0.3);
            border-color: rgba(168, 124, 36, 0.4);
        }

        .accordion-header {
            width: 100%;
            padding: 16px 20px;
            background: transparent;
            border: none;
            text-align: left;
            font-family: var(--font-serif);
            color: var(--text-ink);
            font-weight: bold;
            font-size: 1rem;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: all 0.2s ease;
        }

        .accordion-header::after {
            content: '+';
            font-size: 1.3rem;
            color: var(--gold-dark);
            transition: transform 0.3s ease;
        }

        .accordion-item.active .accordion-header::after {
            content: '-';
            transform: rotate(180deg);
        }

        .accordion-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            padding: 0 20px;
        }

        .accordion-item.active .accordion-content {
            max-height: 250px; /* Fallback limit for non-JS browsers */
            padding: 0 20px 20px 20px;
        }

        .accordion-content p {
            margin: 0;
            font-size: 0.95rem;
            color: var(--text-muted);
            line-height: 1.6;
        }

        /* --- FOOTER STYLES --- */

        .support-footer {
            margin-top: 50px;
            padding-top: 30px;
            border-top: 1.5px dashed rgba(46, 26, 18, 0.15);
            text-align: center;
        }

        .support-footer .footer-links {
            margin-bottom: 12px;
        }

        .support-footer .footer-links a {
            color: var(--gold-dark);
            text-decoration: none;
            font-size: 0.9rem;
            font-weight: bold;
            margin: 0 8px;
        }

        .support-footer .footer-links a:hover {
            text-decoration: underline;
        }

        .support-footer .copyright {
            font-size: 0.8rem;
            color: var(--text-muted);
        }