/* Capitalization mistakes: treat as a red underline, but maybe dashed to distinguish */
.char-wrong-capitalization {
  color: #dc2626;
  text-decoration: underline;
  font-weight: 500;
}
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
     /* height: 100%; */ 
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #fdfdfd;
    color: #1f2937;
    /* height: 100%; */
    padding: 20px;
    overflow: hidden;
    margin: 0;
}

.container {
    max-width: 100%;
    width: 100%;
    height: auto;
    /* min-height: calc(100vh - 40px); */ 
    margin: 0 auto;
    background: transparent;
    overflow: hidden;
    display: block;
}

.content { 
    padding: 0; 
    width: 100%; 
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ----- AUDIO SECTION ---------------------------------------------- */
.audio-section {
    padding: 20px;
    margin-bottom: 24px;
    border-radius: 20px;
    text-align: center;
    color: #374151;
    width: 100%;
    overflow: visible !important;
    flex-shrink: 0;
}

.audio-controls { 
    display: flex; 
    flex-direction: column;
    align-items: center;
    gap: 16px; 
    margin-bottom: 28px; 
    overflow: visible !important;
}

/* FORCE LARGE DESKTOP SIZES - NO MEDIA QUERY DEPENDENCY */
.player-pill {
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid rgba(168, 85, 247, 0.4);
    border-radius: 50px;
    padding: 12px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.25),
        0 4px 12px rgba(168, 85, 247, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    min-width: 60%;
    max-width: 525px;
}

.progress-controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 525px;
    padding: 0 15px;
}

/* Simplified button styling - removed conflicting logic */
.nav-btn {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%) !important;
    border: none !important;
    color: #475569 !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.nav-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%) !important;
    color: #334155 !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-1px) !important;
}

.play-btn {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3) !important;
}

.play-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #9333ea 0%, #db2777 100%) !important;
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* Green dot indicator for paused state */
.play-btn.paused::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
    z-index: 1;
}

/* Separate styling for each toggle button type */
.toggle-btn {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%) !important;
    border: none !important;
    color: #475569 !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.toggle-btn:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%) !important;
    color: #334155 !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-1px) !important;
}

.toggle-btn.active {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%) !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3) !important;
}

.toggle-btn.active:hover {
    background: linear-gradient(135deg, #9333ea 0%, #db2777 100%) !important;
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4) !important;
    transform: translateY(-1px) !important;
}

.toggle-btn.speed-100 {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3) !important;
}

.toggle-btn.speed-100:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4) !important;
    transform: translateY(-1px) !important;
}

.toggle-btn.speed-75 {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.3) !important;
}

.toggle-btn.speed-75:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4) !important;
    transform: translateY(-1px) !important;
}

.toggle-btn.speed-50 {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3) !important;
}

.toggle-btn.speed-50:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4) !important;
    transform: translateY(-1px) !important;
}

.secondary-btn {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%) !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3) !important;
}

.secondary-btn:hover {
    background: linear-gradient(135deg, #9333ea 0%, #db2777 100%) !important;
    color: white !important;
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* FORCE LARGE BUTTONS - OVERRIDE EVERYTHING */
.nav-btn,
.toggle-btn:not(.secondary-btn) {
    width: 45px;
    height: 45px;
    font-size: 15px;
}

.play-btn {
    width: 60px;
    height: 60px;
    font-size: 24px;
}

.secondary-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
    flex-shrink: 0;
}

.progress-container { 
    flex-grow: 0;
    flex-shrink: 0;
    width: 135px;
    height: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(168, 85, 247, 0.4);
    border-radius: 20px;
    overflow: hidden;
    margin: 0 9px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-controls-row #timeDisplay {
    flex-shrink: 0;
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    min-width: 75px;
    text-align: center;
    font-weight: 600;
}

.nav-btn,
.play-btn,
.toggle-btn { 
    border: none; 
    border-radius: 50%; 
    cursor: pointer; 
    transition: all .3s ease; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    outline: none;
    position: relative;
}

.nav-btn:disabled { 
    opacity:0.3; 
    cursor:not-allowed; 
}

.text-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    transition: flex 0.3s ease;
}

.text-section.collapsed {
    flex: 0;
    min-height: 0;
}

.hint-display {
    margin: 20px 0;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fef7ff 0%, #f0f9ff 100%);
    border: 2px solid #e879f9;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(232, 121, 249, 0.1);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.hint-content {
    font-size: 18px;
    color: #374151;
    font-weight: 500;
    line-height: 1.5;
}

.play-btn {
    position: relative;
    width: 72px; 
    height: 72px;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.3);
    font-size: 28px;
    color: white;
}

.play-btn:hover:not(:disabled) { 
    transform: translateY(-3px); 
    box-shadow: 0 12px 32px rgba(168, 85, 247, 0.4);
}

.play-btn:disabled{
    opacity:.5;
    cursor:not-allowed;
}

.play-btn::before { 
    content:''; 
    position:absolute; 
    left:50%; 
    top:50%; 
    transform:translate(-50%,-50%); 
    z-index: 2;
}

.play-btn.playing::before { 
    width:4px;
    height:20px;
    background:white;
    box-shadow:8px 0 0 white; 
}

.play-btn:not(.playing)::before { 
    border-left:12px solid white; 
    border-top:8px solid transparent; 
    border-bottom:8px solid transparent; 
}

/* Focus Icon Styles */
.focus-icon {
    width: 18px;
    height: 18px;
    position: relative;
    display: inline-block;
}

.focus-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 50%;
    box-shadow: 
        inset 0 0 0 2px currentColor,
        inset 0 0 0 5px transparent,
        inset 0 0 0 7px currentColor;
}

#timeDisplay { 
    min-width:110px; 
    font-size:16px; 
    color:#6b7280; 
    font-weight:500; 
    margin-left: 8px; 
    margin-right: 8px;
}

.progress-bar { 
    height:100%; 
    width:0%; 
    background:linear-gradient(90deg, #a855f7, #ec4899); 
    border-radius:20px; 
    transition:width .3s ease;
}

.input-area { 
    display:flex; 
    flex-direction:column; 
    gap:20px; 
    padding: 0 8px; /* Add a little horizontal padding to prevent edge collision */
    align-items: center;

}

.input-field {
    width:100%;
    max-width: 800px;
    min-height:75px; 
    padding:16px 14px; /* Slightly less padding to help on mobile */
    background: linear-gradient(135deg, #fef7ff 0%, #f0f9ff 100%); 
    color:#374151;
    border:2px solid #e879f9; 
    border-radius: 16px;
    font-size:22px;
    line-height:1.3;
    resize:vertical;
    transition:all .3s ease;
    box-shadow: 0 4px 16px rgba(232, 121, 249, 0.1);
}

.input-field:focus { 
    border-color:#c084fc; 
    box-shadow:0 0 0 4px rgba(192, 132, 252, 0.15), 0 4px 16px rgba(232, 121, 249, 0.2); 
    outline:none; 
    transform: translateY(-1px);
}

.input-field::placeholder {
    font-size: 17px !important;
    color: #9CA3AF;
    opacity: 1;
    line-height: 1.3;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.live-feedback {
    min-height:56px;
    padding:18px 22px;
    background: linear-gradient(135deg, #ecfdf5 0%, #fef3ff 100%); 
    border: none; 
    border-radius: 16px;
    font-size:22px;
    line-height:1.3;
    white-space:pre-wrap; 
    word-break:break-word;
    color: #9ca3af;
    box-shadow: 0 4px 16px rgba(167, 139, 250, 0.1);
    display: block;
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
}

.char-correct{color:#059669;font-weight:500;} 
.char-wrong-position{color:#d97706;font-weight:500;} 
.char-wrong{color:#dc2626;text-decoration:underline;font-weight:500;} 
.char-missing{color:#d97706;font-style:italic;font-weight:500;} 
.char-extra{color:#2563eb;font-weight:500;} 
.char-word-boundary,.char-char-space{color:#9ca3af;}
.char-punctuation{color:#9ca3af;font-weight:400;}

.options { 
    display: none;
}

.stats-section {
    margin: 32px 0 0 0;
    padding-top: 24px;
    border-top: 1px solid #f3f4f6;
    flex-shrink: 0;
    max-height: 50vh;
    overflow-y: auto;
    transition: margin-top 0.3s ease;
}

.stats-section.active {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.stats-with-export {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stats-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    letter-spacing: -0.025em;
}

.stats-actions {
    display: flex;
    gap: 8px;
}

.stats-action-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    outline: none;
}

.restart-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.restart-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

.export-btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    font-size: 10px;
}

.export-btn:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    transform: translateY(-1px);
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(168, 85, 247, 0.2);
    border-radius: 8px;
    padding: 16px 12px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    border-color: rgba(168, 85, 247, 0.4);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #e879f9;
    margin-bottom: 4px;
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    line-height: 1.2;
}

.reference-text{
    margin-top:24px;
    padding:20px;
    background:#fef9e7;
    border:1px solid #fcd34d;
    border-radius:8px;
    color:#92400e;
    display:none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.sentence-results {
    margin-top: 32px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.sentences-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sentence-result {
    font-size: 18px !important;
    line-height: 1.6;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 
        0 2px 12px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(168, 85, 247, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.sentence-result:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(168, 85, 247, 0.25);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(168, 85, 247, 0.15);
    transform: translateY(-1px);
}

.result-word-correct {
    color: #059669;
    font-weight: 500;
}

.result-word-wrong {
    color: #dc2626;
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
    position: relative;
}

.result-word-wrong:hover {
    background: rgba(220, 38, 38, 0.1);
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
}

.result-word-missing {
    color: #d97706;
    font-style: italic;
    display: inline-block;
    min-width: 1em;
    cursor: pointer;
    position: relative;
    white-space: pre; /* Preserve spaces in underscores */
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 18px !important;
    letter-spacing: normal !important;
}

.result-word-missing:hover {
    background: rgba(217, 119, 6, 0.1);
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
}

.result-word-extra {
    color: #2563eb;
    font-weight: 500;
    background: rgba(37, 99, 235, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
}

.word-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.word-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
}

.word-tooltip.show {
    opacity: 1;
    pointer-events: auto;
}

.word-tooltip.adjust-left {
    left: 0;
    transform: translateX(0);
}

.word-tooltip.adjust-right {
    left: auto;
    right: 0;
    transform: translateX(0);
}

.word-tooltip.adjust-left::after {
    left: 20px;
}

.word-tooltip.adjust-right::after {
    left: auto;
    right: 20px;
}

.export-controls {
    text-align: center;
    margin: 24px 0;
    padding: 16px;
}

.toggle-btn.end-button {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    line-height: 1;
    padding: 8px 12px;
}

/* ========================================
   TUTORIAL SYSTEM STYLES
   ======================================== */

/* Tutorial Overlay */

.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: none;
    z-index: 20000;
    pointer-events: none;
    animation: tutorialFadeIn 0.3s ease-out;
}

@keyframes tutorialFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Tutorial Container */
.tutorial-container {
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25) !important;
    width: 320px !important;
    max-width: 320px !important;
    min-width: 280px !important;
    height: auto !important;
    max-height: fit-content !important;
    overflow: visible !important;
    margin: 0 !important;
    margin-top: 50px !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    transition: height 0.2s ease-out !important;
    animation: tutorialSlideIn 0.4s ease-out !important;
    pointer-events: all !important;
    display: block !important;
    box-sizing: border-box !important;
}
@keyframes tutorialSlideIn {
    from { 
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Tutorial Header */
.tutorial-header {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%) !important;
    color: white !important;
    padding: 8px 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.tutorial-header-progress {
    flex: 1;
    margin-right: 12px;
}

.tutorial-header .step-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.tutorial-header .current-step {
    color: white;
    font-weight: 600;
}

.tutorial-header .step-progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.tutorial-header .progress-fill {
    height: 100%;
    background: white;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.tutorial-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.tutorial-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Tutorial Content */
.tutorial-content {
    padding: 6px 12px 4px 12px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.step-title {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.3 !important;
    padding: 0 !important;
}

.step-description {
    color: #4b5563 !important;
    line-height: 1.4 !important;
    margin: 0 0 6px 0 !important;
    font-size: 1.0rem !important;
    padding: 0 !important;
}

/* Tutorial Actions */
.tutorial-actions {
    display: flex !important;
    gap: 6px !important;
    justify-content: flex-end !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 4px 12px 8px 12px !important;
    flex: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.tutorial-btn {
    padding: 6px 12px !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    font-size: 0.9rem !important;
    margin: 0 !important;
}

.tutorial-btn.primary {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    color: white;
}

.tutorial-btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #9333ea 0%, #db2777 100%);
    transform: translateY(-1px);
}

.tutorial-btn.secondary {
    background: #f3f4f6;
    color: #6b7280;
}

.tutorial-btn.secondary:hover:not(:disabled) {
    background: #e5e7eb;
    color: #4b5563;
}

.tutorial-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tutorial Checkmark */
.tutorial-checkmark {
    position: absolute;
    width: 48px;
    height: 48px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
    opacity: 0;
    z-index: 100000;
    /* Position will be set by JavaScript */
}

.tutorial-checkmark svg {
    width: 24px;
    height: 24px;
    /* Force the SVG to be absolutely centered */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tutorial-checkmark-show {
    animation: checkmarkShow 1.5s ease-out;
}

@keyframes checkmarkShow {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Tutorial Highlighting */
.tutorial-highlight {
    pointer-events: none;
    z-index: 15000; /* Above tutorial overlay */
}

.tutorial-highlight-pulse {
    border: 3px solid #ff0080;
    background: transparent;
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.6);
    animation: tutorialPulseSimple 2s infinite;
}

.tutorial-highlight-glow {
    border: 4px solid #ff0080;
    background: rgba(255, 0, 128, 0.15);
    box-shadow: 
        0 0 40px rgba(255, 0, 128, 0.9),
        0 0 80px rgba(255, 0, 128, 0.7);
    animation: tutorialGlowIntense 1.5s infinite;
}

@keyframes tutorialPulseSimple {
    0%, 100% {
        border-color: #ff0080;
        opacity: 1;
    }
    50% {
        border-color: #ff4da6;
        opacity: 0.7;
    }
}

@keyframes tutorialGlowIntense {
    0%, 100% {
        border-color: #ff0080;
        box-shadow: 
            0 0 40px rgba(255, 0, 128, 0.9),
            0 0 80px rgba(255, 0, 128, 0.7);
    }
    50% {
        border-color: #ff4da6;
        box-shadow: 
            0 0 60px rgba(255, 0, 128, 1),
            0 0 120px rgba(255, 0, 128, 0.9);
    }
}

/* Enhanced target highlighting */
.tutorial-target {
    position: relative;
    z-index: 20000 !important;
    pointer-events: all !important;
    /* Remove all the covering effects - let the original button show through */
}

/* Responsive tutorial styles */
@media (max-width: 768px) {
    .tutorial-overlay {
        align-items: flex-end;
        justify-content: center;
        padding: 16px;
    }
    
    .tutorial-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
        min-width: 0;
        max-height: 50vh;
        transform-origin: bottom center;
    }
    
    .tutorial-actions {
        position: relative !important;
        display: flex !important;
        gap: 8px;
        justify-content: space-between;
    }
    
    .tutorial-actions .tutorial-btn {
        position: relative !important;
        flex: 1;
        transform: none !important;
        left: auto !important;
        right: auto !important;
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    .step-title {
        font-size: 0.95rem;
    }
    
    .step-description {
        font-size: 0.85rem;
        line-height: 1.3;
    }
}

.tutorial-overlay.position-bottom {
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    height: fit-content; /* Passt die Höhe an den Inhalt an */
    top: auto; /* Ermöglicht, dass die Höhe vom unteren Rand aus bestimmt wird */
    bottom: 0; /* Stellt sicher, dass es am unteren Rand des Viewports bleibt */
    /* Optional: Füge eine maximale Höhe hinzu, damit es den Bildschirm nicht übersteigt */
    max-height: 100vh;
}

.tutorial-overlay.position-right {
    align-items: center;
    justify-content: flex-end;
    padding-right: 20px;
}

.tutorial-overlay.position-left {
    align-items: center;
    justify-content: flex-start;
    padding-left: 20px;
}

.tutorial-overlay.position-top {
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
}

.tutorial-btn-launcher {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
    transition: all .3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.tutorial-btn-launcher:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* Fix iframe extra whitespace - classic problem */
iframe {
    display: block !important;
    vertical-align: bottom !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    margin-bottom: 0 !important;  
}

/* Alternative fix for Teachable specifically */
.lecture-content iframe,
[class*="custom"] iframe {
    display: block !important;
    vertical-align: bottom !important;
}

body, html {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
}