/* General Reset and Custom Variables */
:root {
    --bg-dark: #080711;
    --bg-card: rgba(18, 16, 35, 0.65);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(255, 255, 255, 0.16);
    --text-primary: #ffffff;
    --text-muted: #9e9cb6;

    /* Premium Color Accents */
    --accent-primary: #8a2be2;
    /* Violet */
    --accent-secondary: #00f2fe;
    /* Cyan */
    --accent-highlight: #ffdd00;
    /* Neon Yellow for pronunciation highlighting */
    --accent-glow: rgba(138, 43, 226, 0.4);

    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    padding: 20px 10px;
}

/* Background Glowing Blobs */
.background-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    top: -10%;
    left: -10%;
    animation: floatBlob 12s infinite ease-in-out alternate;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-secondary);
    bottom: -15%;
    right: -10%;
    animation: floatBlob 16s infinite ease-in-out alternate-reverse;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #ff007f;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.12;
}

@keyframes floatBlob {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(40px) scale(1.1);
    }
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 800px;
    background: none;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 25px;
    z-index: 1;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 24px;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px var(--accent-glow));
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #dcdcf0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Main Content Layout */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Buttons */
.btn {
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    padding: 14px 28px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #6f1ab6);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-glass-hover);
}

.btn-block {
    width: 100%;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition-smooth);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-glass-hover);
    transform: scale(1.05);
}

/* Settings Panel (Frosted slide-down) */
.settings-panel {
    background: rgba(10, 8, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: slideDown 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.settings-panel.hidden {
    display: none;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.panel-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-secondary);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-smooth);
}

.close-btn:hover {
    color: #ffffff;
}

.panel-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 45px;
}

.view-password-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition-smooth);
}

.view-password-btn:hover {
    color: #ffffff;
}

input[type="text"],
input[type="password"],
select,
textarea {
    font-family: inherit;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: #ffffff;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    outline: none;
    transition: var(--transition-smooth);
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

select option {
    background: #0d0b1a;
    color: #ffffff;
}

.input-note {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
}

/* Dashboard Cards */
.dashboard-card {
    background: none;
    border: none;
    border-radius: 0;
    padding: 10px 0;
    box-shadow: none;
    transition: var(--transition-smooth);
}

.dashboard-card:hover {
    border-color: transparent;
}

.card-header {
    border-bottom: none;
    padding-bottom: 8px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.helper-badge {
    font-size: 12px;
    color: var(--accent-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.textarea-wrapper {
    position: relative;
    width: 100%;
}

textarea {
    width: 100%;
    resize: none;
    border-radius: 16px;
    font-size: 16px;
    line-height: 1.5;
    padding-bottom: 40px;
    height: 50vh;
}

.textarea-actions {
    position: absolute;
    bottom: 12px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

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

.clear-text-btn {
    pointer-events: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition-smooth);
}

.play-listen {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
}

.clear-text-btn:hover {
    color: #ff4757;
}

/* Interactive Text Display */
.interactive-text-display {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    line-height: 1.5;
    text-align: center;
    padding: 100px 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 18px;
    height: 260px;
    overflow-y: hidden;
    position: relative;
}

.word-span {
    position: relative;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.75);
    border-radius: 6px;
    padding: 0 4px;
    transition: var(--transition-smooth);
    user-select: none;
}

.word-span:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.05);
}

.word-span.highlight {
    color: var(--accent-highlight);
    background: rgba(255, 221, 0, 0.15);
    text-shadow: 0 0 12px rgba(255, 221, 0, 0.4);
    box-shadow: 0 0 10px rgba(255, 221, 0, 0.05);
}

.word-span.speaking-individual {
    color: var(--accent-secondary);
    background: rgba(0, 242, 254, 0.15);
    text-shadow: 0 0 12px rgba(0, 242, 254, 0.4);
}

@keyframes wordPulse {
    from {
        transform: scale(1.03);
    }

    to {
        transform: scale(1.08);
    }
}

/* Progress Bar Custom */
.playback-progress-container {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-bar-wrapper {
    background: rgba(255, 255, 255, 0.06);
    height: 6px;
    border-radius: 3px;
    width: 100%;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.playback-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    border-radius: 3px;
    transition: width 0.1s linear;
}

.time-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

/* Audio Controls */
.audio-controls-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
}

.play-btn-circle {
    background: #ffffff;
    border: none;
    color: #0b0c10;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.25);
    transition: var(--transition-smooth);
}

.play-btn-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

.play-btn-circle:active {
    transform: scale(0.95);
}

/* Bottom Speed Footer Controls */
.speed-control-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--border-glass);
    padding-top: 18px;
    margin-top: 10px;
}

.speed-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.speed-circles-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.speed-circle-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    transition: var(--transition-smooth);
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.speed-circle-btn .val {
    font-size: 16px;
    font-weight: 700;
}

.speed-circle-btn .lbl {
    font-size: 10px;
    margin-left: 1px;
    font-weight: 400;
}

.speed-circle-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.speed-circle-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent-primary), #6f1ab6);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.speed-circle-btn.active:hover {
    transform: translateY(-2px) scale(1.05);
}

/* Spinner helper */
.hidden {
    display: none !important;
}

/* Toast System */
.toast {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: rgba(18, 15, 33, 0.95);
    border: 1px solid #ff4757;
    border-radius: 12px;
    padding: 16px 22px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    animation: toastSlideIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-width: 350px;
}

.toast.success {
    border-color: #2ed573;
}

.toast.info {
    border-color: var(--accent-secondary);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Tab View Layout */
.tab-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.tab-view.hidden {
    display: none !important;
}

/* Teleprompter Top Line Controls styling */
.top-controls-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 10px;
    margin-bottom: 5px;
}

/* Teleprompter Clean Display */
.teleprompter-clean-container {
    color: rgba(255, 255, 255, 0.95);
    font-weight: normal;
    text-shadow: none;
}

.teleprompter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px !important;
}

.teleprompter-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.icon-btn-text {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-smooth);
}

.icon-btn-text:hover {
    background: rgba(255, 255, 255, 0.285);
    border-color: var(--border-glass-hover);
}

.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.slider-wrapper input[type="range"] {
    width: 80px;
    height: 3px;
    accent-color: var(--accent-secondary);
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .app-container {
        border-radius: 16px;
    }

    .interactive-text-display {
        font-size: 18px;
        padding: 15px 5px;
        gap: 6px 8px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .speed-circle-btn {
        width: 48px;
        height: 48px;
    }

    .speed-circle-btn .val {
        font-size: 14px;
    }

    .play-btn-circle {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }

    .teleprompter-controls-bar {
        width: 95%;
        bottom: 15px;
        padding: 10px 15px;
        gap: 10px;
    }
}

/* File Upload Wrapper Styling */
.upload-wrapper {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

#file-name {
    font-size: 13px;
    color: var(--text-muted);
}

/* Collapsible Settings Styling */
.settings-collapse {
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    padding: 12px 18px;
    margin-top: 25px;
    transition: var(--transition-smooth);
}

.settings-collapse[open] {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

.settings-collapse summary {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    list-style: none;
    outline: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-collapse summary::-webkit-details-marker {
    display: none;
}

.settings-collapse summary:hover {
    color: #ffffff;
}

.settings-collapse .panel-body {
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Plain Teleprompter Words (no highlighting, hover backgrounds, etc.) */
.teleprompter-clean-container .word-span {
    color: rgba(255, 255, 255, 0.90);
    font-weight: 600;
    padding: 0 2px;
    background: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transform: none !important;
    transition: color 0.2s ease;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.teleprompter-clean-container .word-span:hover {
    color: var(--accent-secondary) !important;
    background: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.teleprompter-clean-container .word-span.speaking {
    color: #fed300 !important;
    font-weight: 900;
}

.teleprompter-clean-container .sentence-span {
    display: inline;
    padding: 0;
    margin: 0;
    transition: text-shadow 0.2s ease;
}

.teleprompter-clean-container .sentence-span.speaking-sentence .word-span {
    color: var(--accent-secondary) !important;
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.5);
}

/* Fullscreen Teleprompter Layout */
.teleprompter-fullscreen-card {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px) !important;
    /* Take full height of the viewport */
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.teleprompter-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
    position: relative;
}

/* Redefined Clean Text Container for Full Height */
.teleprompter-fullscreen-card .teleprompter-clean-container {
    height: 100% !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow-y: hidden !important;
    display: block !important;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

/* Scroll Wrapper translated by JS for subpixel-perfect smoothness */
.teleprompter-scroll-wrapper {
    padding-top: 50vh;
    padding-bottom: 48vh;
    padding-left: 30px;
    padding-right: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 5px;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    transition: none !important;
}

/* Extended Bottom Controls Bar */
.teleprompter-controls-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 600px;
    background: rgba(18, 16, 35, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 15px 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 200;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    transition: var(--transition-smooth);
}

.controls-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
    flex-direction: row;
}

.speed-row {
    display: flex;
    width: 100%;
}

.full-width-slider {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    color: var(--text-primary) !important;
    font-size: 12px !important;
}

.full-width-slider input[type="range"] {
    flex: 1 !important;
    width: 100% !important;
    height: 6px !important;
    border-radius: 3px !important;
    accent-color: var(--accent-secondary) !important;
    cursor: pointer !important;
}

#speed-value {
    font-family: monospace;
    font-size: 13px;
    color: var(--accent-secondary);
    min-width: 35px;
    text-align: right;
}

/* Extra touch overlay/fade effects for premium look */
.teleprompter-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 15%;
    z-index: 10;
    pointer-events: none;
}

.teleprompter-body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20%;
    z-index: 10;
    pointer-events: none;
}

.teleprompter-paragraph {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 4px 5px;
    margin-bottom: 25px;
}

.teleprompter-spacer {
    width: 100%;
    height: 220px;
    /* Taller spacer so the last lines scroll past the floating controls */
}

/* Pre-generation Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 7, 17, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: var(--transition-smooth);
}

.modal-overlay.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 30px 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-premium);
    animation: zoomIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Progress bar styling */
.progress-bar-container {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 5px;
    transition: width 0.1s ease;
}

.modal-status {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-secondary);
    font-family: monospace;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

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

/* Translation Floating Card (HUD Style) */
.translation-card {
    position: fixed;
    bottom: 170px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: 100%;
    min-width: 25px;
    max-width: 460px;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    padding: 10px;
    z-index: 150;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 1;
    text-align: center;
}

.translation-card.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}

.translation-card-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.trans-meaning {
    font-size: 18px;
    color: #ffffff;
    font-weight: 600;
    line-height: 1.4;
}