﻿@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&family=Gloria+Hallelujah&family=Inter:wght@400&family=Comic+Neue:wght@400;700&display=swap');

/* Scope variables to the container for safety */
.chat-container {
    --grey-metallic-start: #d4d4d4;
    --grey-metallic-end: #f4f4f4;
    --border: #1a1a1a;

    /* The Chosen One: Black Metallic */
    --black-start: #232526;
    --black-end: #414345;

    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 50px;
    margin: 0 auto;
    font-family: 'Fredoka', sans-serif;
}

.msg-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    position: relative;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.msg-wrapper.left {
    align-self: flex-start;
    align-items: flex-start;
}

.msg-wrapper.right {
    align-self: flex-end;
    align-items: flex-end;
}

.bubble {
    position: relative;
    padding: 24px 34px;
    border: 2px solid var(--border);
    z-index: 2;
    /* Slight 3D Metallic Look */
    box-shadow:
        inset 2px 2px 5px rgba(255, 255, 255, 0.4),
        inset -2px -2px 5px rgba(0, 0, 0, 0.1),
        3px 3px 0px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

/* --- Left Bubbles (Black Metallic) --- */
.left .bubble {
    background: linear-gradient(135deg, var(--black-start), var(--black-end));
    color: #eee;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
    border-color: #000;
}

/* --- Right Bubbles (Grey Metallic) --- */
.right .bubble {
    background: linear-gradient(135deg, var(--grey-metallic-start), var(--grey-metallic-end));
    color: #111;
}

/* 
   VARIATION ENGINE: Extended Asymmetric hand-drawn shapes 
   Using nth-of-type to automatically vary shapes
*/

/* --- LEFT BUBBLES --- */
.left.msg-wrapper:nth-of-type(8n+1) .bubble {
    border-radius: 255px 25px 225px 4px / 25px 225px 25px 15px;
    transform: rotate(-1deg);
}

.left.msg-wrapper:nth-of-type(8n+2) .bubble {
    border-radius: 25px 250px 30px 10px / 250px 30px 200px 15px;
    transform: rotate(1.2deg);
}

.left.msg-wrapper:nth-of-type(8n+3) .bubble {
    border-radius: 220px 40px 200px 5px / 30px 140px 40px 15px;
    transform: rotate(-0.5deg);
}

.left.msg-wrapper:nth-of-type(8n+4) .bubble {
    border-radius: 40px 200px 30px 8px / 150px 40px 170px 15px;
    transform: rotate(0.8deg);
}

.left.msg-wrapper:nth-of-type(8n+5) .bubble {
    border-radius: 240px 30px 210px 5px / 40px 230px 30px 20px;
    transform: rotate(-1.5deg);
}

.left.msg-wrapper:nth-of-type(8n+6) .bubble {
    border-radius: 35px 240px 40px 10px / 240px 35px 190px 15px;
    transform: rotate(1deg);
}

.left.msg-wrapper:nth-of-type(8n+7) .bubble {
    border-radius: 230px 25px 215px 5px / 25px 210px 25px 15px;
    transform: rotate(-0.8deg);
}

.left.msg-wrapper:nth-of-type(8n+8) .bubble {
    border-radius: 30px 230px 35px 8px / 220px 40px 180px 15px;
    transform: rotate(1.5deg);
}

/* --- RIGHT BUBBLES --- */
.right.msg-wrapper:nth-of-type(8n+1) .bubble {
    border-radius: 25px 255px 15px 225px / 225px 25px 15px 25px;
    transform: rotate(1deg);
}

.right.msg-wrapper:nth-of-type(8n+2) .bubble {
    border-radius: 250px 30px 10px 40px / 35px 250px 15px 200px;
    transform: rotate(-1.2deg);
}

.right.msg-wrapper:nth-of-type(8n+3) .bubble {
    border-radius: 40px 120px 5px 150px / 140px 30px 15px 40px;
    transform: rotate(0.5deg);
}

.right.msg-wrapper:nth-of-type(8n+4) .bubble {
    border-radius: 180px 40px 8px 30px / 40px 150px 15px 170px;
    transform: rotate(-0.8deg);
}

.right.msg-wrapper:nth-of-type(8n+5) .bubble {
    border-radius: 30px 240px 5px 210px / 230px 40px 20px 30px;
    transform: rotate(1.5deg);
}

.right.msg-wrapper:nth-of-type(8n+6) .bubble {
    border-radius: 240px 35px 10px 40px / 35px 240px 15px 190px;
    transform: rotate(-1deg);
}

.right.msg-wrapper:nth-of-type(8n+7) .bubble {
    border-radius: 25px 230px 5px 215px / 210px 25px 15px 25px;
    transform: rotate(0.8deg);
}

.right.msg-wrapper:nth-of-type(8n+8) .bubble {
    border-radius: 230px 30px 8px 35px / 40px 220px 15px 180px;
    transform: rotate(-1.5deg);
}

/* Timestamp */
.timestamp {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    margin-top: 8px;
    color: #999;
    letter-spacing: 0.05em;
}

/* Typing Animation */
.bubble.typing {
    min-width: 60px;
    padding: 15px 25px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typing-dots {
    display: flex;
    gap: 5px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Divider: New Messages */
.new-messages-divider {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
    opacity: 0.9;
}

.divider-line {
    flex: 1;
    height: 0;
    width: 100%;
    border-top: 2px dotted #aaa;
}

.new-messages-divider .divider-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #d32f2f;
    font-weight: 800;
}

.bubble p {
    margin: 0;
    /* from chat inline p style usually, or reset */
    line-height: 1.4;
}

/* --- OPEN QUESTION BOX STYLES (Imitated) --- */

.variant-open-question-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.v-variant-open-question-gap-card {
    width: 100%;
    max-width: 650px;
    border: 4px solid #000;
    background-color: #000;
    display: flex;
    flex-direction: column;
    position: relative;
    /* margin-bottom: 20px; Removed margin top as requested */
    margin-top: 0;
    margin-bottom: 50px;
    /* Some spacing at bottom */
}

.v-variant-open-question-card-header {
    background-color: #FFE600;
    padding: 12px 20px;
    text-align: center;
    border-bottom: 4px solid #000;
    color: #000;
}

.v-variant-open-question-header-text {
    font-family: 'Comic Neue', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    font-style: italic;
    margin: 0;
}

.v-variant-open-question-card-body-frame {
    padding: 8px;
    position: relative;
}

.v-variant-open-question-frame-red {
    background-color: #FF0055;
}

.v-variant-open-question-card-body {
    padding: 30px;
    padding-bottom: 60px;
    color: #000;
    font-size: 1.5rem;
    line-height: 1.8;
    min-height: 200px;
    text-align: left;
    /* Ensure text is readable */
}

.v-variant-open-question-bg-light-red {
    background-color: #FFB6C1;
}

.v-variant-open-question-open-input {
    width: 100%;
    background: #fff;
    border: 2px solid #000;
    padding: 6px 12px;
    font-family: 'Comic Neue', cursive;
    font-size: 1.3rem;
    font-weight: 700;
    resize: none;
    overflow: hidden;
    outline: none;
    border-radius: 0;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

.v-variant-open-question-open-input:focus {
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
}

.v-variant-open-question-warning-box {
    background-color: #FFE600;
    border: 3px solid #000;
    padding: 10px;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    flex: 1;
    margin-right: 15px;
    display: none;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
    color: #000;
}

.v-variant-open-question-warning-box.visible {
    display: block;
}

.v-variant-open-question-char-counter {
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    color: #000;
}

.v-variant-open-question-paste-feedback-box.v-variant-open-question-error {
    background: #FFE4EC;
    border: 2px solid #FF0055;
    padding: 10px;
    font-size: 1rem;
    color: #FF0055;
    margin-top: 15px;
}

/* Banner Buttons */
.v-variant-open-question-banner-btn {
    position: absolute;
    bottom: 25px;
    padding: 8px 20px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    cursor: pointer;
    border: 3px solid #000;
    background-color: #FFE600;
    color: #000;
    z-index: 20;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    user-select: none;
}

.v-variant-open-question-banner-btn:hover {
    transform: rotate(-1deg) scale(1.05);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.v-variant-open-question-banner-btn:active {
    background-color: #00F5FF !important;
    color: #000 !important;
    transform: scale(0.95);
}

.v-variant-open-question-pos-left {
    left: -10px;
    transform: rotate(3deg);
}

.v-variant-open-question-pos-right {
    right: -10px;
    transform: rotate(-3deg);
}

.v-variant-open-question-view-mode {
    display: none;
    font-weight: 700;
    font-size: 1.2rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.banner-red {
    background-color: #FF0055 !important;
    color: #fff !important;
}

.banner-blue {
    background-color: #0066FF !important;
    color: #fff !important;
}

.banner-green {
    background-color: #00cc00 !important;
    color: #fff !important;
}

.edit-btn-active {
    background-color: #00F5FF !important;
    color: #000 !important;
}

@media (max-width: 600px) {
    .v-variant-open-question-header-text {
        font-size: 1.3rem !important;
    }

    .v-variant-open-question-card-body {
        padding: 20px !important;
        padding-bottom: 60px !important;
    }

    .v-variant-open-question-open-input {
        font-size: 1rem !important;
    }

    .v-variant-open-question-banner-btn {
        font-size: 1rem;
    }

    .v-variant-open-question-pos-left {
        left: 10px;
    }

    .v-variant-open-question-pos-right {
        right: 10px;
    }
}

/* --- COPY PROMPT BOX STYLES (Imitated) --- */

.v-variant-copy-prompt-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.v-variant-copy-prompt-gap-card {
    width: 100%;
    max-width: 650px;
    border: 4px solid #000;
    background-color: #000;
    display: flex;
    flex-direction: column;
    position: relative;
    /* margin-bottom: 20px; Removed margin top as requested */
    margin-top: 0;
    margin-bottom: 50px;
}

.v-variant-copy-prompt-card-header {
    background-color: #FFE600;
    padding: 12px 20px;
    text-align: center;
    border-bottom: 4px solid #000;
    color: #000;
}

.v-variant-copy-prompt-header-text {
    font-family: 'Comic Neue', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    font-style: italic;
    margin: 0;
}

.v-variant-copy-prompt-card-body-frame {
    padding: 8px;
    position: relative;
}

.v-variant-copy-prompt-frame-green {
    background-color: #00cc00;
}

.v-variant-copy-prompt-card-body {
    padding: 30px;
    padding-bottom: 80px;
    color: #000;
    min-height: 200px;
}

.v-variant-copy-prompt-bg-light-green {
    background-color: #CCFFCC;
}

.v-variant-copy-prompt-banner-btn {
    position: absolute;
    bottom: 25px;
    padding: 8px 20px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    cursor: pointer;
    border: 3px solid #000;
    background-color: #FFE600;
    color: #000;
    z-index: 20;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    user-select: none;
    text-decoration: none;
}

.v-variant-copy-prompt-banner-btn:hover {
    transform: rotate(-1deg) scale(1.05);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.v-variant-copy-prompt-banner-btn:active {
    background-color: #00F5FF !important;
    transform: scale(0.95);
}

.v-variant-copy-prompt-pos-right {
    right: -10px;
    transform: rotate(-3deg);
}

/* --- COPY PROMPT SPECIFIC STYLES --- */
.v-variant-copy-prompt-text-container {
    position: relative;
}

.v-variant-copy-prompt-text {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
}

.v-variant-copy-prompt-short-view {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.v-variant-copy-prompt-full-view {
    display: none;
}

.v-variant-copy-prompt-text-container.expanded .v-variant-copy-prompt-short-view {
    display: none;
}

.v-variant-copy-prompt-text-container.expanded .v-variant-copy-prompt-full-view {
    display: block;
}

.v-variant-copy-prompt-blurry-preview {
    position: relative;
    height: 40px;
    overflow: hidden;
    margin-top: -5px;
}

.v-variant-copy-prompt-blurry-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(204, 255, 204, 0) 0%, rgba(204, 255, 204, 0.5) 70%, rgba(204, 255, 204, 0.9) 100%);
    z-index: 1;
}

.v-variant-copy-prompt-blurry-preview .blur-text {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    filter: blur(1.5px);
    opacity: 0.8;
    user-select: none;
}

.v-variant-copy-prompt-text-container.expanded .v-variant-copy-prompt-blurry-preview {
    display: none;
}

.v-variant-copy-prompt-expand-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    cursor: pointer;
    padding: 8px 0;
    transition: transform 0.2s;
}

.v-variant-copy-prompt-expand-dots:hover {
    transform: scale(1.1);
}

.v-variant-copy-prompt-expand-dots .dot {
    width: 12px;
    height: 12px;
    background-color: #000;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.v-variant-copy-prompt-expand-dots:hover .dot {
    background-color: #333;
}

.v-variant-copy-prompt-text-container.expanded .v-variant-copy-prompt-expand-dots {
    display: none;
}

@media (max-width: 600px) {
    .v-variant-copy-prompt-header-text {
        font-size: 1.3rem !important;
    }

    .v-variant-copy-prompt-text {
        font-size: 0.95rem;
    }

    .v-variant-copy-prompt-blurry-preview .blur-text {
        font-size: 0.95rem;
    }

    .v-variant-copy-prompt-banner-btn {
        padding: 6px 15px;
        font-size: 1rem;
    }

    .v-variant-copy-prompt-pos-right {
        right: 10px;
    }
}

/* --- GEMINI LINK BOX STYLES (Imitated) --- */

.v-variant-gemini-only-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.v-variant-gemini-only-gap-card {
    width: 100%;
    max-width: 650px;
    border: 4px solid #000;
    background-color: #000;
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 50px;
    /* margin-top: 40px; Overridden by JS inline style to 0 */
}

/* Optional: Paste feedback error box if needed (from template) */
.v-variant-fill-in-the-gap-paste-feedback-box.v-variant-fill-in-the-gap-error {
    background: #FFB6C1;
    padding: 12px 20px;
    text-align: center;
    border-bottom: 4px solid #000;
    color: #000;
}

.v-variant-gemini-only-card-header {
    background-color: #FFE600;
    padding: 12px 20px;
    text-align: center;
    border-bottom: 4px solid #000;
    color: #000;
}

.v-variant-gemini-only-header-text {
    font-family: 'Comic Neue', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    font-style: italic;
    margin: 0;
}

.v-variant-gemini-only-card-body-frame {
    padding: 8px;
}

.v-variant-gemini-only-frame-pink {
    background-color: #FF69B4;
}

.v-variant-gemini-only-card-body {
    padding: 30px;
    color: #000;
}

.v-variant-gemini-only-bg-light-pink {
    background-color: #FFE4E9;
}

.v-variant-gemini-only-execute-body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.v-variant-gemini-only-ai-icons-row {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.v-variant-gemini-only-ai-link {
    display: block;
    transition: transform 0.15s;
}

.v-variant-gemini-only-ai-link:hover {
    transform: scale(1.1) rotate(5deg);
}

.v-variant-gemini-only-ai-logo {
    border: none;
    box-shadow: none;
}

.v-variant-gemini-only-ai-logo.v-variant-gemini-only-large {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

@media (max-width: 600px) {
    .v-variant-gemini-only-header-text {
        font-size: 1.3rem !important;
    }

    .v-variant-gemini-only-ai-logo.v-variant-gemini-only-large {
        width: 80px;
        height: 80px;
    }
}

/* --- TEXT PASTE BOX STYLES (Imitated) --- */

.variant-text-paste-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.v-variant-text-paste-gap-card {
    width: 100%;
    max-width: 650px;
    border: 4px solid #000;
    background-color: #000;
    display: flex;
    flex-direction: column;
    position: relative;
    margin-top: 0;
    margin-bottom: 50px;
}

.v-variant-text-paste-card-header {
    background-color: #FFE600;
    padding: 12px 20px;
    text-align: center;
    border-bottom: 4px solid #000;
    color: #000;
}

.v-variant-text-paste-header-text {
    font-family: 'Comic Neue', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    font-style: italic;
    margin: 0;
}

.v-variant-text-paste-card-body-frame {
    padding: 8px;
    position: relative;
}

.v-variant-text-paste-frame-turquoise {
    background-color: #00F5FF;
}

.v-variant-text-paste-card-body {
    padding: 30px;
    padding-bottom: 80px;
    color: #000;
    min-height: 200px;
}

.v-variant-text-paste-bg-light-turquoise {
    background-color: #E0FFFE;
}

.v-variant-text-paste-open-input {
    width: 100%;
    background: #fff;
    border: 2px solid #000;
    padding: 6px 12px;
    font-family: monospace;
    font-size: 1rem;
    font-weight: 400;
    resize: vertical;
    outline: none;
    border-radius: 0;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

.v-variant-text-paste-open-input:focus {
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
}

.v-variant-text-paste-feedback-box {
    margin-top: 20px;
    width: 100%;
    display: none;
    border: 4px solid #000;
    padding: 20px;
    text-align: center;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
    line-height: 1.4;
}

.v-variant-text-paste-feedback-box.error {
    display: block;
    background-color: #FF85A1;
    color: #000;
}

.v-variant-text-paste-feedback-box.success {
    display: block;
    background-color: #B5FF99;
    color: #000;
}

.v-variant-text-paste-banner-btn {
    position: absolute;
    bottom: 25px;
    padding: 8px 20px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    cursor: pointer;
    border: 3px solid #000;
    background-color: #FFE600;
    color: #000;
    z-index: 20;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    user-select: none;
    right: -10px;
    transform: rotate(-3deg);
}

.v-variant-text-paste-banner-btn:hover {
    transform: rotate(-1deg) scale(1.05);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.v-variant-text-paste-banner-btn:active {
    background-color: #00F5FF !important;
    color: #000 !important;
    transform: scale(0.95);
}

@media (max-width: 600px) {
    .v-variant-text-paste-header-text {
        font-size: 1.3rem !important;
    }

    .v-variant-text-paste-open-input {
        font-size: 0.9rem !important;
    }

    .v-variant-text-paste-banner-btn {
        font-size: 1rem;
        right: 10px;
    }

    .v-variant-text-paste-feedback-box {
        font-size: 1.1rem;
        padding: 15px;
    }
}

/* --- RANKING SELECTION BOX STYLES (Imitated) --- */

.variant-ranking-selection-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.v-variant-ranking-selection-gap-card {
    width: 100%;
    max-width: 650px;
    border: 4px solid #000;
    background-color: #000;
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 50px;
    /* Consistent spacing */
    margin-top: 0;
}

.v-variant-ranking-selection-card-header {
    background-color: #FFE600;
    padding: 12px 20px;
    text-align: center;
    border-bottom: 4px solid #000;
    color: #000;
    transition: background-color 0.3s;
}

.v-variant-ranking-selection-card-header.ranking-active {
    background-color: #00F5FF;
}

.v-variant-ranking-selection-header-text {
    font-family: 'Comic Neue', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    font-style: italic;
    margin: 0;
}

.v-variant-ranking-selection-card-body-frame {
    padding: 8px;
    position: relative;
}

.v-variant-ranking-selection-frame-grey {
    background-color: #888;
}

.v-variant-ranking-selection-card-body {
    padding: 30px;
    padding-bottom: 45px;
    color: #000;
}

.v-variant-ranking-selection-bg-light-grey {
    background-color: #EAEAEA;
}

.v-variant-ranking-selection-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 40px;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: #fff;
    border: 3px solid #000;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ranking-item.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.ranking-item:hover {
    transform: translateX(5px);
}

.ranking-radio {
    width: 24px;
    height: 24px;
    border: 2px solid #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #fff;
    margin-right: 15px;
}

.ranking-radio::after {
    content: '';
    width: 14px;
    height: 14px;
    background: #000;
    border-radius: 50%;
    display: none;
}

.ranking-text {
    flex-grow: 1;
    font-weight: 700;
    font-family: 'Comic Neue', cursive;
    font-size: 1.2rem;
    text-transform: none;
    color: #000;
}

.ranking-close {
    font-weight: 700;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    color: #000;
    padding: 0 10px;
    transition: color 0.1s;
}

.ranking-close:hover {
    color: #ff0000;
}

/* Active Styling */
.ranking-item.active {
    background: linear-gradient(135deg, #ff4d4d 0%, #b30000 100%);
    border-color: #000;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
}

.ranking-item.active .ranking-text {
    color: #fff;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.3);
}

.ranking-item.active .ranking-radio {
    border-color: #fff;
}

.ranking-item.active .ranking-radio::after {
    display: block;
}

.ranking-item.active .ranking-close {
    color: #fff;
}

.v-variant-ranking-selection-banner-btn {
    position: absolute;
    bottom: 25px;
    padding: 8px 20px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    cursor: pointer;
    border: 3px solid #000;
    background-color: #FFE600;
    color: #000;
    z-index: 20;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    user-select: none;
}

.v-variant-ranking-selection-banner-btn:hover {
    transform: rotate(-1deg) scale(1.05);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.v-variant-ranking-selection-banner-btn:active {
    background-color: #00F5FF !important;
    color: #000 !important;
    transform: scale(0.95);
}

.v-variant-ranking-selection-pos-left {
    left: -10px;
    transform: rotate(3deg);
}

.v-variant-ranking-selection-pos-right {
    right: -10px;
    transform: rotate(-3deg);
}

.v-variant-ranking-selection-ok-default {
    background-color: #00cc00;
    color: #fff;
}

.v-variant-ranking-selection-reload-hidden {
    display: none !important;
}

.v-variant-ranking-selection-ranking-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(128, 128, 128, 0.5);
    z-index: 15;
    pointer-events: none;
    display: none;
}

.v-variant-ranking-selection-ranking-overlay.visible {
    display: block;
}

.ranking-error-msg {
    display: none;
    color: #ff0000;
    background-color: #fff;
    border: 2px solid #ff0000;
    padding: 10px;
    text-align: center;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

@media (max-width: 600px) {
    .v-variant-ranking-selection-header-text {
        font-size: 1.3rem !important;
    }

    .ranking-text {
        font-size: 0.95rem !important;
    }

    .ranking-radio {
        width: 20px !important;
        height: 20px !important;
        margin-right: 8px !important;
    }

    .ranking-close {
        font-size: 1.5rem !important;
    }

    .v-variant-ranking-selection-banner-btn {
        font-size: 1rem;
    }

    .v-variant-ranking-selection-pos-left {
        left: 10px;
    }

    .v-variant-ranking-selection-pos-right {
        right: 10px;
    }
}

/* --- EDIT SENTENCE BOX STYLES (Imitated) --- */

.variant-edit-sentence-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.v-variant-edit-sentence-gap-card {
    width: 100%;
    max-width: 650px;
    border: 4px solid #000;
    background-color: #000;
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 50px;
    margin-top: 0;
}

.v-variant-edit-sentence-card-header {
    background-color: #FFE600;
    padding: 12px 20px;
    text-align: center;
    border-bottom: 4px solid #000;
    color: #000;
}

.v-variant-edit-sentence-card-header.done {
    background-color: #00F5FF;
}

.v-variant-edit-sentence-header-text {
    font-family: 'Comic Neue', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    font-style: italic;
    margin: 0;
}

.v-variant-edit-sentence-card-body-frame {
    padding: 8px;
    position: relative;
}

.v-variant-edit-sentence-frame-grey {
    background-color: #A0A0A0;
}

.v-variant-edit-sentence-card-body {
    padding: 30px;
    padding-bottom: 80px;
    color: #000;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.v-variant-edit-sentence-bg-light-grey {
    background-color: #e0e0e0;
}

.v-variant-edit-sentence-gap-input {
    background: #fff;
    border: 2px solid #000;
    padding: 6px 12px;
    font-family: 'Comic Neue', cursive;
    font-size: 1.3rem;
    font-weight: 700;
    outline: none;
    border-radius: 0;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.v-variant-edit-sentence-gap-input:focus {
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
}

.v-variant-edit-sentence-char-limit-info {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    text-align: center;
    display: none;
    max-width: 500px;
}

.v-variant-edit-sentence-char-limit-info.visible {
    display: block;
}

.v-variant-edit-sentence-banner-btn {
    position: absolute;
    bottom: 25px;
    padding: 8px 20px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    cursor: pointer;
    border: 3px solid #000;
    background-color: #FFE600;
    color: #000;
    z-index: 20;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    user-select: none;
}

.v-variant-edit-sentence-banner-btn:hover {
    transform: rotate(-1deg) scale(1.05);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.v-variant-edit-sentence-banner-effect-turquoise:active {
    background-color: #00F5FF !important;
    color: #000 !important;
    transform: scale(0.95);
}

.v-variant-edit-sentence-pos-left {
    left: -10px;
    transform: rotate(3deg);
}

.v-variant-edit-sentence-pos-right {
    right: -10px;
    transform: rotate(-3deg);
}

.reload-btn-active {
    background-color: #00F5FF !important;
    color: #000 !important;
}

@media (max-width: 600px) {
    .v-variant-edit-sentence-header-text {
        font-size: 1.3rem !important;
    }

    .v-variant-edit-sentence-gap-input {
        font-size: 1.1rem !important;
    }

    #sentence-display {
        font-size: 1.1rem !important;
    }

    .v-variant-edit-sentence-banner-btn {
        font-size: 1rem;
    }

    .v-variant-edit-sentence-pos-left {
        left: 10px;
    }

    .v-variant-edit-sentence-pos-right {
        right: 10px;
    }
}

/* --- IMAGE PASTE BOX STYLES (Imitated) --- */

.variant-image-paste-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.v-variant-image-paste-gap-card {
    width: 100%;
    max-width: 650px;
    border: 4px solid #000;
    background-color: #000;
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 50px;
    /* Consistent spacing */
    margin-top: 0;
}

.v-variant-image-paste-card-header {
    background-color: #FFE600;
    padding: 12px 20px;
    text-align: center;
    border-bottom: 4px solid #000;
    color: #000;
}

.v-variant-image-paste-header-text {
    font-family: 'Comic Neue', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    font-style: italic;
    margin: 0;
}

.v-variant-image-paste-card-body-frame {
    padding: 8px;
    position: relative;
}

.v-variant-image-paste-frame-turquoise {
    background-color: #00F5FF;
}

.v-variant-image-paste-card-body {
    padding: 30px;
    padding-bottom: 80px;
    color: #000;
    min-height: 250px;
}

.v-variant-image-paste-bg-light-turquoise {
    background-color: #E0FFFE;
}

.v-variant-image-paste-banner-btn {
    position: absolute;
    bottom: 25px;
    padding: 8px 20px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    cursor: pointer;
    border: 3px solid #000;
    background-color: #FFE600;
    color: #000;
    z-index: 20;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v-variant-image-paste-banner-btn:hover {
    transform: rotate(-1deg) scale(1.05);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.v-variant-image-paste-banner-btn:active {
    background-color: #00F5FF !important;
    color: #000 !important;
    transform: scale(0.95);
}

.v-variant-image-paste-pos-left {
    left: -10px;
    transform: rotate(3deg);
}

.v-variant-image-paste-pos-right {
    right: -10px;
    transform: rotate(-3deg);
}

@media (max-width: 600px) {
    .v-variant-image-paste-header-text {
        font-size: 1.3rem !important;
    }

    .v-variant-image-paste-banner-btn {
        font-size: 1rem;
    }

    .v-variant-image-paste-pos-left {
        left: 10px;
    }

    .v-variant-image-paste-pos-right {
        right: 10px;
    }
}

/* --- IMAGES IN BUBBLES --- */
.bubble-img-container {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    border-radius: 4px;
    background: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 12px;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: center;
}

.bubble-img-container img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    display: block;
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.bubble-img-container:hover img {
    transform: scale(1.02);
}

/* Magnifying glass overlay */
.bubble-img-container::after {
    content: "🔍";
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    color: #000;
}

/* --- IMAGE MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-img-wrapper {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-img-wrapper {
    transform: scale(1);
}

.modal-img-wrapper img {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    border: 4px solid #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: -10px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    font-family: 'Fredoka', sans-serif;
    font-weight: bold;
}

/* --- GIG RESULTS STYLES --- */

.variant-gig-results-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease;
    margin-bottom: 50px;
    margin-top: 20px;
}

.v-variant-gig-results-gap-card {
    width: 100%;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.v-variant-gig-results-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
}

.v-variant-gig-results-timer {
    font-family: 'Comic Neue', cursive;
    font-weight: 700;
    border: 4px solid #000;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
    /* Fully black shadow */
    padding: 10px 30px;
    background: #fff;
    line-height: 1;
    text-align: center;
    /* Default Mobile Size */
    font-size: 2rem;
}

.v-variant-gig-results-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.v-variant-gig-results-img {
    max-width: 100%;
    height: auto;
    /* No border or shadow as requested */
}

@media (min-width: 768px) {
    .v-variant-gig-results-timer {
        font-size: 4rem;
        /* Tablet */
    }
}

@media (min-width: 992px) {
    .v-variant-gig-results-timer {
        font-size: 5rem;
        /* Desktop */
    }
}

/* --- IMAGE RESULT GRID STYLES (Imitated) --- */

.variant-image-result-grid-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.v-variant-image-result-grid-gap-card {
    width: 100%;
    max-width: 650px;
    border: 4px solid #000;
    background-color: #000;
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 20px;
    margin-top: 0;
}

.v-variant-image-result-grid-card-header {
    background-color: #FF0055;
    padding: 12px 20px;
    text-align: center;
    border-bottom: 4px solid #000;
    color: #fff;
}

.v-variant-image-result-grid-header-text {
    font-family: 'Comic Neue', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    font-style: italic;
    margin: 0;
}

.v-variant-image-result-grid-card-body-frame {
    padding: 8px;
}

.v-variant-image-result-grid-frame-yellow {
    background-color: #FFE600;
}

.v-variant-image-result-grid-card-body {
    padding: 15px;
    color: #000;
}

.v-variant-image-result-grid-bg-light-yellow {
    background-color: #FFF9C4;
}

.v-variant-image-result-grid-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.v-variant-image-result-grid-image-container {
    border: 3px solid #000;
    cursor: zoom-in;
    transition: transform 0.2s;
    overflow: hidden;
    position: relative;
    background: #fff;
}

.v-variant-image-result-grid-image-container:hover {
    transform: scale(1.03);
}

.v-variant-image-result-grid-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    display: block;
}

.v-variant-image-result-grid-copy-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 8px 25px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    text-transform: uppercase;
    cursor: pointer;
    border: 3px solid #000;
    background-color: #FFE600;
    color: #000;
    z-index: 10;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.2);
    transition: all 0.15s ease;
    user-select: none;
    transform: rotate(-3deg);
}

.v-variant-image-result-grid-copy-btn:hover {
    transform: rotate(-1deg) scale(1.05);
    box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5);
}

.v-variant-image-result-grid-copy-btn:active {
    background-color: #00F5FF !important;
    transform: scale(0.95);
}

@media (max-width: 600px) {
    .v-variant-image-result-grid-header-text {
        font-size: 1.3rem !important;
    }

    .v-variant-image-result-grid-grid {
        gap: 6px;
        grid-template-columns: 1fr;
    }

    .v-variant-image-result-grid-copy-btn {
        padding: 8px 20px;
        font-size: 1.1rem;
        bottom: 8px;
        right: 8px;
    }
}

/* --- SIMPLE LINK BOX STYLES (Imitated) --- */

.variant-simple-names-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.v-variant-simple-names-gap-card {
    width: 100%;
    max-width: 650px;
    border: 4px solid #000;
    background-color: #000;
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 20px;
    margin-top: 0;
}

.v-variant-simple-names-card-header {
    background-color: #FFE600;
    padding: 12px 20px;
    text-align: center;
    border-bottom: 4px solid #000;
    color: #000;
}

.v-variant-simple-names-header-text {
    font-family: 'Comic Neue', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    font-style: italic;
    margin: 0;
}

.v-variant-simple-names-card-body-frame {
    padding: 8px;
}

.v-variant-simple-names-frame-orange {
    background-color: #FF8C00;
}

.v-variant-simple-names-card-body {
    padding: 30px;
    color: #000;
}

.v-variant-simple-names-bg-light-orange {
    background-color: #FFE4C4;
}

.v-variant-simple-names-compact {
    padding: 20px;
}

.v-variant-simple-names-choice-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.v-variant-simple-names-link-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 25px;
    background-color: #fff;
    border: 3px solid #000;
    font-family: 'Comic Neue', cursive;
    font-size: 1.3rem;
    font-weight: 700;
    color: #000;
    text-decoration: none;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s;
}

.v-variant-simple-names-link-option:hover {
    background-color: #00F5FF;
    transform: rotate(-2deg) scale(1.05);
    box-shadow: 4px 4px 0px #000;
}

.v-variant-simple-names-link-option:active {
    transform: scale(0.98);
    box-shadow: 1px 1px 0px #000;
}

@media (max-width: 600px) {
    .v-variant-simple-names-header-text {
        font-size: 1.3rem !important;
    }

    .v-variant-simple-names-link-option {
        font-size: 1.1rem !important;
        padding: 14px 20px;
    }
}

/* --- TEXT RESULT BOX STYLES (Imitated) --- */

.variant-content-results-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.v-variant-content-results-gap-card {
    width: 100%;
    max-width: 650px;
    border: 4px solid #000;
    background-color: #000;
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 20px;
    margin-top: 0;
}

.v-variant-content-results-card-header {
    background-color: #FF0055;
    padding: 12px 20px;
    text-align: center;
    border-bottom: 4px solid #000;
    color: #fff;
}

.v-variant-content-results-header-text {
    font-family: 'Comic Neue', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    font-style: italic;
    margin: 0;
}

.v-variant-content-results-card-body-frame {
    padding: 8px;
    position: relative;
}

.v-variant-content-results-frame-yellow {
    background-color: #FFE600;
}

.v-variant-content-results-card-body {
    padding: 30px;
    padding-bottom: 40px;
    color: #000;
    font-size: 1.5rem;
    line-height: 1.8;
    font-weight: 400;
    min-height: 100px;
}

.v-variant-content-results-bg-light-yellow {
    background-color: #FFF9C4;
}

.content-result-header-wrapper {
    border-bottom: 2px solid #000;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.content-result-header-text {
    font-family: 'Fredoka', sans-serif;
    margin: 0;
    text-transform: uppercase;
    font-size: 1.1rem;
    color: #444;
    font-weight: 700;
}

.content-result-value {
    font-weight: 400;
    /* Not bold as requested */
    margin-top: 0;
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .v-variant-content-results-header-text {
        font-size: 1rem !important;
    }

    .v-variant-content-results-card-body {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }

    .content-result-value {
        font-size: 1rem !important;
        /* Smaller on mobile as requested */
    }

    .content-result-header-text {
        font-size: 0.9rem !important;
    }
}

/* Banner Buttons for Content Results */
.v-variant-content-results-banner-btn {
    position: absolute;
    bottom: 25px;
    padding: 8px 20px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    cursor: pointer;
    border: 3px solid #000;
    background-color: #FFE600;
    color: #000;
    z-index: 20;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    user-select: none;
}

.v-variant-content-results-banner-btn:hover {
    transform: rotate(-1deg) scale(1.05);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.v-variant-content-results-banner-btn:active {
    background-color: #00F5FF !important;
    color: #000 !important;
    transform: scale(0.95);
}

.v-variant-content-results-pos-left {
    left: -10px;
    transform: rotate(3deg);
}

.v-variant-content-results-pos-right {
    right: -10px;
    transform: rotate(-3deg);
}

@media (max-width: 600px) {
    .v-variant-content-results-banner-btn {
        font-size: 0.8rem;
    }

    .v-variant-content-results-pos-left {
        left: 10px;
    }

    .v-variant-content-results-pos-right {
        right: 10px;
    }
}

/* Divider after Method Buttons */
.section-divider {
    width: 100%;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 4px dashed #000;
}