:root {
    /* Light theme */
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --email-bg: #f8fafc;
    --text-color: #1a1a1a;
    --text-secondary: #666666;
    --border-color: #e2e8f0;
    --button-bg: #3b82f6;
    --button-hover: #2563eb;
    --correct-color: #22c55e;
    --wrong-color: #ef4444;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --card-bg: #262626;
    --email-bg: #2d2d2d;
    --text-color: #ffffff;
    --text-secondary: #a3a3a3;
    --border-color: #404040;
    --button-bg: #3b82f6;
    --button-hover: #2563eb;
    --correct-color: #22c55e;
    --wrong-color: #ef4444;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* Start Screen */
.start-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, var(--bg-color), var(--card-bg));
}

.start-content {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 8px 32px var(--shadow-color);
    text-align: center;
    max-width: 480px;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

.game-logo {
    margin-bottom: 24px;
}

.logo-icon {
    font-size: 3em;
    display: block;
    margin-bottom: 16px;
    animation: bounce 2s infinite;
}

.game-logo h1 {
    font-size: 2.5em;
    font-weight: 800;
    background: linear-gradient(45deg, var(--button-bg), var(--button-hover));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
}

.game-intro {
    margin-bottom: 32px;
}

.tagline {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.description {
    color: var(--text-secondary);
    line-height: 1.5;
}

.input-container {
    margin-bottom: 32px;
}

.input-group {
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1em;
    background-color: var(--email-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--button-bg);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.start-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn {
    background: linear-gradient(45deg, var(--button-bg), var(--button-hover));
    color: white;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.secondary-btn {
    background-color: var(--email-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.secondary-btn:hover {
    background-color: var(--border-color);
}

.btn-icon {
    font-size: 1.2em;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 32px;
    border-radius: 24px;
    max-width: 480px;
    width: 90%;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

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

.modal h2 {
    font-size: 1.8em;
    margin-bottom: 24px;
    text-align: center;
}

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

.instruction-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background-color: var(--email-bg);
    border-radius: 12px;
}

.instruction-icon {
    font-size: 1.5em;
}

.instruction-item p {
    margin: 0;
    line-height: 1.4;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@media (max-width: 480px) {
    .start-content {
        padding: 24px;
    }
    
    .game-logo h1 {
        font-size: 2em;
    }
    
    .input-group input,
    .btn {
        padding: 12px 16px;
    }
}

/* Game Container */
.game-container {
    min-height: 100vh;
    padding: 20px;
    transition: opacity 0.3s;
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 100;
    background-color: var(--card-bg);
    padding: 20px;
    box-shadow: 2px 0 20px var(--shadow-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 2px solid var(--border-color);
    border-radius: 0 20px 20px 0;
    width: 240px;
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: var(--email-bg);
    border-radius: 12px;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: transform 0.2s;
}

.info-group:hover {
    transform: translateY(-2px);
}

.info-icon {
    font-size: 1.2em;
}

.info-value {
    font-weight: 600;
}

#timer.warning {
    color: var(--wrong-color);
    animation: pulse 1s infinite;
}

#streak.highlight {
    color: var(--button-bg);
    animation: bounce 0.5s;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

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

.progress-container {
    padding: 0 5px;
}

.progress-bar {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px var(--shadow-color);
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--button-bg), var(--button-hover));
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--button-bg);
}

/* Email Window */
.game-content {
    margin-left: 280px;
    max-width: 800px;
    margin-right: auto;
}

.email-window {
    background-color: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 4px 20px var(--shadow-color);
    overflow: hidden;
}

.email-header {
    background-color: var(--email-bg);
    padding: 20px;
    border-bottom: 2px solid var(--border-color);
}

.header-item {
    margin-bottom: 10px;
}

.header-item:last-child {
    margin-bottom: 0;
}

.label {
    color: var(--text-secondary);
    margin-right: 10px;
    font-weight: 500;
}

.value {
    color: var(--text-color);
    font-weight: 600;
}

.email-body {
    padding: 20px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--email-bg);
    border-radius: 12px;
    margin-bottom: 20px;
}

.email-paragraph {
    margin-bottom: 16px;
}

.email-paragraph:last-child {
    margin-bottom: 0;
}

.response-content {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
    color: var(--text-secondary);
}

/* Options */
.options-container {
    padding: 20px;
    border-top: 2px solid var(--border-color);
}

.options-title {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 15px;
    text-align: center;
}

.options-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: 1fr;
}

.option-btn {
    background-color: var(--email-bg);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 15px 20px;
    font-size: 1em;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    line-height: 1.5;
}

.option-btn:hover {
    background-color: var(--button-bg);
    border-color: var(--button-bg);
    color: white;
    transform: translateY(-2px);
}

.option-btn.correct {
    background-color: var(--correct-color);
    border-color: var(--correct-color);
    color: white;
}

.option-btn.incorrect {
    background-color: var(--wrong-color);
    border-color: var(--wrong-color);
    color: white;
}

/* Next Button */
.next-btn {
    display: block;
    margin: 20px auto;
    padding: 12px 24px;
    background-color: var(--button-bg);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
}

.next-btn:hover {
    background-color: var(--button-hover);
    transform: translateX(5px);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Feedback Modal */
.feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.feedback-modal {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px var(--shadow-color);
    animation: slideUp 0.3s ease;
}

.feedback-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.feedback-emoji {
    font-size: 3em;
    margin-bottom: 10px;
}

.feedback-text {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-color);
}

.feedback-points {
    font-size: 1.5em;
    font-weight: 800;
    background: linear-gradient(45deg, var(--button-bg), var(--button-hover));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Mobile Adjustments */
@media (max-width: 768px) {
    .top-bar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
        border-radius: 0;
        border-right: none;
        border-bottom: 2px solid var(--border-color);
        padding: 10px 15px;
    }

    .player-info {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .info-group {
        padding: 8px 12px;
        font-size: 0.9em;
    }

    .game-content {
        margin-left: auto;
        margin-top: 80px;
        padding: 15px;
    }

    .email-header,
    .email-body,
    .options-container {
        padding: 15px;
    }

    .option-btn {
        padding: 12px 15px;
    }

    .feedback-modal {
        margin: 20px;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .top-bar {
        padding: 8px 10px;
    }

    .info-group {
        padding: 6px 10px;
        font-size: 0.85em;
    }

    .game-content {
        margin-top: 70px;
        padding: 10px;
    }
}

/* Landscape mode */
@media (max-height: 500px) and (orientation: landscape) {
    .start-screen {
        padding: 10px;
    }

    .start-content {
        padding: 20px;
    }

    .top-bar {
        position: relative;
        width: 100%;
        border-radius: 15px;
        margin-bottom: 15px;
    }

    .game-content {
        margin-left: auto;
        margin-top: 0;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .start-screen, .game-container {
        padding: 20px;
        margin: 10px;
        width: calc(100% - 20px);
    }

    .main-title {
        font-size: 2.5em;
    }

    .subtitle {
        font-size: 1.2em;
    }

    .emoji-row {
        font-size: 1.5em;
    }

    .stats-preview {
        flex-direction: column;
        gap: 15px;
    }

    .stat {
        width: 100%;
    }

    .start-btn {
        width: 100%;
        padding: 15px;
    }

    .username-input {
        width: 100%;
        max-width: none;
    }

    .email-window {
        padding: 15px;
    }

    .email-header {
        flex-direction: column;
        gap: 10px;
    }

    .email-meta {
        width: 100%;
    }

    .options-grid {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .option-btn {
        width: 100%;
        padding: 15px;
        font-size: 0.9em;
    }

    .feedback-modal {
        width: 90%;
        max-width: none;
        padding: 20px;
    }

    .feedback-emoji {
        font-size: 2em;
    }

    .feedback-text {
        font-size: 1.2em;
    }

    .next-btn {
        width: 100%;
        margin: 15px 0;
    }

    .player-info {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        text-align: center;
    }

    .player-name-display, .player-score {
        justify-content: center;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .main-title {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }

    .stat-number {
        font-size: 2em;
    }

    .email-body, .response-content {
        font-size: 1em;
    }

    .option-btn {
        font-size: 0.85em;
        padding: 12px;
    }

    .theme-button {
        top: 10px;
        right: 10px;
        font-size: 1.2em;
    }
}

/* Landscape mode */
@media (max-height: 600px) and (orientation: landscape) {
    .start-screen, .game-container {
        max-height: 90vh;
        overflow-y: auto;
    }

    .stats-preview {
        flex-direction: row;
    }

    .email-window {
        max-height: 50vh;
        overflow-y: auto;
    }
}

/* fix ios notch (pretty useless but frick it) */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
        padding-top: max(0px, env(safe-area-inset-top));
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

/* Glowing Effects */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(var(--glow-color), 0.2),
                   0 0 10px rgba(var(--glow-color), 0.2),
                   0 0 15px rgba(var(--glow-color), 0.2);
    }
    50% {
        box-shadow: 0 0 10px rgba(var(--glow-color), 0.3),
                   0 0 20px rgba(var(--glow-color), 0.3),
                   0 0 30px rgba(var(--glow-color), 0.3);
    }
    100% {
        box-shadow: 0 0 5px rgba(var(--glow-color), 0.2),
                   0 0 10px rgba(var(--glow-color), 0.2),
                   0 0 15px rgba(var(--glow-color), 0.2);
    }
}

/* Hearts Animation */
.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.heart {
    position: fixed;
    top: -20px;
    color: #ff69b4;
    font-size: 20px;
    animation: fall linear infinite;
    will-change: transform;
}

@keyframes fall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0.4;
    }
}

/* Special styles for Claire Rexanna */
.claire-mode .main-title {
    background: linear-gradient(45deg, #ff69b4, #ff1493);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 2px 2px 4px rgba(255, 105, 180, 0.3);
}

.claire-mode .start-btn {
    background: linear-gradient(45deg, #ff69b4, #ff1493);
}

.claire-mode .progress {
    background: linear-gradient(45deg, #ff69b4, #ff1493);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    body {
        padding: 0;
        margin: 0;
        min-height: 100vh;
        min-height: -webkit-fill-available; /* iOS height fix */
    }

    html {
        height: -webkit-fill-available; /* iOS height fix */
    }

    .start-screen, .game-container {
        padding: 15px;
        margin: 0;
        width: 100%;
        border-radius: 0;
        min-height: 100vh;
        box-shadow: none;
    }

    .main-title {
        font-size: 2.8em;
        margin-bottom: 15px;
    }

    .subtitle {
        font-size: 1.1em;
        padding: 0 10px;
    }

    .emoji-row {
        font-size: 1.8em;
        margin: 15px 0;
    }

    .username-input {
        font-size: 1.2em;
        padding: 12px 15px;
        margin: 10px auto;
        width: 90%;
        max-width: none;
        border-width: 2px;
    }

    .stats-preview {
        padding: 10px;
        margin: 20px 0;
        gap: 15px;
    }

    .stat {
        padding: 10px;
    }

    .stat-number {
        font-size: 2.2em;
    }

    .start-btn {
        width: 90%;
        margin: 15px auto;
        padding: 15px 20px;
        font-size: 1.2em;
        -webkit-tap-highlight-color: transparent;
    }

    .player-info {
        margin: 10px 0;
        padding: 12px;
        border-radius: 15px;
    }

    .email-window {
        margin: 10px 0;
        padding: 15px;
        border-radius: 15px;
    }

    .email-header {
        margin-bottom: 15px;
    }

    .email-meta p {
        margin: 5px 0;
        font-size: 0.95em;
    }

    .email-body {
        font-size: 1em;
        line-height: 1.5;
        margin: 10px 0;
    }

    .options-title {
        font-size: 1.1em;
        margin: 15px 0 10px;
    }

    .options-grid {
        gap: 10px;
    }

    .option-btn {
        padding: 15px;
        font-size: 1em;
        margin: 5px 0;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .option-btn:active {
        transform: scale(0.98);
    }

    .next-btn {
        width: 90%;
        margin: 15px auto;
        padding: 15px;
        font-size: 1.1em;
        -webkit-tap-highlight-color: transparent;
    }

    .next-btn:active {
        transform: scale(0.98);
    }

    .feedback-modal {
        width: 85%;
        padding: 20px;
        border-radius: 15px;
    }

    .feedback-emoji {
        font-size: 2.5em;
        margin-bottom: 10px;
    }

    .feedback-text {
        font-size: 1.1em;
        margin: 10px 0;
    }

    .feedback-points {
        font-size: 1.8em;
    }

    /* Better touch targets */
    .theme-button {
        width: 44px;
        height: 44px;
        font-size: 1.5em;
        -webkit-tap-highlight-color: transparent;
    }

    /* Improve scrolling */
    .email-window {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: 40vh;
    }

    /* Prevent zoom on input focus */
    input, button {
        font-size: 16px !important;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .main-title {
        font-size: 2.4em;
    }

    .subtitle {
        font-size: 1em;
    }

    .emoji-row {
        font-size: 1.5em;
    }

    .stat-number {
        font-size: 2em;
    }

    .email-body, .response-content {
        font-size: 0.95em;
    }

    .option-btn {
        font-size: 0.95em;
        padding: 12px;
    }

    .theme-button {
        top: 10px;
        right: 10px;
        font-size: 1.2em;
    }
}

/* Landscape mode */
@media (max-height: 600px) and (orientation: landscape) {
    .start-screen, .game-container {
        max-height: 100vh;
        overflow-y: auto;
    }

    .main-title {
        font-size: 2.2em;
        margin-bottom: 10px;
    }

    .stats-preview {
        flex-direction: row;
    }

    .email-window {
        max-height: 35vh;
    }

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

/* Mobile Adjustments */
@media (max-width: 768px) {
    .top-bar {
        padding: 8px 15px;
    }

    .player-name-display {
        max-width: 100px;
        font-size: 0.9em;
    }

    .progress-container {
        margin: 0 8px;
    }

    .score-display {
        font-size: 1em;
    }

    .game-content {
        margin-top: 50px;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .top-bar {
        padding: 6px 10px;
    }

    .player-name-display {
        max-width: 80px;
    }

    .score-display {
        font-size: 0.9em;
    }

    .game-content {
        margin-top: 45px;
    }
}

/* Landscape mode */
@media (max-height: 600px) and (orientation: landscape) {
    .top-bar {
        position: relative;
    }

    .game-content {
        margin-top: 10px;
    }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    /* General Layout */
    body {
        padding: 10px;
    }

    .game-container {
        padding: 0;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }

    /* Top Bar */
    .top-bar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        padding: 10px;
        background-color: var(--card-bg);
        box-shadow: 0 2px 10px var(--shadow-color);
        z-index: 100;
    }

    .player-info {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .info-group {
        padding: 6px 10px;
        font-size: 0.9em;
    }

    .progress-container {
        width: 100%;
        margin-top: 8px;
    }

    /* Game Content */
    .game-content {
        margin-top: 120px;
        padding: 10px;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Email Window */
    .email-window {
        margin: 0;
        border-radius: 12px;
        box-shadow: 0 2px 8px var(--shadow-color);
    }

    .email-header {
        padding: 12px;
        flex-direction: column;
        gap: 8px;
    }

    .header-item {
        font-size: 0.9em;
    }

    .email-body {
        padding: 15px;
        font-size: 0.95em;
        line-height: 1.5;
    }

    /* Options */
    .options-container {
        padding: 15px;
        margin-top: 10px;
    }

    .options-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .option-btn {
        padding: 12px 15px;
        font-size: 0.95em;
        line-height: 1.4;
        text-align: left;
        white-space: normal;
        height: auto;
    }

    /* Start Screen */
    .start-content {
        padding: 20px;
        margin: 10px;
        max-width: 100%;
    }

    .game-logo h1 {
        font-size: 2em;
    }

    .logo-icon {
        font-size: 2.5em;
    }

    .tagline {
        font-size: 1.1em;
    }

    .description {
        font-size: 0.95em;
    }

    /* Modal */
    .modal-content {
        padding: 20px;
        margin: 10px;
        max-width: 100%;
    }

    .instruction-item {
        padding: 10px;
        gap: 12px;
    }

    .instruction-icon {
        font-size: 1.3em;
    }

    .instruction-item p {
        font-size: 0.95em;
    }
}

/* Small phones */
@media (max-width: 360px) {
    .info-group {
        padding: 4px 8px;
        font-size: 0.85em;
    }

    .game-logo h1 {
        font-size: 1.8em;
    }

    .logo-icon {
        font-size: 2.2em;
    }

    .email-header {
        padding: 10px;
    }

    .email-body {
        padding: 12px;
        font-size: 0.9em;
    }

    .option-btn {
        padding: 10px 12px;
        font-size: 0.9em;
    }
}

/* Landscape Mode */
@media (max-height: 600px) and (orientation: landscape) {
    .game-container {
        height: auto;
        min-height: 100vh;
    }

    .top-bar {
        position: sticky;
    }

    .game-content {
        margin-top: 10px;
    }

    .start-content,
    .modal-content {
        max-height: 85vh;
        overflow-y: auto;
    }

    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .game-container {
        min-height: -webkit-fill-available;
    }

    .game-content {
        height: auto;
    }

    .email-window {
        -webkit-overflow-scrolling: touch;
    }
}
