.pin-btn {
    @apply p-1 rounded transition-all duration-200;
}

.pin-btn:hover {
    @apply transform scale-110;
}

.pin-btn.selected svg circle {
    fill: #9ca3af;
    stroke: #6b7280;
}

.pin-btn.selected svg text {
    fill: #374151;
}

.pin-btn:disabled {
    @apply opacity-50 cursor-not-allowed;
}

.pin-btn:disabled:hover {
    @apply transform-none;
}

/* Quick scoring buttons */
.quick-scoring-btn {
    @apply px-4 py-2 rounded-lg font-bold text-lg transition-colors;
    height: 60px;
    min-width: 80px;
    max-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Quick scoring buttons specific styling */
button#gutter-btn.quick-scoring-btn,
button#spare-btn.quick-scoring-btn,
button#strike-btn.quick-scoring-btn {
    padding-left: 3rem !important;
    padding-right: 3rem !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
    min-width: 120px !important;
    font-size: 2rem !important;
    color: white !important;
}

button#gutter-btn.quick-scoring-btn {
    border: 3px solid #991b1b !important;
}

button#spare-btn.quick-scoring-btn {
    border: 3px solid #1e3a8a !important;
}

button#strike-btn.quick-scoring-btn {
    border: 3px solid #166534 !important;
}

/* Action and game control buttons */
#clear-pins,
#confirm-throws,
#new-game,
#undo-last {
    border: 3px solid #374151 !important;
}

#new-game {
    border: 3px solid #1e3a8a !important;
}

#undo-last {
    border: 3px solid #991b1b !important;
}

.frame-box {
    @apply bg-gray-700 rounded-lg p-2 text-center border-2 border-gray-600;
    width: 70px !important;
    height: 70px !important;
    min-width: 70px !important;
    min-height: 70px !important;
    max-width: 70px !important;
    max-height: 70px !important;
    display: flex;
    flex-direction: column;
    border: 2px solid #4b5563;
    margin: 0 2px;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
    justify-content: flex-start;
    align-items: stretch;
}

/* Override frame label text to show only numbers */
.frame-box .text-sm {
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: #9ca3af;
    line-height: 1;
}

/* Force frame labels to be just numbers */
.frame-box div:first-child {
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
    color: #9ca3af;
    line-height: 1;
    flex-shrink: 0;
}

/* 10th frame is wider */
.frame-box:nth-child(10) {
    width: 100px;
    height: 70px;
    min-width: 100px;
    min-height: 70px;
    max-width: 100px;
    max-height: 70px;
}

.throw-box {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    font-size: 1.2rem !important;
    padding: 2px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
}

/* Higher specificity for frames 1-9 throw boxes */
.frame-box:not(:nth-child(10)) .throw-box {
    font-size: 1.2rem !important;
}

/* Override any Tailwind text-xs classes */
.throw-box.text-xs {
    font-size: 1.2rem !important;
}

.frame-box:nth-child(10) .throw-box,
.frame-box:nth-child(10) div .throw-box {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    font-size: 1.2rem !important;
    padding: 3px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
}

.frame-box.current {
    @apply border-blue-500 bg-gray-600;
}

.frame-box.completed {
    @apply border-green-600;
}

.throw-box {
    @apply bg-gray-800 rounded px-1 py-0.5 text-xs font-mono inline-block text-center;
    width: 2vw !important;
    height: 2vw !important;
    min-width: 12px !important;
    min-height: 12px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.6rem !important;
}

/* Ensure all throw boxes have identical styling */
.frame-box .throw-box,
.frame-box div .throw-box {
    width: 2vw !important;
    height: 2vw !important;
    min-width: 12px !important;
    min-height: 12px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #1f2937 !important;
    border-radius: 0.25rem !important;
    padding: 0.25rem !important;
    font-size: 0.6rem !important;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace !important;
    text-align: center !important;
    color: #f3f4f6 !important;
}

/* Update flex container spacing for mobile */
#scorecard .flex {
    gap: 0.5vw !important;
    justify-content: center !important;
}

/* 10th frame throw boxes scale with frame */
.frame-box:nth-child(10) .throw-box,
.frame-box:nth-child(10) div .throw-box {
    width: 2.5vw !important;
    height: 2.5vw !important;
    min-width: 15px !important;
    min-height: 15px !important;
    max-width: 22px !important;
    max-height: 22px !important;
}

/* 10th frame score positioning */
.frame-box:nth-child(10) > div:last-child {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 1rem !important;
    font-weight: bold;
    color: #fbbf24;
}

.score-box {
    @apply text-xs font-bold text-green-400;
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 8px);
    font-size: 1rem;
    line-height: 1;
}

#scorecard {
    height: auto !important;
    width: 85vw !important;
    max-width: 320px !important;
    min-width: 280px !important;
    padding: 8px !important;
    margin: 0 auto !important;
    overflow-x: visible !important;
}

/* Override Tailwind classes with higher specificity */
div#scorecard.bg-gray-800.rounded-lg.p-4.overflow-x-auto {
    width: 85vw !important;
    max-width: 320px !important;
    min-width: 280px !important;
    height: auto !important;
    padding: 8px !important;
    overflow-x: visible !important;
}
