/* ==================================================
   DATEI: chat.css
   PROJEKT: SOUND BRIDGE CHAT
   STABILE KORRIGIERTE VERSION
================================================== */

/* ==================================================
   04 - CHAT GRUNDLAYOUT
================================================== */

.chat-wrap,
.chat-wrap *,
.profile-overlay,
.profile-overlay * {
    box-sizing: border-box;
}


.chat-wrap {
    width: 100%;
    padding: 35px 20px 60px;

    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.chat-box,
.login-box {
    width: 95%;

    border: 2px solid #ff9900;
    border-radius: 24px;

    background: rgba(17, 17, 17, .72);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.chat-box {
    position: relative;

    max-width: 1150px;
    padding: 35px;
}

/* ==================================================
   CHAT MIT AKTIVEM SPIEL
================================================== */

.chat-box.game-active {
    max-width: 1650px;
}

.login-box {
    max-width: 540px;
    padding: 35px;

    text-align: center;
}

.chat-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
}

.chat-main,
.side-box {
    padding: 18px;

    border: 1px solid rgba(255, 153, 0, .45);
    border-radius: 16px;

    background: rgba(0, 0, 0, .35);
}

.chat-main {
    position: relative;

    min-height: 720px;

    display: flex;
    flex-direction: column;
}

.chat-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}


/* ==================================================
   04A - LIVE GAME PANEL
================================================== */

.game-panel {
    width: 420px;
    flex-shrink: 0;

    display: flex;
    flex-direction: column;
    gap: 18px;

    padding: 18px;

    border: 1px solid rgba(255,153,0,.45);
    border-radius: 16px;

    background: rgba(0,0,0,.35);
}

.game-panel[hidden]{
    display:none !important;
}

.game-panel-header h2{
    margin:0 0 8px;
    color:#ff9900;
}

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

#game-content{
    flex:1;

    min-height:350px;

    padding:14px;

    border-radius:12px;

    background:rgba(0,0,0,.25);
}


/* ==================================================
   CHAT MIT AKTIVEM SPIEL
================================================== */

.chat-layout.game-is-active{

    grid-template-columns:
    420px
    minmax(0,1fr)
    300px;
}


/* ==================================================
   05 - BUTTONS
================================================== */

.btn,
.back-btn,
.chat-form button,
.chat-login-form button,
.wish-btn,
.mobile-tool-btn,
.profile-popup-btn {
    display: inline-block;

    padding: 10px 18px;

    border: none;
    border-radius: 8px;

    background: #ff9900;
    color: #000;

    font-weight: 700;
    text-decoration: none;

    cursor: pointer;
}

.btn.alt {
    background: #1b75d0;
    color: #fff;
}

.btn:hover,
.back-btn:hover,
.chat-form button:hover,
.chat-login-form button:hover,
.wish-btn:hover,
.mobile-tool-btn:hover,
.profile-popup-btn:hover {
    filter: brightness(1.08);
}

button:disabled,
.is-disabled {
    opacity: .5;
    cursor: not-allowed;
}


/* ==================================================
   06 - CHAT HEADER
================================================== */

.chat-header {
    position: relative;

    margin-bottom: 25px;

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.chat-header-left {
    flex: 1;
}

.chat-header-left h1 {
    font-size: 28px;
    line-height: 1.1;
}


/* ==================================================
   07 - CHAT HAMBURGER MENÜ
================================================== */

.chat-menu-btn {
    width: 50px;
    height: 50px;

    flex-shrink: 0;

    border: none;
    border-radius: 12px;

    background: #ff9900;
    color: #000;

    font-size: 26px;
    font-weight: 700;

    cursor: pointer;

    box-shadow: 0 0 14px rgba(255, 153, 0, .45);
}

.chat-menu {
    display: none;

    position: absolute;
    top: 92px;
    right: 35px;
    z-index: 9999;

    width: 260px;
    padding: 14px;

    border: 2px solid #ff9900;
    border-radius: 16px;

    background: rgba(0, 0, 0, .97);

    box-shadow: 0 0 20px rgba(255, 153, 0, .28);
}

.chat-menu.open,
.chat-menu.active {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-menu a,
.chat-menu-link {
    width: 100%;
    padding: 6px 0;

    display: block;

    border: none;

    background: none;
    color: #fff;

    text-align: left;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;

    cursor: pointer;
}

.chat-menu a:hover,
.chat-menu-link:hover {
    color: #ff9900;
}

.chat-menu hr {
    width: 100%;
    margin: 5px 0;

    border: none;
    border-top: 1px solid rgba(255, 153, 0, .45);
}

.chat-menu-panel {
    display: none;
}

.chat-menu.show-panel .chat-menu-list {
    display: none;
}

.chat-menu.show-panel .chat-menu-panel {
    display: block;
}

.chat-menu-back {
    margin-bottom: 12px;
    padding: 8px 12px;

    border: none;
    border-radius: 8px;

    background: #ff9900;
    color: #000;

    font-weight: 700;
    cursor: pointer;
}

.chat-menu-panel h2 {
    margin-bottom: 10px;

    color: #ff9900;
    font-size: 20px;
}

#chatMenuContent {
    font-size: 15px;
    line-height: 1.4;
}

.menu-card {
    margin-top: 10px;
    padding: 12px;

    border: 1px solid rgba(255, 153, 0, .4);
    border-radius: 12px;

    background: rgba(255, 255, 255, .05);
}

.menu-card h3 {
    margin-bottom: 6px;
    color: #ff9900;
}

.menu-card p {
    margin: 3px 0;
}


/* ==================================================
   08 - NACHRICHTEN
================================================== */

.messages {
    flex: 1;

    min-height: 420px;
    height: 62vh;
    max-height: 750px;

    padding: 14px;

    overflow-y: auto;
    overflow-x: hidden;

    border: 1px solid rgba(255, 153, 0, .25);
    border-radius: 12px;

    background: rgba(0, 0, 0, .45);
}

.system-msg {
    margin-bottom: 10px;

    color: #ff9900;
    font-weight: 700;
}

.chat-message {
    margin-bottom: 12px;
    padding: 10px;

    border-radius: 10px;

    background: rgba(255, 255, 255, .08);
}

.chat-message-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.chat-avatar-btn {
    width: 52px;
    height: 52px;

    flex-shrink: 0;

    padding: 0;

    overflow: hidden;

    border: 2px solid #ff9900;
    border-radius: 50%;

    background: rgba(0, 0, 0, .45);

    cursor: pointer;
    transition: .2s;
}

.chat-avatar-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(255, 153, 0, .45);
}

.chat-avatar-img {
    width: 100%;
    height: 100%;

    display: block;
    object-fit: cover;
}

.chat-avatar-placeholder {
    width: 100%;
    height: 100%;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 22px;
}

.chat-message-content {
    flex: 1;
    min-width: 0;
}

.chat-message-head {
    margin-bottom: 4px;

    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.chat-name-btn {
    padding: 0;

    border: none;

    background: none;
    color: #ff9900;

    font-size: 17px;
    font-weight: 700;

    cursor: pointer;
}

.chat-name-btn:hover {
    text-decoration: underline;
}

.chat-message-content p {
    margin: 0;

    color: #fff;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.chat-message .role {
    padding: 3px 8px;

    border: 1px solid rgba(255, 153, 0, .45);
    border-radius: 999px;

    background: rgba(255, 153, 0, .15);
    color: #ffd38c;

    font-size: 12px;
    font-weight: 700;
}

.chat-time {
    color: #aaa;
    font-size: 12px;
}

.whisper-message {
    border-left: 3px solid #18a8ff;
    background: rgba(24, 168, 255, .1);
}

.whisper-head {
    margin-bottom: 5px;

    color: #78c8ff;
    font-size: 13px;
    font-weight: 700;
}


/* ==================================================
   09 - CHAT FORMULAR
================================================== */

.chat-form {
    margin-top: 12px;

    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 10px;

    flex-shrink: 0;
}

.chat-form input {
    width: 100%;
    padding: 12px;

    border: none;
    border-radius: 8px;

    font-size: 15px;
}


/* ==================================================
   10 - ONLINE LISTE
================================================== */

#onlineList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.online-info {
    color: #fff;
}

.online-count {
    color: #ff9900;
    font-weight: 700;
}

.online-stats {
    margin-top: 4px;
    font-size: 13px;
    color: #ccc;
}

.online-user {
    padding: 10px;

    border: 1px solid rgba(255, 140, 0, .25);
    border-radius: 14px;

    background: rgba(255, 255, 255, .06);
}

.online-user-name {
    width: 100%;
    padding: 8px 10px;

    display: flex;
    align-items: center;
    gap: 8px;

    border: 1px solid rgba(255, 153, 0, .35);
    border-radius: 10px;

    background: rgba(0, 0, 0, .45);
    color: #fff;

    text-align: left;
    font-weight: 700;

    cursor: pointer;
}

.online-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.online-dot {
    flex-shrink: 0;
}

.user-actions {
    margin-top: 8px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.user-actions[hidden] {
    display: none;
}

.profile-btn,
.whisper-btn {
    width: 100%;
    min-width: 0;
    min-height: 36px;

    padding: 9px 8px;

    border: none;
    border-radius: 8px;

    background: #ff9900;
    color: #000;

    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;

    cursor: pointer;
}

.profile-btn:hover,
.whisper-btn:hover {
    filter: brightness(1.08);
}

.online-page-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.online-page-nav button {
    width: 38px;
    height: 34px;

    border: none;
    border-radius: 8px;

    background: #ff9900;
    color: #000;

    font-weight: 700;
    cursor: pointer;
}


/* ==================================================
   11 - SEITENBEREICH / WUNSCHBOX
================================================== */

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


/* ==================================================
   12 - MODERATORBEREICH
================================================== */

.modi-tools {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modi-tools button {
    padding: 9px 12px;

    border: none;
    border-radius: 8px;

    background: #ff9900;
    color: #000;

    font-weight: 700;
    cursor: pointer;
}

.modi-tools button:disabled {
    background: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .45);
}


/* ==================================================
   13 - ADMINBEREICH
================================================== */

.admin-panel {
    border-color: rgba(255, 80, 80, .65);
}

.admin-panel h2 {
    color: #ff5555;
}

.admin-tools {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-tools button {
    padding: 9px 12px;

    border: none;
    border-radius: 8px;

    background: #b00020;
    color: #fff;

    font-weight: 700;
    cursor: pointer;
}

.admin-tools button:hover:not(:disabled) {
    background: #ff0033;
}


/* ==================================================
   14 - SMILEYS / GIFS
================================================== */

.smiley-tabs {
    margin-top: 12px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.smiley-tab {
    width: 100%;
    height: 42px;

    border: none;
    border-radius: 12px;

    background: rgba(255, 255, 255, .08);
    color: #fff;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;
}

.smiley-tab:hover {
    background: rgba(255, 153, 0, .25);
}

.smiley-tab.active {
    background: #ff9900;
    color: #000;

    box-shadow: 0 0 12px rgba(255, 153, 0, .35);
}

.smiley-popup {
    display: none;

    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 115px;
    z-index: 9999;

    padding: 14px;

    flex-wrap: wrap;
    gap: 10px;

    border: 1px solid #ff9900;
    border-radius: 14px;

    background: rgba(15, 15, 15, .97);

    box-shadow: 0 0 25px rgba(255, 153, 0, .45);
}

.smiley-popup.open {
    display: flex;
}

.smiley-item {
    width: 42px;
    height: 42px;

    border: 1px solid rgba(255, 153, 0, .4);
    border-radius: 10px;

    background: #1f1f1f;
    color: #fff;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;
}

.smiley-item:hover {
    background: #ff9900;
    transform: scale(1.08);
}


/* ==================================================
   15 - CHAT LOGIN
================================================== */

.chat-login-box {
    max-width: 560px;
    padding: 35px;
}

.chat-login-box h1 {
    margin-bottom: 18px;
}

.chat-login-form {
    width: 100%;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-login-form input {
    width: 100%;
    padding: 12px;

    border: none;
    border-radius: 8px;

    font-size: 15px;
}

.password-field {
    position: relative;
    width: 100%;
}

.password-field input {
    width: 100%;
    padding-right: 46px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;

    width: 34px;
    height: 34px;

    padding: 0;

    transform: translateY(-50%);

    border: none;
    border-radius: 8px;

    background: transparent;
    color: #000;

    cursor: pointer;
}

.login-links {
    margin-top: 14px;
}


/* ==================================================
   16 - OVERLAYS / POPUPS
================================================== */

.profile-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 18px;

    background: rgba(0, 0, 0, .72);
}

.profile-popup {
    position: relative;

    width: 340px;
    max-width: 92%;
    max-height: 90vh;

    padding: 22px;

    overflow-y: auto;

    border: 2px solid #ff9900;
    border-radius: 20px;

    background: rgba(17, 17, 17, .98);

    box-shadow: 0 0 30px rgba(0, 0, 0, .75);

    text-align: center;
}

.profile-close {
    position: absolute;
    top: 10px;
    right: 10px;

    width: 32px;
    height: 32px;

    border: none;
    border-radius: 50%;

    background: #ff9900;
    color: #000;

    font-weight: 700;
    cursor: pointer;
}

.profile-popup-avatar {
    width: 86px;
    height: 86px;

    margin: 8px auto 12px;

    overflow: hidden;

    border: 3px solid #ff9900;
    border-radius: 50%;

    background: rgba(0, 0, 0, .45);
}

.profile-popup-avatar img {
    width: 100%;
    height: 100%;

    display: block;
    object-fit: cover;
}

.profile-popup-placeholder {
    width: 100%;
    height: 100%;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 42px;
}

.profile-popup h2 {
    margin-bottom: 12px;

    color: #ff9900;
    font-size: 22px;
}

.profile-popup-info {
    margin: 12px 0 18px;

    text-align: left;
}

.profile-popup-info p {
    margin: 7px 0;

    font-size: 15px;
    line-height: 1.35;
}

.soundbridge-dialog-buttons,
.moderation-buttons {
    margin-top: 16px;

    display: flex;
    flex-direction: column;
    gap: 10px;
}

#modiOverlayContent {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#modiOverlayContent .profile-popup-btn {
    width: 100%;
}


/* ==================================================
   17 - WUNSCHBOX
================================================== */

.wish-form-popup {
    width: 360px;
}

.wish-form-popup h2 {
    margin-bottom: 18px;
}

.wish-form-popup input,
.wish-form-popup textarea,
#modiOverlayContent select,
#modiOverlayContent textarea,
.moderation-center select,
.moderation-center textarea {
    width: 100%;
    margin-bottom: 10px;
    padding: 11px 12px;

    border: 1px solid rgba(255, 153, 0, .55);
    border-radius: 10px;

    background: #111;
    color: #fff;

    font-family: Arial, sans-serif;
    font-size: 14px;
}

.wish-form-popup input:focus,
.wish-form-popup textarea:focus,
#modiOverlayContent select:focus,
#modiOverlayContent textarea:focus,
.moderation-center select:focus,
.moderation-center textarea:focus {
    outline: none;

    border-color: #ff9900;

    box-shadow: 0 0 8px rgba(255, 153, 0, .35);
}

.wish-form-popup textarea,
#modiOverlayContent textarea,
.moderation-center textarea {
    min-height: 78px;
    resize: vertical;
}

.wish-popup {
    width: 380px;
}

.wish-tabs {
    margin-bottom: 24px;

    display: flex;
    gap: 10px;
}

.wish-tabs .profile-popup-btn {
    flex: 1;
    padding: 9px 10px;
}

.wish-tabs .profile-popup-btn.active {
    background: #fff;
    color: #000;
}

.wish-list {
    margin-top: 18px;
}

.wish-card {
    padding-top: 18px;

    border-top: 1px solid rgba(255, 153, 0, .35);

    text-align: center;
}

.wish-song {
    margin-bottom: 12px;

    color: #fff;

    font-size: 18px;
    font-weight: 700;
}

.wish-user {
    margin-bottom: 8px;

    color: #ddd;
    font-size: 15px;
}

.wish-time {
    margin-bottom: 20px;

    color: #aaa;
    font-size: 13px;
}

.wish-page-nav {
    margin-top: 20px;

    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.wish-page-nav .profile-popup-btn {
    flex: 1;
}


/* ==================================================
   18 - ROTATION POPUP
================================================== */

.rotation-info {
    margin: 20px 0;
    text-align: center;
}

.rotation-info p {
    margin: 12px 0;
    line-height: 1.5;
}

.rotation-buttons {
    margin-top: 20px;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-popup-btn.success {
    background: #2e9d45;
    color: #fff;
}

.profile-popup-btn.success:hover {
    background: #37b851;
}

.profile-popup-btn.danger {
    background: #c23636;
    color: #fff;
}

.profile-popup-btn.danger:hover {
    background: #e04a4a;
}


/* ==================================================
   19 - LÖSCHMODUS
================================================== */

#deleteModeBanner {
    margin: 10px 0;
    padding: 12px;

    border: 1px solid rgba(255, 153, 0, .7);
    border-radius: 12px;

    background: rgba(0, 0, 0, .72);
    color: #fff;

    text-align: center;
}

#deleteModeCancelBtn {
    margin-top: 8px;
    padding: 8px 14px;

    border: none;
    border-radius: 10px;

    background: #b82929;
    color: #fff;

    font-weight: 700;
    cursor: pointer;
}

#messages.delete-mode .chat-message {
    cursor: pointer;
}

#messages.delete-mode .chat-message:hover {
    outline: 2px solid #ff9900;
    background: rgba(255, 153, 0, .13);
}


/* ==================================================
   21 - MOBILE TOOLS
================================================== */

.mobile-chat-tools,
.mobile-tool-panel {
    display: none;
}

.mobile-tool-panel {
    margin-bottom: 15px;
    padding: 14px;

    border: 1px solid rgba(255, 153, 0, .45);
    border-radius: 12px;

    background: rgba(0, 0, 0, .35);
}

.mobile-tool-panel.open {
    display: block;
}


/* ==================================================
   22 - RESPONSIVE TABLET
================================================== */

@media (max-width: 1100px) {

    .chat-wrap {
        padding: 35px 20px 60px;
        align-items: flex-start;
    }

}


/* ==================================================
   23 - RESPONSIVE MOBILE
================================================== */

@media (max-width: 750px) {

   .chat-wrap {
    padding: 25px 10px 50px;
    align-items: flex-start;
}

   	.chat-box,
    .login-box {
        width: 96%;
        padding: 18px;

        border-radius: 20px;
    }

    .chat-header {
        margin-bottom: 20px;

        flex-direction: row;
        align-items: flex-start;

        text-align: left;
    }

    .chat-header-left h1 {
        font-size: 34px;
        line-height: 1.1;
    }

    .chat-header-left p {
        font-size: 15px;
        line-height: 1.35;
    }

    .chat-menu-btn {
        width: 48px;
        height: 48px;

        font-size: 24px;
    }

    .chat-menu {
        top: 82px;
        right: 18px;
        left: 18px;

        width: auto;
        max-width: none;
    }

    	.chat-layout {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .chat-side {
        order: 3;

        display: flex;
        width: 100%;
    }

    .chat-side > .side-box:not(.modi-panel):not(.admin-panel) {
        display: none;
    }

    .chat-main {
        order: 2;
        min-height: 620px;
    }

    .chat-main,
    .side-box {
        padding: 14px;
        border-radius: 14px;
    }

    .messages {
        flex: 1;

        height: 48vh;
        min-height: 320px;
        max-height: 520px;
    }

    .chat-form {
        grid-template-columns: 1fr;
    }

    .chat-form button {
        width: 100%;
    }

    .mobile-chat-tools {
        margin-bottom: 15px;

        display: flex;
        gap: 10px;
    }

    .mobile-tool-btn {
        flex: 1;
    }

    .online-details {
        max-height: 90px;
    }

    .profile-popup,
    .wish-popup,
    .wish-form-popup {
        width: 100%;
        max-width: 94%;
    }

}


/* ==================================================
   24 - KLEINE SMARTPHONES
================================================== */

@media (max-width: 420px) {

    .chat-wrap {
        padding-left: 6px;
        padding-right: 6px;
    }

    .chat-box,
    .login-box {
        width: 100%;
        padding: 12px;
    }

    .chat-header-left h1 {
        font-size: 27px;
    }

    .chat-header-left p {
        font-size: 13px;
    }

    .chat-menu-btn {
        width: 44px;
        height: 44px;
    }

    .chat-main,
    .side-box {
        padding: 10px;
    }

    .mobile-chat-tools {
        flex-direction: column;
    }

    .chat-message-inner {
        gap: 8px;
    }

    .chat-avatar-btn {
        width: 44px;
        height: 44px;
    }

    .smiley-popup {
        left: 10px;
        right: 10px;
        bottom: 125px;
    }
}

/* ==================================================
   CAPTAIN BRIDGE - CHAT INFOFENSTER
   DATEI: chat.css
   EINFÜGEN: Ganz unten an die bestehende chat.css
================================================== */


/* ==================================================
   GRUNDBOX
================================================== */

.captain-bridge-message {
    width: min(92%, 620px);
    margin: 12px auto;

    border: 1px solid rgba(255, 153, 0, .65);
    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            rgba(33, 24, 12, .98),
            rgba(12, 18, 25, .98)
        );

    box-shadow:
        0 8px 22px rgba(0, 0, 0, .35),
        inset 0 0 0 1px rgba(255, 255, 255, .03);

    overflow: hidden;

    animation:
        captainBridgeAppear .28s ease-out;
}


/* ==================================================
   INNERER AUFBAU
================================================== */

.captain-bridge-inner {
    padding: 12px 14px;

    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;

    align-items: center;
}


/* ==================================================
   PIRATEN-AVATAR
================================================== */

.captain-bridge-avatar {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 184, 77, .7);
    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 30%,
            rgba(255, 190, 80, .28),
            rgba(70, 38, 10, .9)
        );

    font-size: 26px;
    line-height: 1;

    box-shadow:
        0 0 14px rgba(255, 153, 0, .2);
}


/* ==================================================
   TEXTBEREICH
================================================== */

.captain-bridge-content {
    min-width: 0;
}

.captain-bridge-head {
    margin-bottom: 5px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.captain-bridge-name {
    color: #ffb340;

    font-size: 14px;
    font-weight: 800;
    letter-spacing: .02em;
}

.captain-bridge-time {
    color: #8f8f8f;

    font-size: 11px;
    white-space: nowrap;
}

.captain-bridge-content p {
    margin: 0;

    color: #f2f2f2;

    font-size: 14px;
    line-height: 1.45;

    overflow-wrap: anywhere;
}


/* ==================================================
   EREIGNISFARBEN
================================================== */

.captain-bridge-message[data-event="miss"] {
    border-color: rgba(75, 183, 255, .65);

    background:
        linear-gradient(
            135deg,
            rgba(16, 38, 55, .98),
            rgba(10, 20, 30, .98)
        );
}

.captain-bridge-message[data-event="hit"] {
    border-color: rgba(255, 92, 60, .78);

    background:
        linear-gradient(
            135deg,
            rgba(68, 20, 14, .98),
            rgba(25, 12, 12, .98)
        );
}

.captain-bridge-message[data-event="sunk"] {
    border-color: rgba(255, 40, 40, .85);

    background:
        linear-gradient(
            135deg,
            rgba(76, 8, 8, .98),
            rgba(24, 4, 4, .98)
        );
}

.captain-bridge-message[data-event="start"] {
    border-color: rgba(255, 201, 72, .78);
}

.captain-bridge-message[data-event="win"] {
    border-color: rgba(82, 205, 118, .8);

    background:
        linear-gradient(
            135deg,
            rgba(13, 55, 28, .98),
            rgba(7, 25, 14, .98)
        );
}

.captain-bridge-message[data-event="lose"] {
    border-color: rgba(175, 118, 255, .75);

    background:
        linear-gradient(
            135deg,
            rgba(43, 24, 70, .98),
            rgba(18, 10, 30, .98)
        );
}


/* ==================================================
   LÖSCHMODUS
================================================== */

#messages.delete-mode .captain-bridge-message {
    cursor: pointer;
}

#messages.delete-mode .captain-bridge-message:hover {
    outline: 2px solid rgba(255, 70, 70, .9);
    outline-offset: 2px;
}


/* ==================================================
   ANIMATION
================================================== */

@keyframes captainBridgeAppear {

    from {
        opacity: 0;
        transform: translateY(8px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* ==================================================
   TABLET
================================================== */

@media (max-width: 900px) {

    .captain-bridge-message {
        width: min(95%, 620px);
    }

}


/* ==================================================
   HANDY
================================================== */

@media (max-width: 600px) {

    .captain-bridge-message {
        width: 96%;
        margin: 9px auto;

        border-radius: 12px;
    }

    .captain-bridge-inner {
        padding: 10px 11px;

        grid-template-columns: 40px minmax(0, 1fr);
        gap: 9px;
    }

    .captain-bridge-avatar {
        width: 40px;
        height: 40px;

        font-size: 22px;
    }

    .captain-bridge-name {
        font-size: 13px;
    }

    .captain-bridge-content p {
        font-size: 13px;
        line-height: 1.4;
    }

    .captain-bridge-time {
        font-size: 10px;
    }

}


/* ==================================================
   SEHR KLEINE HANDYS
================================================== */

@media (max-width: 380px) {

    .captain-bridge-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

}

/* ==================================================
   SOUNDBRIDGE SVG-ICONS
   In battleship.css und in die Chat-CSS einfügen.
================================================== */

/* ---------- Allgemeine SVG-Größe ---------- */

.sb-game-icon,
.sb-captain-icon {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}


/* ---------- Battleship-Spielfeld ---------- */

.battleship-cell {
    position: relative;
    display: grid;
    place-items: center;
    overflow: visible;
}

.battleship-cell .sb-game-icon {
    width: 72%;
    height: 72%;
}

.battleship-cell.has-ship {
    color: #e0a21a;
}

.battleship-cell.is-miss {
    color: #62c8ff;
    background:
        radial-gradient(
            circle at center,
            rgba(54, 172, 235, .20),
            rgba(7, 37, 55, .05) 70%
        );
}

.battleship-cell.is-hit {
    color: #ff8a20;
    background:
        radial-gradient(
            circle at center,
            rgba(255, 91, 20, .30),
            rgba(72, 10, 0, .20) 70%
        );
}

.battleship-cell.is-sunk {
    color: #ff3f2f;
    background:
        radial-gradient(
            circle at center,
            rgba(255, 35, 20, .36),
            rgba(70, 0, 0, .28) 72%
        );
}

.battleship-cell.is-selected-target {
    color: #ffb000;
    box-shadow:
        inset 0 0 0 2px rgba(255, 176, 0, .88),
        0 0 12px rgba(255, 176, 0, .48);
}

.battleship-cell.is-miss .sb-icon-miss {
    animation: sb-water-ripple 1.8s ease-in-out infinite;
}

.battleship-cell.is-hit .sb-icon-hit {
    animation: sb-hit-burst .55s ease-out both;
}

.battleship-cell.is-sunk .sb-icon-sunk {
    animation: sb-sunk-rock 1.5s ease-in-out infinite;
}

.battleship-cell.is-selected-target .sb-icon-target {
    animation: sb-target-pulse 1.05s ease-in-out infinite;
}


/* ---------- Captain Bridge ---------- */

.captain-bridge-avatar {
    display: grid;
    place-items: center;
    overflow: visible;
}

.captain-bridge-avatar .sb-captain-icon {
    width: 28px;
    height: 28px;
}

.captain-bridge-message[data-event="info"]
.captain-bridge-avatar {
    color: #ffb000;
}

.captain-bridge-message[data-event="miss"]
.captain-bridge-avatar {
    color: #62c8ff;
}

.captain-bridge-message[data-event="hit"]
.captain-bridge-avatar {
    color: #ff8a20;
}

.captain-bridge-message[data-event="sunk"]
.captain-bridge-avatar {
    color: #ff3f2f;
}

.captain-bridge-message[data-event="miss"]
.sb-captain-icon {
    animation: sb-water-ripple 1.8s ease-in-out infinite;
}

.captain-bridge-message[data-event="hit"]
.sb-captain-icon {
    animation: sb-hit-burst .55s ease-out both;
}

.captain-bridge-message[data-event="sunk"]
.sb-captain-icon {
    animation: sb-sunk-rock 1.5s ease-in-out infinite;
}


/* ---------- Animationen ---------- */

@keyframes sb-water-ripple {
    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: .88;
    }

    50% {
        transform: translateY(-2px) scale(1.06);
        opacity: 1;
    }
}

@keyframes sb-hit-burst {
    0% {
        transform: scale(.35) rotate(-18deg);
        opacity: .25;
    }

    65% {
        transform: scale(1.28) rotate(8deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

@keyframes sb-sunk-rock {
    0%,
    100% {
        transform: translateY(0) rotate(-3deg);
    }

    50% {
        transform: translateY(2px) rotate(3deg);
    }
}

@keyframes sb-target-pulse {
    0%,
    100% {
        transform: scale(.88);
        opacity: .74;
    }

    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sb-game-icon,
    .sb-captain-icon {
        animation: none !important;
    }
}