/* 變數與設計系統 */
:root {
    --bg-dark: #0a0c14;
    --bg-card: rgba(18, 22, 41, 0.65);
    --border-glow: rgba(0, 242, 254, 0.25);
    --text-primary: #ffffff;
    --text-secondary: #8f9bb3;
    --primary: #00f2fe;
    --primary-glow: rgba(0, 242, 254, 0.5);
    --secondary: #4facfe;
    --danger: #ff4757;
    --danger-glow: rgba(255, 71, 87, 0.5);
    --success: #2ed573;
    --accent: #a18cd1;
    
    /* 俄羅斯方塊霓虹顏色 */
    --clr-i: #00f0f0;
    --clr-o: #f0f000;
    --clr-t: #a000f0;
    --clr-s: #00f000;
    --clr-z: #f00000;
    --clr-j: #0000f0;
    --clr-l: #f0a000;
    
    --neon-blur: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 星空背景特效 */
.bg-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px),
        radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 40px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
    opacity: 0.12;
    z-index: -2;
    animation: backgroundShift 120s linear infinite;
}

.bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.08) 0%, rgba(79, 172, 254, 0.03) 50%, transparent 100%);
    z-index: -1;
    pointer-events: none;
}

@keyframes backgroundShift {
    from { background-position: 0 0, 40px 60px, 130px 270px; }
    to { background-position: 550px 550px, 390px 410px, 380px 820px; }
}

/* 應用程式主容器 */
.app-container {
    width: 100%;
    max-width: 950px;
    height: 95vh;
    max-height: 850px;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

/* 頂部標題 */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    margin-bottom: 15px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 242, 254, 0.25);
}

.logo span {
    font-weight: 300;
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 8px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: rgba(0, 242, 254, 0.15);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* 遊戲排版 */
.game-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 180px 1fr 180px;
    gap: 20px;
    align-items: start;
    min-height: 0; /* 讓 Grid 項目高度可收縮 */
}

/* 面板通用樣式 (Glassmorphism) */
.panel {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 15px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.panel-title {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-align: center;
    position: relative;
    width: 100%;
}

.panel-title::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: var(--primary);
    margin: 6px auto 0 auto;
    border-radius: 2px;
    box-shadow: 0 0 6px var(--primary);
}

.preview-container {
    background: rgba(7, 9, 18, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    aspect-ratio: 1;
}

.preview-container canvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.next-previews {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    align-items: center;
}

.preview-container.next-1 {
    width: 100%;
    aspect-ratio: 1;
}

.preview-container.next-2,
.preview-container.next-3 {
    width: 80%;
    aspect-ratio: 1;
    opacity: 0.65;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

/* 數據區塊 */
.stats-section {
    width: 100%;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-box {
    background: rgba(7, 9, 18, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    padding: 10px 15px;
    width: 100%;
    text-align: center;
}

.stat-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 4px;
}

.stat-number {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
    display: block;
}

/* 中間遊戲主畫面容器 */
.main-board-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 0;
}

.canvas-wrapper {
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 242, 254, 0.05);
    background-color: rgba(5, 6, 12, 0.9);
    overflow: hidden;
    aspect-ratio: 1 / 2;
    height: 100%;
    max-height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* 覆蓋層（開始、暫停、結束） */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 8, 16, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    padding: 20px;
    transition: opacity 0.3s ease;
}

/* 通用隱藏樣式 */
.hidden {
    display: none !important;
}

.overlay.hidden {
    display: flex !important;
    opacity: 0;
    pointer-events: none;
}

.overlay-content {
    text-align: center;
    width: 100%;
    max-width: 260px;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.overlay h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.controls-guide {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 12px 15px;
    margin-bottom: 20px;
    text-align: left;
}

.controls-guide h3 {
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: 1px;
}

.controls-guide ul {
    list-style: none;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.controls-guide li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: inherit;
    font-size: 0.7rem;
    color: var(--text-primary);
    box-shadow: 0 2px 0 rgba(0,0,0,0.3);
}

.primary-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    color: #000;
    font-family: inherit;
    font-weight: 800;
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: all 0.2s ease;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.7);
}

.primary-btn:active {
    transform: translateY(1px);
}

.gameover-title {
    color: var(--danger);
    text-shadow: 0 0 15px var(--danger-glow);
}

.final-stats {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 12px;
    margin: 15px 0 20px 0;
    display: flex;
    justify-content: space-around;
}

.final-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.final-stats .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.final-stats .stat-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary);
    margin-top: 4px;
}

/* 手機控制面板 (預設隱藏) */
.mobile-controls {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 15px 10px;
    margin-top: 10px;
    gap: 15px;
}

/* 搖桿按鍵樣式 */
.dpad-group, .action-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ctrl-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: background 0.1s, transform 0.1s, box-shadow 0.1s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* 觸碰時的微動畫 */
.ctrl-btn:active {
    background: rgba(0, 242, 254, 0.2);
    border-color: var(--primary);
    transform: scale(0.92);
    box-shadow: 0 0 15px var(--primary-glow);
}

.round-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
}

.round-btn span {
    font-size: 24px;
}

.action-btn {
    border-radius: 16px;
    height: 55px;
}

.text-btn {
    width: 60px;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.btn-label {
    background: linear-gradient(135deg, #fff 0%, #b3c0d6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-action {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(0, 242, 254, 0.08);
    border: 2px solid rgba(0, 242, 254, 0.3);
    color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.1);
}

.main-action span {
    font-size: 30px;
}

.main-action:active {
    background: rgba(0, 242, 254, 0.3);
    box-shadow: 0 0 25px var(--primary-glow);
}

/* 響應式適配：手機與小螢幕 */
@media (max-width: 768px) {
    body {
        padding: 5px;
        align-items: stretch;
    }
    
    .app-container {
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        padding: 5px;
        justify-content: space-between;
    }
    
    .game-header {
        padding: 8px 12px;
        margin-bottom: 8px;
        border-radius: 12px;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    /* 重新定義手機上的 Panels 排列 */
    .hold-panel {
        display: flex !important;
        grid-column: 1;
        grid-row: 1;
        width: auto;
        height: auto;
        padding: 0 !important;
        flex-direction: row;
        border-radius: 0;
        gap: 5px;
        align-items: center;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .hold-panel .panel-title {
        display: none !important; /* 隱藏 HOLD 標題，節省空間 */
    }
    
    .hold-panel .preview-container {
        width: 36px !important;
        height: 36px !important;
        padding: 2px !important;
        border-radius: 8px !important;
        background: rgba(7, 9, 18, 0.6) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
    }
    
    .info-panel {
        display: flex !important;
        flex-direction: row;
        width: auto;
        height: auto;
        padding: 0 !important;
        border-radius: 0;
        gap: 8px;
        justify-content: flex-end;
        align-items: center;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        grid-column: 2;
        grid-row: 1;
    }
    
    .info-panel .panel-title {
        display: none !important; /* 隱藏 NEXT 標題，節省空間 */
    }

    .next-section {
        display: flex;
        align-items: center;
        gap: 5px;
    }
    
    .next-previews {
        display: flex;
        flex-direction: row;
        gap: 4px;
        align-items: center;
    }
    
    .preview-container.next-1 {
        width: 36px !important;
        height: 36px !important;
        padding: 2px !important;
        border-radius: 8px !important;
        background: rgba(7, 9, 18, 0.6) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
    }
    
    .preview-container.next-2,
    .preview-container.next-3 {
        display: none !important; /* 手機版隱藏第2、3個預覽，保持畫面清爽 */
    }
    
    .stats-section {
        margin-top: 0;
        flex-direction: row;
        gap: 6px;
        flex: 1;
        justify-content: flex-end;
    }
    
    .stat-box {
        padding: 2px 6px;
        border-radius: 8px;
        width: auto;
        min-width: 50px;
        background: rgba(7, 9, 18, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.03);
    }
    
    .stat-title {
        font-size: 0.55rem;
        margin-bottom: 0;
    }
    
    .stat-number {
        font-size: 0.85rem;
    }
    
    /* 手機上將兩側面板並排放在主 Canvas 上方 */
    .game-layout {
        display: grid;
        grid-template-columns: 1fr 1.5fr; /* 調整比例，給 info 更多空間 */
        grid-template-rows: auto 1fr;
        gap: 8px;
    }
    
    .main-board-container {
        grid-column: 1 / span 2;
        grid-row: 2;
        height: 100%;
        max-height: calc(100vh - 170px) !important;
        max-height: calc(100dvh - 170px) !important; /* 降低頂部高度佔用，給予遊戲主畫面最大垂直空間 */
    }
    
    .canvas-wrapper {
        border-radius: 16px;
        max-height: 100%;
        max-width: 100%;
    }
    
    /* 顯示手機控制按鈕，並縮小尺寸確保完全不超出螢幕 */
    .mobile-controls {
        display: flex;
        justify-content: space-between;
        margin-top: 5px;
        padding: 6px 8px !important;
        background: rgba(18, 22, 41, 0.4);
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.03);
        gap: 8px !important;
        width: 100%;
        box-sizing: border-box;
    }
    
    .dpad-group, .action-group {
        gap: 5px !important;
    }
    
    .ctrl-btn {
        width: 45px !important;
        height: 45px !important;
    }
    
    .round-btn {
        width: 45px !important;
        height: 45px !important;
        border-radius: 50%;
    }
    
    .round-btn span {
        font-size: 18px !important;
    }
    
    .action-btn {
        height: 45px !important;
        border-radius: 12px !important;
    }
    
    .text-btn {
        width: 46px !important;
        font-size: 0.65rem !important;
        padding: 0 !important;
    }
    
    .main-action {
        width: 56px !important;
        height: 56px !important;
        margin-top: -6px; /* 旋轉鈕稍大，往上浮出，增加動態感 */
    }
    
    .main-action span {
        font-size: 22px !important;
    }
}

/* 超小螢幕適配（例如 iPhone SE） */
@media (max-width: 360px) {
    .ctrl-btn {
        width: 46px;
        height: 46px;
    }
    
    .main-action {
        width: 60px;
        height: 60px;
    }
    
    .text-btn {
        width: 50px;
        font-size: 0.65rem;
    }
    
    .round-btn span, .main-action span {
        font-size: 20px;
    }
    
    .main-board-container {
        max-height: calc(100vh - 200px);
    }
}

/* ==========================================
   自訂選單與高分排行榜 Modal 樣式
   ========================================== */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 8, 16, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

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

.custom-modal-content {
    background: var(--bg-card);
    border: 2px solid var(--border-glow);
    border-radius: 24px;
    width: 90%;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 25px;
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.15), inset 0 0 15px rgba(255, 255, 255, 0.05);
    position: relative;
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(255, 71, 87, 0.2);
    border-color: var(--danger);
    color: var(--danger);
    box-shadow: 0 0 10px var(--danger-glow);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.modal-section {
    margin-bottom: 22px;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section-title span {
    font-size: 1.2rem;
}

/* 排行榜表格樣式 */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th {
    text-align: left;
    font-size: 0.7rem;
    color: var(--text-secondary);
    padding: 6px 8px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-transform: uppercase;
}

.leaderboard-table td {
    padding: 8px;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.leaderboard-table tr:last-child td {
    border-bottom: none;
}

/* 名次高亮色彩 */
.leaderboard-table tr.top-rank-1 {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.25);
}
.leaderboard-table tr.top-rank-2 {
    color: #b0c4de;
    text-shadow: 0 0 8px rgba(176, 196, 222, 0.2);
}
.leaderboard-table tr.top-rank-3 {
    color: #cd7f32;
    text-shadow: 0 0 8px rgba(205, 127, 50, 0.2);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
}

.top-rank-1 .rank-badge {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid #ffd700;
}
.top-rank-2 .rank-badge {
    background: rgba(176, 196, 222, 0.2);
    border: 1px solid #b0c4de;
}
.top-rank-3 .rank-badge {
    background: rgba(205, 127, 50, 0.2);
    border: 1px solid #cd7f32;
}

.leaderboard-score {
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    font-size: 0.9rem;
}

/* 暱稱輸入面板（霓虹發光邊框與呼吸效果） */
.new-record-panel {
    background: rgba(0, 242, 254, 0.06);
    border: 1px dashed rgba(0, 242, 254, 0.35);
    border-radius: 16px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.05);
    animation: borderBreathe 2s infinite ease-in-out;
}

@keyframes borderBreathe {
    0%, 100% { border-color: rgba(0, 242, 254, 0.35); box-shadow: 0 0 10px rgba(0, 242, 254, 0.05); }
    50% { border-color: rgba(0, 242, 254, 0.8); box-shadow: 0 0 20px rgba(0, 242, 254, 0.25); }
}

.glow-text {
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
    margin-bottom: 10px;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.new-record-panel input {
    background: rgba(7, 9, 18, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.85rem;
    width: 100%;
    margin-bottom: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.new-record-panel input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.primary-btn.compact {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 8px;
}

