* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Screen reader only text */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    clip-path: inset(50%) !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    color: white;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    min-height: 100dvh;
}

a {
    color: inherit;
    text-decoration: underline;
    opacity: 0.8;
}

button {
    padding: 4px;
    cursor: pointer;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    align-items: center;
    width: 100%;
}

/* Site Header */
.site-header {
    padding: 20px;
    width: 100%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 16px;
}

.header-main {
    flex: 1;
}

.header-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.site-header h1 {
    font-family: 'Instrument Serif', serif;
    font-size: 42px;
    font-weight: 300;
    color: white;
}

.site-header p {
    font-size: 16px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.app-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: relative;
    flex: 1;
    max-width: 1200px;
    width: calc(100% - 40px);
    background: linear-gradient(135deg, hsl(225, 10%, 35%) 0%, hsl(225, 10%, 30%) 100%);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}



/* Tempo level indicator */
.tempo-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: hsl(213, 9%, 15%);
    height: 0%;
    z-index: 0;
    border-radius: 0 0 24px 24px;
}

/* Main content */
.content {
    flex: 1;
    z-index: 5;
    display: flex;
    flex-direction: column;
    padding: 20px;
    justify-content: space-between;
}

/* Top bar */
.top-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

/* Beat indicators */
.beat-indicators {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 15px;
    border-radius: 25px;
    cursor: pointer;
    touch-action: manipulation;
}

@media (hover: hover) {
    .beat-indicators:hover {
        background: rgba(255, 255, 255, 0.05);
    }
}

.beat-indicators:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.98);
}

.beat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.1s ease;
}

.beat-dot.active {
    background: white;
    transform: scale(1.2);
}



/* Center section */
.center-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-shrink: 0;
}

.tempo-control {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    font-weight: bold;
    width: 80px;
    height: 80px;
    border-radius: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .tempo-control:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

.tempo-control:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.95);
}

.tempo-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tempo-display {
    font-size: 96px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    width: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
    border-radius: 12px;
    touch-action: manipulation;
}

.tempo-display:active,
.tempo-display.tap-active {
    color: rgba(255, 255, 255, 0.5);
    transform: scale(0.98);
}


/* Play section */
.play-section {
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.play-button {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    width: 80px;
    height: 80px;
    border-radius: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

@media (hover: hover) {
    .play-button:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

.play-button:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.95);
}

.play-icon {
    margin-left: 1px;
}





/* App Promotion */
.app-promotion {
    flex-shrink: 0;
}

.btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 1);
    color: #000;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 120px;
    text-align: left;
    cursor: pointer;
    height: 60px;
}

.btn-outline {
    background: none;
    color: white;
    border: 1px solid white;
}

.btn-outline:hover {
    background: white;
    color: #000;
}

@media (hover: hover) {
    .btn:hover {
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
}

.btn:active {
   
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 2px #ffffff;
}

.btn-text {
    display: flex;
    flex-direction: column;
}

.btn-text-main {
    font-size: 16px;
    font-weight: 700;
}

.btn-subline {
    font-size: 10px;
    font-weight: 400;
    opacity: 0.6;
    margin-top: 1px;
}

.btn-subline a {
    color: inherit;
    text-decoration: underline;
    opacity: 0.8;
}

/* Site Footer */
.site-footer {
    padding: 20px;
    text-align: center;
    width: 100%;
}

.site-footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin: 0;
}

/* Shortcuts Modal */
.shortcuts-modal {
    border: none;
    border-radius: 12px;
    background: none;
    padding: 0;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 18rem;
}

.shortcuts-modal::backdrop {
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background: hsl(225, 10%, 20%);
    border-radius: 12px;
    color: white;
    padding: 0;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-body {
    padding: 20px 24px 24px;
}

.shortcut-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.shortcut-item {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
}

.shortcut-keys {
    display: flex;
    gap: 8px;
    align-items: center;
}

.key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 8px;
    background: linear-gradient(135deg, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 85%) 100%);
    border: 1px solid hsl(0, 0%, 70%);
    border-radius: 4px;
    color: hsl(0, 0%, 20%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.shortcut-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

/* Ensure high contrast focus indicators */
:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Hide shortcuts button on touch devices - keyboard shortcuts aren't useful without a physical keyboard */
@media (hover: none) and (pointer: coarse) {
    #shortcutsLink {
        display: none;
    }
    #appDownloadBtn{
        display: none;
    }
}

/* Responsive adjustments for smaller screens */
@media (max-width: 640px) {
    .site-header h1 {
        font-size: 28px;
    }
    
    .header-main {
        flex: 0 1 auto;
        min-width: 0;
    }
}


@media (min-width: 481px) {
    br{
        display: none;
    }
}

/* Only switch to column layout on very small screens */
@media (max-width: 480px) {
    .site-header h1{
        font-size: 24px;
        word-break: break-word;
    }

   
    
    .header-buttons {
        justify-content: center;
    }

    .tempo-control {
        width: 60px;
        height: 60px;
    }

    .tempo-display {
        font-size: 64px;
    }
}

 