/* App Layout */
.app-body {
    background-color: #f5f7fb;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
    height: 100%;
    position: relative;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

html, body {
    height: 100%;
    /* Enable momentum scrolling on iOS */
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

.app-container {
    max-width: 1200px;
    margin: 2rem auto 4rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    min-height: 600px;
}

#check-answer{
    margin-bottom:5px;
}
/* Cross-browser input styling */
input, button, select {
    -webkit-appearance: none; /* Remove default styling on iOS */
    appearance: none;
    border-radius: 0; /* Reset border-radius */
    font-size: 16px; /* Prevent zoom on iOS */
}

/* Progress Header */
.progress-header {
    background-color: var(--secondary);
    padding: 0.75rem 1.5rem;
    color: white;
}

.progress-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.level-wrapper {
    display: flex;
    align-items: center;
}

.level-badge {
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
    margin-right: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.level-bar-container {
    width: 200px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.level-bar {
    height: 100%;
    background-color: var(--accent);
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.streak-wrapper, .tips-wrapper {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    margin-left: 1rem;
}

.streak-icon, .tips-icon {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

#streak-count, #tips-count {
    font-weight: 600;
    font-size: 1.1rem;
}

/* App Navigation */
.app-navigation {
    display: flex;
    background-color: white;
    border-bottom: 1px solid #eaeef3;
    padding: 0.5rem;
}

.nav-button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #777;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.nav-button.active {
    color: var(--primary);
    background-color: rgba(193, 70, 78, 0.1);
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.nav-text {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Screens */
.screen {
    display: none;
    padding: 1.5rem;
    opacity: 0;
    overflow-y: auto; /* Allow individual screens to scroll */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.screen.active {
    display: block;
    opacity: 1;
}

.screen.enter-animation {
    animation: fadeIn 0.3s forwards;
}

.screen.exit-animation {
    animation: fadeOut 0.3s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Home Screen */
.home-welcome {
    text-align: center;
    margin-bottom: 2rem;
}

.home-welcome h2 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.home-daily-goal {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.home-daily-goal h3 {
    color: var(--secondary);
    margin-bottom: 1rem;
}

.xp-progress-container {
    height: 12px;
    background-color: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.xp-progress {
    height: 100%;
    background: linear-gradient(to right, var(--accent), var(--primary));
    border-radius: 6px;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.xp-text {
    text-align: right;
    font-weight: 600;
    color: var(--primary);
}

.current-unit {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.unit-info h4 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.quick-practice {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.quick-practice h3 {
    color: var(--secondary);
    margin-bottom: 1rem;
}

.practice-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.practice-option {
    background-color: #f9fafc;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.practice-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.practice-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    color: var(--primary);
}

.practice-option h4 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

/* Lessons Screen */
.units-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.unit-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.unit-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    box-sizing: border-box;
}

.unit-circle:before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 6px solid transparent;
    box-sizing: border-box;
}

.unit-circle.completed {
    background-color: rgba(193, 70, 78, 0.15);
    border: none;
}

.unit-circle.completed:before {
    border-color: var(--primary);
}

.unit-circle.completed.complete-100 {
    background-color: rgba(76, 175, 80, 0.15) !important;
}

.unit-circle.completed.complete-100:before {
    border-color: #4CAF50 !important;
}

.unit-circle.completed.complete-100 .unit-progress-circle .unit-progress-inner,
.unit-circle.completed.complete-100 .unit-progress-circle .unit-progress-inner-2 {
    border-color: #4CAF50 !important;
}

.unit-circle.unlocked {
    background-color: rgba(0, 94, 169, 0.1);
    border: none;
}

.unit-circle.unlocked:before {
    border-color: var(--secondary);
}

.unit-circle.locked {
    background-color: #f0f0f0;
    border: none;
    filter: grayscale(1);
    opacity: 0.7;
}

.unit-circle.locked:before {
    border-color: #ccc;
}

/* Premium unit styles */
.unit-circle.premium-locked {
    background-color: #f7f0d8;
    position: relative;
    filter: none;
    opacity: 1;
}

.unit-circle.premium-locked:before {
    border-color: #ffc107;
}

.unit-circle.premium-locked::after {
    content: '🔒';
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #ffc107;
    color: white;
    padding: 5px;
    border-radius: 50%;
    font-size: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Unit progress circle - show progress as a circle */
.unit-progress-circle {
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    clip: rect(0, 86px, 86px, 43px);
    z-index: 1;
    box-sizing: border-box;
}

.unit-progress-circle .unit-progress-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 6px solid var(--primary);
    clip: rect(0, 43px, 86px, 0);
    transform: rotate(0deg);
    box-sizing: border-box;
}

.unit-progress-circle.gt-50 {
    clip: rect(auto, auto, auto, auto);
}

.unit-progress-circle.gt-50 .unit-progress-inner {
    transform: rotate(180deg);
}

.unit-progress-circle .unit-progress-inner-2 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 6px solid var(--primary);
    clip: rect(0, 43px, 86px, 0);
    transform: rotate(0deg);
    box-sizing: border-box;
    display: none;
}

.unit-progress-circle.gt-50 .unit-progress-inner-2 {
    display: block;
}

.unit-circle:hover {
    transform: scale(1.05);
}

.unit-icon {
    font-size: 2.5rem;
    position: relative;
    z-index: 2;
}

.unit-label {
    font-weight: 500;
    color: var(--dark);
}

/* Practice Screen */
.practice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.practice-card {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.practice-card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.practice-card h3 {
    color: var(--secondary);
    margin-bottom: 0.8rem;
}

.practice-card p {
    margin-bottom: 1.5rem;
    color: #666;
}

/* Stats Screen */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.stats-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.stats-card h3 {
    color: var(--secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.weekly-activity, .tips-stats {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.weekly-activity h3, .tips-stats h3 {
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

.chart-container {
    height: 150px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.chart-bar {
    flex: 1;
    background-color: var(--primary);
    margin: 0 5px;
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 5px;
    transition: height 0.8s;
}

.chart-bar-label {
    position: absolute;
    bottom: -25px;
    left: 0;
    right: 0;
    text-align: center;
    font-weight: 500;
    color: #666;
}

.tips-stats-row {
    display: flex;
    justify-content: space-around;
}

.tips-stat {
    text-align: center;
}

.tips-stat span {
    font-size: 0.9rem;
    color: #666;
}

/* Lesson Content Screen */
.lesson-selection-screen {
    padding: 1rem;
}

.lesson-selection-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.back-btn {
    background: none;
    border: none;
    color: var(--secondary);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem;
    margin-right: 1rem;
}

.lesson-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.lesson-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    display: flex;
    align-items: center;
}

.lesson-card-icon {
    font-size: 2rem;
    margin-right: 1rem;
    color: var(--primary);
}

.lesson-card-content {
    flex: 1;
}

.lesson-card-content h3 {
    margin-bottom: 5px;
}

.lesson-card-content p {
    margin-top: 0;
    margin-bottom: 5px;
}

/* Exercise styling */
.lesson-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.lesson-progress {
    margin-left: auto;
    padding: 0.5rem 1rem;
    background-color: rgba(0, 94, 169, 0.1);
    border-radius: 20px;
    font-weight: 600;
    color: var(--secondary);
}

.exercise {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
}

.exercise.has-extra-life {
    border: 2px solid #ff4081;
}

.prompt-container {
    text-align: center;
    margin-bottom: 2rem;
}

.prompt-text {
    font-size: 1.5rem;
    color: var(--dark);
}

.answer-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.answer-option {
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.answer-option:hover {
    border-color: rgba(255, 152, 0, 0.6);
    background-color: rgba(255, 152, 0, 0.05);
}

.answer-option.selected {
    border-color: #FF9800;
    background-color: rgba(255, 152, 0, 0.1);
    box-shadow: 0 0 5px rgba(255, 152, 0, 0.5);
}

.answer-option.correct {
    border-color: #4CAF50 !important;
    background-color: rgba(76, 175, 80, 0.1) !important;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5) !important;
}

.answer-option.incorrect {
    border-color: #F44336;
    background-color: rgba(244, 67, 54, 0.1);
}

.answer-input {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.text-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s;
}

.text-input:focus {
    outline: none;
    border-color: #FF9800;
    box-shadow: 0 0 6px rgba(255, 152, 0, 0.5);
}

.text-input.correct {
    border-color: #4CAF50 !important;
    background-color: rgba(76, 175, 80, 0.1);
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.5);
    outline: none;
}

.text-input.incorrect {
    border-color: #F44336;
    background-color: rgba(244, 67, 54, 0.1);
}

.reveal-answer-btn {
    padding: 8px 16px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    width: auto;
    margin-top: 10px;
}

.reveal-answer-btn:hover {
    background-color: #e0e0e0;
}

.answer-hint {
    margin-top: 10px;
    padding: 10px;
    background-color: #fff9e0;
    border: 1px solid #ffd700;
    border-radius: 8px;
    color: #9b870c;
    font-size: 14px;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

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

.pairs-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pair-item {
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pair-item:hover {
    border-color: rgba(255, 152, 0, 0.6);
}

.pair-item.selected {
    border-color: #FF9800;
    background-color: rgba(255, 152, 0, 0.1);
    box-shadow: 0 0 5px rgba(255, 152, 0, 0.5);
}

.pair-item.matched {
    border-color: #4CAF50 !important;
    background-color: rgba(76, 175, 80, 0.1) !important;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5) !important;
    cursor: default;
}

.audio-container {
    text-align: center;
    margin-bottom: 2rem;
}

.play-icon {
    margin-right: 0.5rem;
}

.lesson-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.tips-buttons {
    display: flex;
    margin-right: auto;
}

.tip-btn {
    background-color: #f0f0f0;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tip-btn:hover:not(:disabled) {
    background-color: #e0e0e0;
}

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

/* Complete Screen */
.complete-container {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem;
}

.complete-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    animation: bounce 1s infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.complete-stats {
    display: flex;
    justify-content: space-around;
    margin: 2rem 0;
}

.complete-stat span {
    font-size: 0.9rem;
    color: #666;
    display: block;
    margin-bottom: 0.5rem;
}

.complete-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.complete-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Notifications */
.feedback-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 500;
    z-index: 1000;
}

.tip-used-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--secondary);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transform: translateX(100%);
    animation: slideIn 0.3s forwards;
    display: flex;
    align-items: center;
}

.tip-used-notification span {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.tip-used-notification.important-notification {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes slideIn {
    to { transform: translateX(0); }
}

.tip-used-notification.fade-out {
    animation: slideOut 0.3s forwards;
}

@keyframes slideOut {
    to { transform: translateX(100%); }
}

@keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

.xp-indicator {
    position: fixed;
    transform: translate(-50%, -50%);
    background-color: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    opacity: 0;
    z-index: 1000;
    animation: fadeIn 0.3s forwards;
}

.xp-indicator.float-up {
    animation: floatUp 1s forwards;
}

@keyframes floatUp {
    from { 
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    to { 
        opacity: 0;
        transform: translate(-50%, -80px);
    }
}

.extra-life-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    animation: pulse 1s infinite;
}

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

.level-up-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background-color: var(--secondary);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.level-up-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.level-up-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.level-up-text h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.tip-reveal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 94, 169, 0.9);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

.tip-reveal-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.pulse-animation {
    animation: pulse 0.5s;
}

/* Button Styles */
.primary-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.primary-btn:hover {
    background-color: #a73a41;
}

.primary-btn:disabled {
    background-color: #ddd;
    cursor: not-allowed;
}

.secondary-btn {
    background-color: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.secondary-btn:hover {
    background-color: rgba(193, 70, 78, 0.1);
}

/* Responsive Design - Enhance for better mobile experience */
@media (max-width: 768px) {
    .app-container {
        margin: 0;
        border-radius: 0;
        min-height: 100vh; /* Full viewport height now that header is gone */
    }
    
    /* Hide header on mobile */
    header {
        display: none;
    }
    
    .screen {
        padding: 0.75rem;
        height: auto; /* Allow screen content to determine height */
        padding-bottom: 5rem; /* Space for fixed navigation */
    }
    
    .level-bar-container {
        width: 100px;
    }
    
    .stats-container, .lesson-cards-container {
        grid-template-columns: 1fr;
    }
    
    .units-container {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 1rem;
        overflow-x: auto;
        padding: 0.5rem;
    }
    
    .practice-options, .practice-grid {
        grid-template-columns: 1fr;
    }
    
    /* Improve modal responsiveness */
    .modal-content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .premium-modal {
        max-width: 100%;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .premium-features li {
        font-size: 0.95rem;
    }
    
    .pricing-info {
        padding: 1rem;
    }
    
    .pricing-info h3 {
        font-size: 1.6rem;
    }
    
    /* Improve touch targets for better mobile usability */
    .answer-option, 
    .nav-button,
    .primary-btn, 
    .secondary-btn,
    .unit-circle {
        min-height: 44px; /* Minimum recommended touch target size */
    }
    
    /* Fix flashcard display */
    .flashcard {
        height: 230px;
    }
    
    /* Navigation improvements */
    .app-navigation {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background-color: white;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }
    
    /* Remove duplicate rule */
    /* .screen {
        padding-bottom: 4rem;
    } */
    
    /* Make feedback more visible on small screens */
    .tip-used-notification {
        width: 90%;
        max-width: none;
        left: 5%;
    }
    
    /* Footer responsive fixes */
    footer {
        margin-bottom: 60px; /* Space for fixed navigation */
        padding-bottom: env(safe-area-inset-bottom); /* Account for iPhone bottom bar */
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Add additional breakpoint for very small screens */
@media (max-width: 480px) {
    .units-container {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.75rem;
    }
    
    .unit-circle {
        width: 70px;
        height: 70px;
    }
    
    .unit-icon {
        font-size: 2rem;
    }
    
    .unit-label {
        font-size: 0.9rem;
    }
    
    /* Further adjust modal for very small screens */
    .modal-content {
        width: 100%;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .premium-modal .modal-body {
        padding: 0.75rem;
    }
    
    .pricing-info h3 {
        font-size: 1.4rem;
    }
    
    .pricing-info p,
    .pricing-info .promo-note {
        font-size: 0.8rem;
    }
    
    .premium-features li {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .modal-footer .primary-btn,
    .modal-footer .secondary-btn,
    .modal-footer .tertiary-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Improve exercise display */
    .exercise-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .answer-option {
        padding: 0.75rem;
    }
    
    /* Better lesson completion screen */
    .complete-container {
        padding: 1rem;
    }
    
    /* Fix flashcard controls */
    .flashcard-controls {
        flex-direction: column;
    }
    
    .flashcard-nav {
        width: 100%;
        justify-content: space-between;
    }
}

/* Add viewport height fix for mobile browsers */
@media (max-height: 600px) and (max-width: 768px) {
    .app-container {
        min-height: auto;
        margin-bottom: 4rem; /* Space for fixed navigation */
    }
    
    .lesson-content {
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .modal-content {
        max-height: 85vh;
    }
}

/* Improve iOS scrolling */
@supports (-webkit-touch-callout: none) {
    .modal-content {
        max-height: -webkit-fill-available;
    }
    
    .modal-body {
        -webkit-overflow-scrolling: touch;
    }
    
    input.text-input {
        padding: 1rem;
    }
    
    /* iOS general fixes */
    input, select, textarea {
        font-size: 16px !important;
    }
    
    /* Fix for notch on iOS devices */
    .app-container {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    /* Account for bottom bar on iOS */
    .app-navigation {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    /* Ensure screens are scrollable on iOS */
    .screen {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Remove the position: fixed on html/body that's causing iOS scrolling issues */
    html, body {
        position: static;
        width: 100%;
        height: 100%;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Allow scrolling in scrollable containers */
    .screen.active {
        height: auto;
        max-height: none; /* Remove the fixed height constraint */
        overflow-y: auto;
    }
    
    /* Fix footer scrolling issue on iOS */
    footer {
        -webkit-overflow-scrolling: touch;
        touch-action: auto; /* Enable all touch actions on footer */
    }
}

/* Emoji Association Exercise Styles */
.emoji-association-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem;
}

.terms-container,
.emojis-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.term-item,
.emoji-item {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    font-size: 1.2rem;
    min-width: 120px;
    text-align: center;
    user-select: none;
}

.emoji-item {
    font-size: 2rem;
    min-width: 80px;
}

.term-item:hover,
.emoji-item:hover {
    border-color: rgba(255, 152, 0, 0.6);
    background-color: rgba(255, 152, 0, 0.05);
}

.term-item.selected,
.emoji-item.selected {
    border-color: #FF9800;
    background-color: rgba(255, 152, 0, 0.1);
    box-shadow: 0 0 5px rgba(255, 152, 0, 0.5);
}

.term-item.correct,
.emoji-item.correct {
    border-color: #4CAF50 !important;
    background-color: rgba(76, 175, 80, 0.1) !important;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5) !important;
    cursor: default;
}

.term-item.correct:hover,
.emoji-item.correct:hover {
    transform: none;
    box-shadow: none;
}

/* Lesson progress visualization */
.lesson-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin: 10px 0;
    overflow: hidden;
}

.lesson-progress-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease-in-out;
}

/* Green progress bar for completed lessons */
.lesson-progress-fill.complete {
    background-color: #4CAF50;
}

.lesson-progress-text {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
    font-weight: 500;
}

.lesson-card.locked {
    display: none;
}

.lesson-card.locked::before {
    display: none;
}

.lesson-card.locked .lesson-card-content {
    display: none;
}

/* Flashcard Styles */
.flashcard-container {
    max-width: 600px;
    margin: 2rem auto;
    perspective: 1000px;
}

.flashcard {
    width: 100%;
    height: 300px;
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.flashcard-front {
    background-color: white;
    border: 2px solid var(--primary);
}

.flashcard-back {
    background-color: var(--secondary);
    color: white;
    transform: rotateY(180deg);
}

.flashcard-text {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
}

.flashcard-hint {
    font-size: 1rem;
    color: #666;
    text-align: center;
}

.flashcard-back .flashcard-text {
    color: white;
}

.flashcard-back .flashcard-hint {
    color: rgba(255, 255, 255, 0.7);
}

.flashcard-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.flashcard-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.flashcard-nav button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary);
    padding: 0.5rem;
    transition: transform 0.2s;
}

.flashcard-nav button:hover {
    transform: scale(1.1);
}

.flashcard-progress {
    text-align: center;
    margin-top: 1rem;
    font-weight: 500;
    color: var(--secondary);
}

.flashcard-header {
    display: flex;
    justify-content: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.flashcard-header .secondary-btn {
    min-width: 150px;
}

/* Modals - Enhanced for mobile */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-container.modal-visible {
    opacity: 1;
}

.modal-container.modal-closing {
    opacity: 0;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    width: 85%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal-visible .modal-content {
    transform: translateY(0);
}

.modal-content.mobile-modal {
    width: 100%;
    max-width: 100%;
    border-radius: 12px 12px 0 0;
    margin-top: auto;
    align-self: flex-end;
    max-height: 80vh;
}

@media (max-width: 480px) {
    .modal-content {
        width: 100%;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        margin-top: auto;
        align-self: flex-end;
        max-height: 85vh;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    color: var(--secondary);
    font-size: 1.8rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-footer.mobile-footer {
    flex-direction: column;
}

.modal-footer button {
    min-width: 120px;
}

/* Premium Modal */
.premium-modal {
    max-width: 550px;
}

.premium-features {
    padding-left: 1rem;
    margin-bottom: 2rem;
}

.premium-features li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.feature-checkmark {
    color: #4CAF50;
    font-weight: bold;
    margin-right: 0.5rem;
}

.pricing-info {
    background-color: var(--primaryLight);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
}

.pricing-info h3 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.pricing-info h3 span {
    font-size: 1rem;
    opacity: 0.8;
}

.pricing-info p {
    margin: 0.5rem 0;
}

.promo-note {
    font-size: 0.9rem;
    opacity: 0.8;
    font-style: italic;
    margin-top: 1rem;
}

.gumroad-attribution {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.gumroad-attribution a {
    color: var(--primary);
    text-decoration: none;
}

.error-message {
    background-color: #ffebee;
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
}

/* Input styling for API key */
.input-container {
    margin: 1.5rem 0;
}

.text-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.text-input:focus {
    border-color: #FF9800;
    outline: none;
    box-shadow: 0 0 6px rgba(255, 152, 0, 0.5);
}

.text-input::placeholder {
    color: #aaa;
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer adjustments for mobile scrolling */
footer {
    position: relative;
    z-index: 1; /* Ensure it's above other content but below fixed navigation */
    -webkit-touch-callout: none; /* Prevent callout when touched */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight */
}

.footer-container, 
.copyright {
    position: relative;
    touch-action: auto; /* Enable all touch actions */
}

/* Free Trial Banner */
.free-trial-banner {
    display: flex;
    align-items: center;
    background: linear-gradient(to right, #4c6ef5, #7950f2);
    color: white;
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.free-trial-banner::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M0,0 L100,100 M20,0 L100,80 M0,20 L80,100 M40,0 L100,60 M0,40 L60,100 M60,0 L100,40 M0,60 L40,100 M80,0 L100,20 M0,80 L20,100" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></svg>');
    opacity: 0.3;
    z-index: 0;
}

.trial-icon {
    font-size: 2.5rem;
    margin-right: 12px;
    z-index: 1;
}

.trial-content {
    flex: 1;
    z-index: 1;
}

.trial-content h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.trial-content p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

.trial-btn {
    background-color: white;
    color: #5a67d8;
    font-weight: 600;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 1;
}

.trial-btn:hover {
    background-color: #f8f9fb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Free Trial Modal */
.free-trial-modal .modal-header { 
}

.free-trial-modal .pricing-info h3 {
    color: #4c6ef5;
    font-size: 1.5rem;
}

@media (max-width: 480px) {
    .free-trial-banner {
        flex-direction: column;
        text-align: center;
        padding: 15px 10px;
    }
    
    .trial-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .trial-content {
        margin-bottom: 15px;
    }
    
    .trial-btn {
        width: 100%;
        padding: 10px;
    }
}

/* PWA-specific styles */
.is-pwa {
    /* Additional padding for PWA mode to account for different status bars */
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Hide header completely when running as PWA */
.is-pwa header {
    display: none !important;
}

.is-pwa .app-container {
    /* Ensure proper spacing in PWA mode */
    margin-top: 0;
    /* Remove rounded top edges in PWA mode for seamless native experience */
    border-radius: 0 0 12px 12px;
}

/* Hide browser-specific elements when running as PWA */
.is-pwa .browser-only {
    display: none !important;
}

/* Show PWA-specific elements only when running as PWA */
.is-browser .pwa-only {
    display: none !important;
}

/* Different styling based on display mode */
body[data-display-mode="standalone"] {
    /* Standalone PWA styling */
    background: var(--app-background, #f8f9fa);
}

body[data-display-mode="ios-standalone"] {
    /* iOS-specific PWA styling */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
}

body[data-display-mode="fullscreen"] {
    /* Fullscreen PWA styling */
    padding: 0;
}



/* Enhanced touch experience for PWA */
.is-pwa button,
.is-pwa .nav-button,
.is-pwa .primary-btn,
.is-pwa .secondary-btn {
    /* Larger touch targets for PWA */
    min-height: 48px;
    min-width: 48px;
}

/* PWA-specific animations */
.is-pwa .screen {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* Media queries for PWA detection via CSS */
@media (display-mode: standalone) {
    body::before {
        content: "";
        /* Add any standalone-specific styling */
    }
}

@media (display-mode: minimal-ui) {
    body::before {
        content: "";
        /* Add any minimal-ui specific styling */
    }
}

@media (display-mode: fullscreen) {
    body::before {
        content: "";
        /* Add any fullscreen specific styling */
    }
}

/* Confetti Animation for Lesson Completion */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2000;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ff6b6b;
}

/* Personalized Trial Modal Styles */
.personalized-trial-modal {
    max-width: 650px;
    padding-bottom: 2rem;
    overflow: visible;
}

.celebration-header h2 {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

.celebration-emoji {
    display: inline-block;
    font-size: 2rem;
    margin-right: 0.5rem;
    animation: bounce 1s infinite alternate;
}

.celebration-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.celebration-badge {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: pulse 2s infinite;
}

.badge-icon {
    font-size: 2.5rem;
    color: white;
}

.celebration-badge::after {
    content: "";
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px dashed white;
    border-radius: 50%;
    animation: spin 15s linear infinite;
}

.celebration-subtitle {
    color: var(--secondary);
    font-size: 1.4rem;
    margin: 1rem 0;
}

.personal-message {
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 1.5rem 0;
    color: #333;
}

.progress-visualization {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
}

.progress-milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 80px;
}

.milestone-dot {
    width: 20px;
    height: 20px;
    background-color: #ddd;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.milestone-label {
    font-size: 0.8rem;
    text-align: center;
    color: #666;
    transition: all 0.3s ease;
}

.progress-connector {
    flex-grow: 1;
    height: 3px;
    background-color: #ddd;
    position: relative;
    z-index: 0;
}

.progress-milestone.completed .milestone-dot {
    background-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(248, 194, 69, 0.3);
}

.progress-milestone.completed .milestone-label {
    color: var(--accent);
    font-weight: bold;
}

.progress-milestone.active .milestone-dot {
    background-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
    animation: pulse-dot 2s infinite;
}

.progress-milestone.active .milestone-label {
    color: #4CAF50;
    font-weight: bold;
}

.exclusive-offer {
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
    background-color: rgba(193, 70, 78, 0.05);
    border-radius: 10px;
    border-left: 4px solid var(--secondary);
}

.exclusive-offer h3 {
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.exclusive-offer .highlight {
    background: linear-gradient(transparent 60%, rgba(248, 194, 69, 0.4) 40%);
    padding: 0 0.2rem;
}

.exclusive-offer p {
    font-size: 1.1rem;
    line-height: 1.5;
}

.features-title {
    text-align: center;
    margin: 2rem 0 1rem;
    color: var(--secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.feature-item {
    background: white;
    border-radius: 10px;
    padding: 1.2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.feature-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.social-proof {
    margin: 2rem 0;
    text-align: center;
}

.testimonial {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 1.5rem;
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.testimonial::before {
    content: """;
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-size: 4rem;
    color: rgba(0, 0, 0, 0.1);
    font-family: serif;
    line-height: 1;
}

.testimonial-stars {
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.testimonial p {
    font-style: italic;
    margin-bottom: 0.5rem;
}

.testimonial-author {
    font-weight: bold;
    color: var(--secondary);
}

.highlight-box {
    border: 2px solid var(--accent);
    border-radius: 10px;
    padding: 1.5rem;
    background-color: rgba(248, 194, 69, 0.1);
    position: relative;
    overflow: hidden;
}

.trial-badge {
    position: absolute;
    top: 1rem;
    right: -4rem;
    background-color: var(--primary);
    color: white;
    padding: 0.3rem 3rem;
    font-weight: bold;
    font-size: 0.8rem;
    transform: rotate(45deg);
}

.pricing-info h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.pricing-details {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.discount-label {
    background-color: #ff9800;
    color: white;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: inline-block;
    transform: rotate(-2deg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.original-price {
    text-decoration: line-through;
    color: #888;
    font-size: 1.1rem;
    margin-right: 10px;
    position: relative;
}

.discounted-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4CAF50;
}

.billing-period {
    font-size: 0.9rem;
    color: #555;
    margin-left: 5px;
}

.limited-time {
    font-size: 0.9rem;
    font-style: italic;
    color: #d32f2f;
    margin-bottom: 8px;
    animation: pulse-text 2s infinite;
}

@keyframes pulse-text {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

.cancel-note, .guarantee-note {
    text-align: center;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: #555;
}

.pulse-animation {
    animation: pulse-button 2s infinite;
    position: relative;
    overflow: hidden;
}

.pulse-animation::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 2s linear infinite;
    z-index: 0;
}

.cta-icon {
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(193, 70, 78, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(193, 70, 78, 0); }
    100% { box-shadow: 0 0 0 0 rgba(193, 70, 78, 0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse-dot {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes pulse-button {
    0% { box-shadow: 0 0 0 0 rgba(248, 194, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(248, 194, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(248, 194, 69, 0); }
}

@keyframes ripple {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    80% { opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* Mobile responsiveness for the personalized trial modal */
@media (max-width: 768px) {
    .personalized-trial-modal {
        max-width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-milestone .milestone-label {
        font-size: 0.7rem;
    }
}

/* Exercise continue button - center and match reveal button style */
#next-exercise {
    background-color: #f0f0f0 !important;
    color: #555 !important;
    border: 1px solid #ccc !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    padding: 8px 16px !important;
    font-weight: normal !important;
    margin: 10px auto !important;
    display: block !important;
    width: auto !important;
    transition: all 0.2s ease !important;
}

#next-exercise:hover {
    background-color: #e0e0e0 !important;
}

 