/* 8Trax - Complete Professional DAW Studio CSS */
:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1f2937;
    --darker: #111827;
    --light: #f3f4f6;
    --gray: #6b7280;
    --border-radius: 12px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #1f2937;
    padding-bottom: 70px;
}

/* ==================== MOBILE NAVIGATION ==================== */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    padding: 8px 4px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    padding: 6px 6px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.nav-label {
    font-size: 9px;
    font-weight: 500;
    color: #6b7280;
}

.nav-item.active .nav-icon {
    transform: scale(1.05);
    color: var(--primary);
}

.nav-item.active .nav-label {
    color: var(--primary);
    font-weight: 600;
}

/* ==================== APP CONTAINER ==================== */
.app-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 12px;
    padding-bottom: 80px;
}

/* ==================== HEADER ==================== */
.app-header {
    background: white;
    border-radius: var(--border-radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 99;
}

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

.logo-icon {
    font-size: 26px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.icon-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.icon-btn:active {
    background: var(--light);
}

.auth-section {
    display: flex;
    gap: 8px;
}

/* ==================== WELCOME BANNER ==================== */
.welcome-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    color: white;
    text-align: center;
}

.welcome-content h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.welcome-content p {
    font-size: 13px;
    margin-bottom: 14px;
    opacity: 0.9;
}

.welcome-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    background: white;
    border-radius: var(--border-radius);
    min-height: 500px;
    overflow: hidden;
}

.page {
    display: none;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

.page-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.page-header h2 {
    font-size: 22px;
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--gray);
    font-size: 13px;
}

/* ==================== FILTERS ==================== */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: white;
    font-size: 14px;
    font-family: inherit;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ==================== BEAT GRID & CARDS ==================== */
.beats-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.beat-card {
    background: var(--light);
    border-radius: 14px;
    padding: 16px;
    transition: all 0.2s;
    cursor: pointer;
}

.beat-card:active {
    transform: scale(0.98);
}

.beat-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.beat-info {
    color: var(--gray);
    font-size: 12px;
    margin-bottom: 8px;
}

.beat-stats {
    display: flex;
    gap: 16px;
    margin: 8px 0;
    font-size: 11px;
    color: var(--gray);
}

.beat-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0;
}

.tag {
    background: #e5e7eb;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    color: #4b5563;
}

audio {
    width: 100%;
    margin: 12px 0;
    border-radius: 8px;
    height: 40px;
}

/* ==================== BEAT ACTIONS ==================== */
.beat-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.beat-actions button {
    flex: 1;
    font-size: 12px;
    padding: 8px;
}

/* ==================== FEED ITEMS ==================== */
.feed-container,
.trending-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feed-item {
    background: var(--light);
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.feed-item:active {
    transform: scale(0.98);
}

.feed-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.feed-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.feed-user-info {
    flex: 1;
}

.feed-username {
    font-weight: 600;
    font-size: 14px;
}

.feed-time {
    font-size: 10px;
    color: var(--gray);
}

.feed-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-beat {
    background: var(--success);
    color: white;
}

.badge-recording {
    background: var(--primary);
    color: white;
}

/* ==================== LEADERBOARD ==================== */
.leaderboard-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.leaderboard-item:active {
    transform: scale(0.98);
}

.leaderboard-rank {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary);
    width: 40px;
}

.leaderboard-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.leaderboard-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
}

.leaderboard-stats {
    text-align: right;
    font-size: 11px;
    color: #6b7280;
}

/* ==================== 8-TRACK STUDIO ==================== */
.studio-selector h3 {
    margin-bottom: 16px;
    font-size: 18px;
}

.multi-track-studio {
    background: var(--dark);
    border-radius: 14px;
    padding: 16px;
}

.transport-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
    padding: 12px;
    background: #1f2937;
    border-radius: 12px;
}

.transport-controls button {
    flex: 1;
    padding: 10px;
    font-size: 14px;
}

.transport-controls .btn-danger {
    background: var(--danger);
}

.timer-display {
    background: #111827;
    padding: 10px 16px;
    border-radius: 8px;
    color: #10b981;
    font-family: monospace;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    min-width: 140px;
}

/* Metronome Controls */
.metronome-controls {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #1f2937;
    border-radius: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: white;
    font-size: 13px;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    width: 44px;
    height: 22px;
    background: #6b7280;
    border-radius: 22px;
    position: relative;
    transition: 0.3s;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: #667eea;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.toggle-label {
    font-size: 12px;
}

.bpm-control {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.bpm-control label {
    font-size: 13px;
    font-weight: 500;
}

.bpm-control input {
    width: 70px;
    padding: 6px 8px;
    border-radius: 8px;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    background: #374151;
    color: white;
}

/* Count In Display */
.count-in-display {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    border-radius: 80px;
    padding: 40px 60px;
    text-align: center;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: pulse 1s infinite;
}

.count-in-number {
    font-size: 80px;
    font-weight: bold;
    color: #667eea;
    font-family: monospace;
}

.count-in-text {
    font-size: 18px;
    color: white;
    font-weight: 500;
}

/* Track Container */
.track-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    max-height: 500px;
    overflow-y: auto;
}

.track {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 12px;
}

.track-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.track-number {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.track-name-input {
    background: #444;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    width: 130px;
}

.track-name-input:read-only {
    opacity: 0.7;
    cursor: default;
}

.track-controls {
    display: flex;
    gap: 6px;
}

.track-record {
    background: var(--danger);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s;
}

.track-record:active {
    transform: scale(0.95);
}

.track-clear {
    background: var(--warning);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s;
}

.track-fx {
    background: #8b5cf6;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s;
}

.track-waveform {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 8px;
    margin: 8px 0;
    position: relative;
}

.track-waveform canvas {
    display: block;
    width: 100%;
    height: 45px;
}

.track-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 12px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.track-volume input {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    -webkit-appearance: none;
    background: #444;
}

.track-volume input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.track-solo {
    background: #10b981;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 500;
}

.track-mute {
    background: #6b7280;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 500;
}

/* ==================== LIBRARY TABS ==================== */
.library-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}

.lib-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
}

.lib-tab.active {
    background: var(--primary);
    color: white;
}

/* ==================== PROFILE ==================== */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 16px;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 16px 0;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 11px;
    color: var(--gray);
}

.profile-bio {
    background: var(--light);
    padding: 12px;
    border-radius: 12px;
    margin: 16px 0;
    font-size: 13px;
    color: #4b5563;
}

/* ==================== MODALS ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-small {
    max-width: 380px;
}

.modal-medium {
    max-width: 500px;
}

.modal-large {
    max-width: 600px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.modal-header h2,
.modal-header h3 {
    font-size: 18px;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
    color: #6b7280;
}

/* ==================== COMMENTS ==================== */
.comments-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-name {
    font-weight: 600;
    font-size: 13px;
}

.comment-text {
    font-size: 13px;
    margin-top: 4px;
    color: #4b5563;
}

.comment-actions {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.comment-like {
    background: none;
    border: none;
    font-size: 11px;
    cursor: pointer;
    color: #6b7280;
}

.comment-time {
    font-size: 10px;
    color: #9ca3af;
}

.comment-input {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid #e5e7eb;
    position: sticky;
    bottom: 0;
    background: white;
}

.comment-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 25px;
    font-size: 13px;
}

.comment-input input:focus {
    outline: none;
    border-color: var(--primary);
}

.comment-input button {
    padding: 10px 18px;
}

/* ==================== MESSAGES / CHAT ==================== */
.messages-container {
    display: flex;
    flex-direction: column;
    height: 500px;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
    max-height: 500px;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background 0.2s;
}

.conversation-item:hover {
    background: var(--light);
}

.conversation-item:active {
    background: #e5e7eb;
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
}

.chat-header .modal-close {
    font-size: 20px;
    padding: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    min-height: 300px;
}

.message {
    display: flex;
    margin-bottom: 4px;
}

.message.sent {
    justify-content: flex-end;
}

.message.received {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 75%;
    padding: 8px 14px;
    border-radius: 18px;
    font-size: 13px;
    word-wrap: break-word;
    line-height: 1.4;
}

.message.sent .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.received .message-bubble {
    background: #f3f4f6;
    color: #1f2937;
    border-bottom-left-radius: 4px;
}

.chat-input {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #e5e7eb;
    background: white;
}

.chat-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 25px;
    font-size: 13px;
}

.chat-input input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-input button {
    padding: 10px 18px;
}

/* ==================== FX CONTROLS ==================== */
.fx-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
}

.fx-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.fx-item label {
    width: 60px;
    font-weight: 500;
    font-size: 13px;
}

.fx-item input[type="range"] {
    flex: 1;
    height: 4px;
}

.fx-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* ==================== FORMS ==================== */
.upload-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* ==================== BUTTONS ==================== */
.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:active {
    transform: scale(0.96);
}

.btn-secondary {
    background: var(--light);
    color: var(--dark);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-block {
    width: 100%;
}

/* ==================== SEARCH ==================== */
.search-container {
    padding: 16px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 30px;
    font-size: 15px;
    margin-bottom: 16px;
}

.search-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.search-tab {
    flex: 1;
    padding: 8px;
    background: var(--light);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.search-tab.active {
    background: var(--primary);
    color: white;
}

.search-results-list {
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--light);
}

.search-result-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* ==================== RECORDING ITEM ==================== */
.recording-item {
    background: var(--light);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.vote-section {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    align-items: center;
}

.vote-section select {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 12px;
}

/* ==================== UTILITIES ==================== */
.text-center {
    text-align: center;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
    font-size: 13px;
}

.load-more {
    text-align: center;
    margin-top: 20px;
}

/* ==================== ANIMATIONS ==================== */
@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== RESPONSIVE ==================== */
@media (min-width: 768px) {
    .app-container {
        max-width: 700px;
    }
    
    .beats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .track-header {
        flex-wrap: nowrap;
    }
    
    .nav-label {
        font-size: 10px;
    }
    
    .nav-icon {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 8px;
    }
    
    .page {
        padding: 16px;
    }
    
    .beat-title {
        font-size: 16px;
    }
    
    .track-name-input {
        width: 100px;
    }
    
    .leaderboard-user {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .leaderboard-stats {
        text-align: left;
    }
    
    .beat-actions {
        flex-direction: column;
    }
    
    .feed-header {
        flex-wrap: wrap;
    }
    
    .feed-badge {
        font-size: 9px;
    }
    
    .transport-controls {
        flex-wrap: wrap;
    }
    
    .timer-display {
        font-size: 11px;
        min-width: 120px;
    }
    
    .metronome-controls {
        gap: 10px;
    }
    
    .count-in-number {
        font-size: 60px;
    }
    
    .count-in-display {
        padding: 30px 40px;
    }
    
    .message-bubble {
        max-width: 85%;
        font-size: 12px;
    }
    
    .chat-input button {
        padding: 10px 14px;
    }
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}