@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    background: #101830;  /* solid blå bakgrund */
    color: #f5f5f5;
    font-family: 'Bebas Neue', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    flex-direction: column;
    text-align: center;
    letter-spacing: 0.03em;
}

/* LOGO */

.logo {
    position: fixed;
    top: 20px;
    left: 24px;
    z-index: 1002;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    max-width: 56px;
    filter: drop-shadow(0 0 10px rgba(148, 163, 253, 0.8));
}

/* NAVIGATION */

.nav-buttons {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    gap: 12px;
    align-items: center;
    z-index: 1001;
}

.nav-button {
    padding: 10px 20px;
    text-decoration: none;
    font-size: 16px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: 1px solid #27324f;
    background: #18213e;
    color: #e5e7eb;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transition: all 0.2s ease-out;
}

.nav-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
    border-color: #3b82f6;
}

/* Specifika knappar */

.about-button {
    background: #111827;
    color: #f9fafb;
}

.ticket-button {
    background: #2563eb;
    color: #e5e7eb;
    font-weight: 600;
}

.applications-dropdown {
    background: #1e40af;
    color: #f9fafb;
}

.completed-dropdown {
    background: #1d4ed8;
    color: #e5e7eb;
}

/* DROPDOWN */

/* DROPDOWN – FIXAR ATT MENYN INTE FÖRSVINNER NÄR MAN DRAR MUSEN NERÅT */

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: #111827;
    min-width: 210px;
    border-radius: 16px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.8);
    z-index: 1000;

    /* VIKTIGT: ingen "luft" mellan knapp och meny */
    top: 100%;          /* låg på 110% innan → gav gap */
    right: 0;
    margin-top: 0;      /* säkerställ att det inte läggs på extra gap */
    padding: 8px;
    border: 1px solid #27324f;
}

/* Ticket-knappen: fortfarande högerjusterad, men inget gap */
.ticket-button .dropdown-content {
    right: 0;
    left: auto;
}

/* Menyn ska visas både när man hovrar på knappen OCH när man är över menyn */
.dropdown:hover .dropdown-content,
.dropdown-content:hover {
    display: block;
}


.dropdown-content a {
    color: #e5e7eb;
    padding: 10px 14px;
    text-decoration: none;
    display: block;
    border-radius: 10px;
    font-size: 14px;
    text-align: left;
    text-transform: none;
    letter-spacing: 0.03em;
}

.dropdown-content a:hover {
    background: #1f2937;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* PAGE LAYOUT */

.page-content {
    width: 100%;
    padding: 20px;
    padding-top: 140px;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.index-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* HERO / STARTSIDA */

.index-content h3 {
    font-size: 20px;
    font-weight: 400;
    color: #9ca3ff;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.index-content h1 {
    font-size: 76px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #e5e7eb;
    text-shadow: 0 0 25px rgba(15, 23, 42, 0.9);
    margin-bottom: 24px;
}

.button {
    background: #2563eb;
    color: #f9fafb;
    padding: 14px 34px;
    text-decoration: none;
    font-size: 20px;
    border-radius: 999px;
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border: 1px solid #3b82f6;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.8);
    transition: all 0.2s ease-out;
}

.button:hover {
    transform: translateY(-2px) scale(1.03);
    background: #1d4ed8;
}

/* RUBRIKER OCH TEXT */

h1 {
    font-size: 42px;
    margin: 18px 0;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #e5e7eb;
}

h2 {
    font-size: 26px;
    margin: 12px 0;
}

h3 {
    font-size: 20px;
    margin: 10px 0;
}

p {
    font-size: 18px;
    margin: 8px 0;
    font-weight: 300;
}

/* FORMS (login / register / ansökningar) */

form {
    width: 100%;
    max-width: 420px;
    margin: 20px auto;
    text-align: left;
    padding: 22px 24px 24px;
    border-radius: 24px;
    background: #141c38;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.8);
    border: 1px solid #27324f;
}

.application-form {
    width: 100%;
    max-width: 640px;
    margin: 32px auto;
    padding: 26px;
    border-radius: 24px;
    background: #141c38;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.8);
    border: 1px solid #27324f;
}

label {
    display: block;
    margin: 10px 0 4px;
    font-size: 16px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #cbd5f5;
}

input[type="text"],
input[type="number"],
input[type="password"],
textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 14px;
    border-radius: 14px;
    border: 1px solid #374151;
    background: #0b1120;
    color: #e5e7eb;
    font-family: 'Bebas Neue', system-ui, sans-serif;
    font-size: 16px;
    letter-spacing: 0.04em;
    outline: none;
    transition: all 0.15s ease-out;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.7);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* KNAPPAR */

button {
    background: #2563eb;
    color: #f9fafb;
    padding: 12px 26px;
    text-decoration: none;
    font-size: 18px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.8);
    transition: all 0.2s ease-out;
}

button:hover {
    transform: translateY(-2px) scale(1.02);
    background: #1d4ed8;
}

.toggle-button {
    background: transparent;
    border: none;
    color: #9ca3ff;
    text-decoration: underline;
    cursor: pointer;
    font-size: 18px;
    letter-spacing: 0.12em;
    margin-left: 8px;
    box-shadow: none;
}

.toggle-button:hover {
    color: #c7d2ff;
    transform: none;
    box-shadow: none;
}

/* LOGIN SPECIFIKT */

#login-form {
    display: block;
}

#register-form {
    display: none;
}

/* THANK YOU */

#thank-you {
    display: none;
    font-size: 20px;
    margin: 40px 0;
    text-align: center;
}

/* REGLER */

.rules-container {
    width: 100%;
    max-width: 700px;
    padding: 24px;
    margin: 24px auto;
    text-align: left;
    border-radius: 24px;
    background: #141c38;
    border: 1px solid #27324f;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.8);
}

.rules-container h3 {
    font-size: 20px;
    margin: 15px 0 5px;
}

.rules-container li {
    margin-bottom: 10px;
    font-size: 18px;
}

ul {
    margin: 10px 0;
    padding-left: 20px;
}

/* TICKETLISTA */

#chat-list {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

#chat-list button {
    background: #141c38;
    color: #e5e7eb;
    padding: 12px 22px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 18px;
    width: 100%;
    max-width: 320px;
    border: 1px solid #27324f;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
}

#chat-list button:hover {
    transform: translateY(-2px);
    background: #1f2937;
}

/* TICKET INFO */

.ticket-info {
    width: 100%;
    max-width: 640px;
    margin: 20px auto;
    text-align: left;
    padding: 18px 20px;
    background: #141c38;
    border: 1px solid #27324f;
    border-radius: 24px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.8);
}

.ticket-info h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.ticket-description {
    font-size: 16px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #e5e7eb;
    padding: 10px 12px;
    background-color: #0b1120;
    border: 1px solid #374151;
    border-radius: 14px;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

/* CHAT */

.chat-container {
    width: 100%;
    max-width: 720px;
    height: 560px;
    border-radius: 26px;
    display: flex;
    flex-direction: column;
    margin: 24px auto;
    background: #141c38;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.85);
    border: 1px solid #27324f;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: transparent;
    border-radius: 26px 26px 0 0;
}

.message {
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 18px;
    position: relative;
    max-width: 78%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.user-message {
    background: #2563eb;
    color: #f9fafb;
    text-align: right;
    align-self: flex-end;
    margin-left: auto;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.8);
}

.support-message {
    background: #1e40af;
    color: #f9fafb;
    text-align: left;
    align-self: flex-start;
    margin-right: auto;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.8);
}

.message-header {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 3px;
    opacity: 0.95;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.timestamp {
    font-size: 11px;
    color: #e5e7eb;
    margin-top: 4px;
}

/* CHAT INPUT */

.chat-input {
    display: flex;
    padding: 12px;
    border-top: 1px solid #27324f;
    background: #0b1120;
    border-radius: 0 0 26px 26px;
    gap: 8px;
}

.chat-input input {
    flex: 1;
    padding: 11px 12px;
    border-radius: 999px;
    border: 1px solid #374151;
    background: #020617;
    color: #e5e7eb;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
}

.chat-input button {
    padding: 10px 18px;
    font-size: 14px;
    margin-top: 0;
}

.chat-input.hidden {
    display: none;
}

/* EXTRA KNAPPAR */

.mark-done-button {
    background: #16a34a;
    color: #ecfdf5;
    margin-top: 16px;
}

.back-button {
    background: #4b5563;
    color: #e5e7eb;
    margin-top: 16px;
}

.done-info {
    font-size: 13px;
    color: #cbd5f5;
    margin-top: 8px;
}

/* ANSÖKAN VISNING */

.application-container {
    width: 100%;
    max-width: 720px;          /* samma bredd som chatten */
    margin: 20px auto;
    text-align: left;
    padding: 14px;
    border-radius: 22px;
    background: #141c38;       /* matchar din blå stil */
    border: 1px solid #27324f;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.8);
}


.application-field {
    margin-bottom: 14px;
}

.application-field label {
    font-size: 15px;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.application-field p {
    margin: 0;
    padding: 8px 10px;
    border-radius: 12px;
    background-color: #0b1120;
    border: 1px solid #374151;
    font-size: 14px;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

/* RESPONSIVE */

@media (max-width: 768px) {
    .application-container {
        width: 100%;
        max-width: 100%;
        margin: 16px auto;
    }



    .nav-buttons {
        top: 80px;
        right: 12px;
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }

    .nav-button {
        font-size: 13px;
        padding: 8px 14px;
    }

    .logo {
        top: 14px;
        left: 16px;
    }

    .logo img {
        max-width: 48px;
    }

    .index-content h1 {
        font-size: 52px;
        letter-spacing: 0.18em;
    }

    .button {
        font-size: 18px;
        padding: 12px 24px;
    }

    form, .application-form {
        width: 100%;
        padding: 16px;
    }

    .chat-container {
        width: 100%;
        height: 420px;
    }

    .application-container,
    .rules-container,
    .ticket-info {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}
