.character {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    background-color: #e0e0e0;
    border-radius: 50%;
    margin: 6px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    border: 2px solid transparent;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.character:hover {
    background-color: #d0d0d0;
    transform: scale(1.05);
}

.character:active {
    transform: scale(0.95);
}

.character.active {
    background-color: #ffcc00;
    transform: scale(1.1);
    border-color: #ff9800;
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.5);
}

.character-name {
    font-size: 10px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    padding: 0 4px;
}

@media (max-width: 768px) {
    .character {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        margin: 4px;
    }

    .character-name {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .character {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        margin: 3px;
    }

    .character-name {
        font-size: 8px;
    }
}
.game-board-container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px;
    box-sizing: border-box;
}

.game-board {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 16 / 10;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .game-board {
        max-width: 100%;
        min-height: 480px;
    }
}

@media (max-width: 480px) {
    .game-board-container {
        height: auto;
        min-height: 100vh;
        padding: 8px;
    }

    .game-board {
        max-width: 100%;
        min-height: 100%;
        gap: 4px;
        padding: 12px;
    }
}

/* Accessibility: Focus visible for keyboard navigation */
.character:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}
.carousel-wrapper {
    width: 100%;
    padding: 20px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.carousel-wrapper h2 {
    color: white;
    font-size: 24px;
    margin: 0 0 16px 0;
    text-align: center;
}

.carousel-container {
    width: 100%;
    height: 140px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    cursor: grab;
    padding: 0 20px;
    box-sizing: border-box;
}

.carousel-container:active {
    cursor: grabbing;
}

.carousel-container::-webkit-scrollbar {
    height: 8px;
}

.carousel-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.carousel-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.carousel-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.carousel-list {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    width: fit-content;
}

.carousel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.2s ease-in-out;
    outline: none;
    min-width: 100px;
}

.carousel-item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.1);
}

.carousel-item:focus-visible {
    outline: 3px solid #ffcc00;
    outline-offset: 2px;
}

.carousel-item.active {
    background: rgba(255, 204, 0, 0.3);
}

.carousel-item-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease-in-out;
}

.carousel-item.active .carousel-item-circle {
    background: linear-gradient(135deg, #ffcc00 0%, #ffa500 100%);
    transform: scale(1.15);
    box-shadow: 0 6px 18px rgba(255, 204, 0, 0.4);
}

.carousel-item:hover .carousel-item-circle {
    transform: scale(1.08);
}

.character-initial {
    display: block;
}

.carousel-item-name {
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-align: center;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.carousel-item.active .carousel-item-name {
    font-weight: 700;
    color: #ffcc00;
}

@media (max-width: 768px) {
    .carousel-wrapper {
        padding: 16px 0;
    }

    .carousel-wrapper h2 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .carousel-container {
        height: 120px;
        padding: 0 16px;
    }

    .carousel-item {
        min-width: 90px;
        padding: 6px;
        gap: 6px;
    }

    .carousel-item-circle {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }

    .carousel-item-name {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .carousel-wrapper {
        padding: 12px 0;
    }

    .carousel-wrapper h2 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .carousel-container {
        height: 100px;
        padding: 0 12px;
    }

    .carousel-item {
        min-width: 80px;
        padding: 4px;
        gap: 4px;
    }

    .carousel-item-circle {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .carousel-item-name {
        font-size: 10px;
    }
}
.mission-container {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.mission-header {
    text-align: center;
    color: white;
    margin-bottom: 24px;
    width: 100%;
    max-width: 400px;
}

.mission-header h2 {
    font-size: 32px;
    margin: 0 0 12px 0;
    font-weight: 700;
}

.mission-objective {
    font-size: 18px;
    margin: 0;
    opacity: 0.95;
    font-weight: 500;
}

.mission-info {
    width: 100%;
    max-width: 400px;
    display: flex;
    justify-content: space-around;
    margin-bottom: 24px;
    gap: 16px;
}

.character-info,
.difficulty-info {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

.mission-progress {
    width: 100%;
    max-width: 400px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.progress-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
}

.progress-item label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.progress-value {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
}

.mission-status {
    width: 100%;
    max-width: 400px;
    margin-bottom: 24px;
}

.status-text {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    padding: 12px;
    border-radius: 8px;
    margin: 0;
}

.status-active {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.2);
}

.status-completed {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.2);
}

.status-failed {
    color: #f44336;
    background: rgba(244, 67, 54, 0.2);
}

.rope-cut-button {
    width: 100%;
    max-width: 400px;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    margin-bottom: 24px;
}

.rope-cut-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.rope-cut-button:active {
    transform: translateY(0);
}

.mission-complete,
.mission-failed {
    width: 100%;
    max-width: 400px;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
}

.mission-complete {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.mission-failed {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.mission-complete p,
.mission-failed p {
    margin: 0;
}

@media (max-width: 768px) {
    .mission-header h2 {
        font-size: 28px;
    }

    .mission-objective {
        font-size: 16px;
    }

    .progress-value {
        font-size: 28px;
    }

    .rope-cut-button {
        font-size: 16px;
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .mission-container {
        padding: 12px;
    }

    .mission-header {
        margin-bottom: 20px;
    }

    .mission-header h2 {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .mission-objective {
        font-size: 14px;
    }

    .mission-info {
        margin-bottom: 20px;
        flex-direction: column;
    }

    .character-info,
    .difficulty-info {
        padding: 10px 12px;
        font-size: 14px;
    }

    .progress-item {
        padding: 12px;
    }

    .progress-value {
        font-size: 24px;
    }

    .rope-cut-button {
        font-size: 14px;
        padding: 12px 16px;
        margin-bottom: 20px;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body, #root {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f5f5f5;
}

.screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.character-select-screen,
.mission-screen,
.game-screen {
    animation: screen-fade-in 0.3s ease-out;
}

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

.loading {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #666;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 12px;
    }
}
:root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}

a:hover {
  color: #535bf2;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}

button:hover {
  border-color: #646cff;
}

button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}
