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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a12;
    color: #fff;
    overflow-x: hidden;
}

/* Auth Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #1a1a2e;
    padding: 30px 25px;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 28px;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: #2d2d3f;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

.auth-tab.active {
    background: #667eea;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form input {
    width: 100%;
    padding: 14px;
    margin: 8px 0;
    background: #2d2d3f;
    border: 1px solid #3d3d5f;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
}

.auth-form input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-form button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
}

.error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
}

/* Main App */
#main-app {
    display: none;
    min-height: 100vh;
    padding-bottom: 70px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #0a0a12;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid #2d2d3f;
}

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

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

.header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
    cursor: pointer;
    background: #2d2d3f;
}

.username {
    font-size: 14px;
    cursor: pointer;
}

.logout-btn {
    padding: 6px 12px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a2e;
    display: flex;
    justify-content: space-around;
    padding: 8px 12px;
    border-top: 1px solid #2d2d3f;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: #888;
    font-size: 10px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 12px;
}

.nav-item.active {
    color: #667eea;
    background: rgba(102,126,234,0.1);
}

.nav-item span:first-child {
    font-size: 22px;
}

/* Views */
.view {
    display: none;
    padding: 16px;
}

.view.active {
    display: block;
}

/* Studio View */
.studio-view {
    display: none;
    padding: 16px;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 70px;
    overflow-y: auto;
    background: #0a0a12;
    z-index: 90;
}

.studio-view.active {
    display: block;
}

/* Recording Panel - Top placement */
.recording-panel-top {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.recording-panel-top .recording-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Blinking animation for buttons */
@keyframes blink {
    0% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    50% { opacity: 0.7; transform: scale(1.02); box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
    100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

@keyframes blink-blue {
    0% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7); }
    50% { opacity: 0.7; transform: scale(1.02); box-shadow: 0 0 0 8px rgba(52, 152, 219, 0); }
    100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
}

.blink-record {
    animation: blink 1s ease-in-out 3;
}

.blink-upload {
    animation: blink-blue 1s ease-in-out 3;
}

.record-btn.disabled, .upload-btn.disabled {
    animation: none !important;
}

/* Upload Progress */
.upload-progress {
    margin-top: 12px;
    padding: 12px;
    background: #1a1a2e;
    border-radius: 12px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #2d2d3f;
    border-radius: 4px;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.upload-status-text {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
    text-align: center;
}

@keyframes progressPulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.upload-progress .upload-status-text {
    animation: progressPulse 1.5s ease-in-out infinite;
}

/* Feed */
.feed-header {
    margin-bottom: 20px;
}

.feed-header h3 {
    font-size: 22px;
    margin-bottom: 4px;
}

.feed-header p {
    font-size: 13px;
    color: #888;
}

.feed-section {
    margin-bottom: 28px;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 12px;
}

/* Horizontal Scroll */
.horizontal-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.horizontal-scroll::-webkit-scrollbar {
    height: 4px;
}

.horizontal-scroll::-webkit-scrollbar-track {
    background: #2d2d3f;
    border-radius: 2px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 2px;
}

.trending-card {
    min-width: 140px;
    background: #1a1a2e;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #2d2d3f;
}

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

.trending-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: #2d2d3f;
}

.trending-info {
    padding: 10px;
}

.trending-title {
    font-weight: bold;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trending-creator {
    font-size: 11px;
    color: #888;
    cursor: pointer;
    margin-top: 4px;
}

.trending-creator:hover {
    color: #667eea;
}

.trending-stats {
    font-size: 10px;
    color: #667eea;
    margin-top: 4px;
    display: flex;
    gap: 8px;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #1a1a2e;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid #2d2d3f;
}

.activity-item:hover {
    border-color: #667eea;
    transform: translateX(5px);
}

.activity-icon {
    font-size: 24px;
}

.activity-info {
    flex: 1;
}

.activity-title {
    font-weight: bold;
    font-size: 14px;
}

.activity-detail {
    font-size: 11px;
    color: #888;
}

.activity-time {
    font-size: 10px;
    color: #667eea;
}

/* Users Grid */
.users-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #1a1a2e;
    border-radius: 16px;
    border: 1px solid #2d2d3f;
}

.user-card:hover {
    border-color: #667eea;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    background: #2d2d3f;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
}

.user-name:hover {
    color: #667eea;
}

.user-stats {
    font-size: 10px;
    color: #667eea;
    margin-top: 4px;
    display: flex;
    gap: 12px;
}

.follow-small-btn {
    padding: 6px 16px;
    background: #667eea;
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 11px;
    cursor: pointer;
}

.follow-small-btn.following {
    background: #2d2d3f;
    color: #888;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h3 {
    font-size: 18px;
}

.create-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

/* Search Input */
.search-input {
    width: 100%;
    padding: 12px 16px;
    background: #2d2d3f;
    border: 1px solid #3d3d5f;
    border-radius: 30px;
    color: white;
    font-size: 14px;
    margin-bottom: 16px;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

/* Song Grid */
.song-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.song-card {
    background: #1a1a2e;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #2d2d3f;
    display: flex;
    cursor: pointer;
}

.song-card:hover {
    border-color: #667eea;
    transform: translateX(5px);
}

.song-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    background: #2d2d3f;
}

.song-info {
    flex: 1;
    padding: 12px;
}

.song-title {
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 4px;
}

.song-creator {
    font-size: 11px;
    color: #888;
    cursor: pointer;
}

.song-creator:hover {
    color: #667eea;
}

.song-stats {
    font-size: 10px;
    color: #667eea;
    margin-top: 4px;
}

.song-actions {
    display: flex;
    align-items: center;
    padding: 0 12px;
}

.edit-song-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: #888;
}

.edit-song-btn:hover {
    background: #2d2d3f;
    color: #667eea;
}

/* Studio Header */
.studio-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.studio-header h2 {
    font-size: 20px;
}

.studio-header p {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

.studio-actions {
    display: flex;
    gap: 12px;
}

.export-btn {
    padding: 8px 16px;
    background: #27ae60;
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.export-btn:hover {
    background: #229954;
    transform: scale(1.02);
}

.back-btn {
    padding: 10px 16px;
    background: #2d2d3f;
    border: none;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
}

/* Transport */
.transport {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.transport button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 40px;
    cursor: pointer;
}

.play-btn {
    background: #27ae60;
    color: white;
}

.pause-btn {
    background: #f39c12;
    color: white;
}

.stop-btn {
    background: #e74c3c;
    color: white;
}

.bpm-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a1a2e;
    padding: 6px 16px;
    border-radius: 40px;
}

.bpm-control input {
    width: 65px;
    padding: 8px;
    background: #2d2d3f;
    border: none;
    border-radius: 8px;
    color: white;
    text-align: center;
}

.bpm-lock {
    font-size: 14px;
    opacity: 0.7;
}

.bpm-lock.unlocked {
    opacity: 1;
    cursor: pointer;
}

.position-display {
    font-family: monospace;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    background: #1a1a2e;
    padding: 12px;
    border-radius: 12px;
    letter-spacing: 2px;
}

/* Track Cards */
.track-card {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid #2d2d3f;
}

.track-card-muted {
    opacity: 0.5;
}

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

.track-name {
    font-weight: bold;
    font-size: 14px;
}

.track-creator {
    font-size: 11px;
    color: #888;
    cursor: pointer;
    margin-top: 4px;
}

.track-creator:hover {
    color: #667eea;
}

.your-track {
    color: #27ae60;
    font-size: 10px;
    margin-left: 6px;
}

.track-votes {
    font-size: 14px;
    font-weight: bold;
    color: #667eea;
}

.track-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.track-controls button {
    padding: 6px 12px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 11px;
}

.mute-btn {
    background: #e74c3c;
    color: white;
}

.unmute-btn {
    background: #27ae60;
    color: white;
}

.vote-btn {
    background: #2d2d3f;
    color: #fff;
}

.delete-btn {
    background: #e74c3c;
    color: white;
}

.volume-slider {
    width: 80px;
    cursor: pointer;
}

.fx-section {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.fx-btn {
    padding: 6px 12px;
    background: #2d2d3f;
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    font-size: 11px;
}

.fx-btn.active {
    background: #667eea;
}

/* Recording Controls */
.record-btn, .upload-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
}

.record-btn {
    background: #e74c3c;
    color: white;
}

.upload-btn {
    background: #3498db;
    color: white;
}

.record-btn.disabled, .upload-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.status {
    margin-top: 12px;
    font-size: 13px;
    text-align: center;
}

/* Comments */
.comments-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #2d2d3f;
}

.comments-section h4 {
    margin-bottom: 12px;
    font-size: 14px;
}

.comments-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.comment {
    background: #2d2d3f;
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.comment strong {
    color: #667eea;
    cursor: pointer;
}

.comment strong:hover {
    text-decoration: underline;
}

.comment small {
    font-size: 10px;
    color: #888;
    display: block;
    margin-top: 4px;
}

.comment-like-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 11px;
    cursor: pointer;
    margin-top: 4px;
}

.comment-like-btn:hover {
    color: #e74c3c;
}

.comment-input-area {
    display: flex;
    gap: 8px;
}

.comment-input-area input {
    flex: 1;
    padding: 10px;
    background: #2d2d3f;
    border: none;
    border-radius: 20px;
    color: white;
}

.comment-input-area input:focus {
    outline: none;
    border: 1px solid #667eea;
}

.comment-input-area button {
    padding: 10px 20px;
    background: #667eea;
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
}

/* Chat */
.chat-container {
    background: #1a1a2e;
    border-radius: 16px;
    overflow: hidden;
    height: calc(100vh - 150px);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 16px;
    border-bottom: 1px solid #2d2d3f;
}

.chat-header h3 {
    margin-bottom: 8px;
}

.chat-search {
    width: 100%;
    padding: 10px;
    background: #2d2d3f;
    border: none;
    border-radius: 20px;
    color: white;
}

.chat-search:focus {
    outline: none;
    border: 1px solid #667eea;
}

.chat-recent {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

/* Chat Section Titles */
.chat-section-title {
    font-size: 12px;
    color: #667eea;
    margin: 12px 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #2d2d3f;
}

.chat-section-title:first-child {
    margin-top: 0;
}

.chat-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #2d2d3f;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-user-item:hover {
    background: #3d3d5f;
    transform: translateX(5px);
}

.chat-user-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #2d2d3f;
}

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

.chat-user-name {
    font-weight: bold;
    font-size: 14px;
}

.chat-preview {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.chat-time {
    font-size: 10px;
    color: #667eea;
}

.chat-conversation {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.conv-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid #2d2d3f;
    background: #1a1a2e;
}

.conv-header button {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 14px;
}

.conv-header span {
    font-weight: bold;
    font-size: 16px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message {
    max-width: 75%;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 14px;
    word-wrap: break-word;
}

.message-sent {
    align-self: flex-end;
    background: #667eea;
    border-bottom-right-radius: 4px;
}

.message-received {
    align-self: flex-start;
    background: #2d2d3f;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}

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

.chat-input input {
    flex: 1;
    padding: 10px;
    background: #2d2d3f;
    border: none;
    border-radius: 20px;
    color: white;
}

.chat-input input:focus {
    outline: none;
    border: 1px solid #667eea;
}

.chat-input button {
    padding: 10px 20px;
    background: #667eea;
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

.chat-input button:hover {
    background: #5a6bd6;
}

/* Profile */
.profile-header {
    text-align: center;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 3px solid #667eea;
    background: #2d2d3f;
}

.profile-bio {
    color: #888;
    font-size: 14px;
    margin: 8px 0;
}

.edit-profile-btn {
    padding: 10px 20px;
    background: #667eea;
    border: none;
    border-radius: 24px;
    color: white;
    cursor: pointer;
    margin: 8px 0;
}

.profile-tracks-section {
    margin-top: 24px;
}

.profile-tracks-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #667eea;
}

.profile-tracks-section h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: #667eea;
}

/* Stats Row */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin: 16px 0;
    padding: 16px;
    border-top: 1px solid #2d2d3f;
    border-bottom: 1px solid #2d2d3f;
    flex-wrap: wrap;
}

.stats-row div {
    text-align: center;
}

.stats-row span {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
}

.stats-row label {
    font-size: 11px;
    color: #888;
}

/* Checkbox Row */
.checkbox-row {
    margin: 16px 0;
    text-align: center;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 13px;
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background: #1a1a2e;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-modal, .close-user-modal, .close-edit-modal {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
}

.close-modal:hover, .close-user-modal:hover, .close-edit-modal:hover {
    color: #e74c3c;
}

.modal-card h3 {
    margin-bottom: 16px;
    text-align: center;
}

.modal-card input, .modal-card select, .modal-card textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    background: #2d2d3f;
    border: none;
    border-radius: 12px;
    color: white;
}

.modal-card input:focus, .modal-card select:focus, .modal-card textarea:focus {
    outline: none;
    border: 1px solid #667eea;
}

/* Thumbnail Preview */
.thumb-preview, .edit-thumb-preview {
    text-align: center;
    margin: 16px 0;
}

.thumb-preview img, .edit-thumb-preview img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 8px;
    background: #2d2d3f;
}

.thumb-buttons, .edit-thumb-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.thumb-buttons button, .edit-thumb-buttons button {
    padding: 6px 12px;
    background: #2d2d3f;
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-size: 12px;
}

.thumb-buttons button:hover, .edit-thumb-buttons button:hover {
    background: #3d3d5f;
}

/* Avatar Section */
.avatar-section {
    text-align: center;
    margin-bottom: 16px;
}

.avatar-section img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 3px solid #667eea;
    background: #2d2d3f;
}

.avatar-section button {
    padding: 8px 16px;
    background: #2d2d3f;
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
}

.avatar-section button:hover {
    background: #3d3d5f;
}

/* Edit Song */
.edit-song-section {
    margin-bottom: 20px;
}

.edit-song-section label {
    display: block;
    margin-bottom: 8px;
    color: #888;
    font-size: 12px;
}

.delete-version-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
}

.delete-version-btn:hover {
    background: #c0392b;
}

/* Export Modal */
.export-options {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.export-option-btn {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.export-option-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.export-progress {
    margin: 20px 0;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #2d2d3f;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Modal Buttons */
.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
}

#confirm-create, #save-profile, #change-avatar, #save-song-changes {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

#cancel-create, #cancel-fork, #cancel-export {
    background: #95a5a6;
    color: white;
}

/* User Modal */
.user-profile-detail {
    text-align: center;
    padding: 20px;
}

.view-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 3px solid #667eea;
    background: #2d2d3f;
}

.view-bio {
    color: #888;
    font-size: 14px;
    margin: 8px 0;
}

.follow-btn, .message-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    margin: 8px 8px;
}

.follow-btn {
    background: #667eea;
    color: white;
}

.follow-btn.following {
    background: #2d2d3f;
    color: #888;
}

.message-btn {
    background: #3498db;
    color: white;
}

.follow-btn:hover, .message-btn:hover {
    transform: scale(1.02);
}

/* Tutorial */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorial-card {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 32px;
    padding: 32px;
    max-width: 400px;
    text-align: center;
    border: 1px solid #667eea;
}

.tutorial-card h2 {
    margin-bottom: 24px;
    color: #667eea;
}

.tutorial-step {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    text-align: left;
    padding: 12px;
    background: #2d2d3f;
    border-radius: 16px;
}

.tutorial-icon {
    font-size: 32px;
}

.tutorial-step p {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.tutorial-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    padding: 14px 28px;
    border-radius: 40px;
    color: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    margin-top: 16px;
}

.tutorial-btn:hover {
    transform: scale(1.02);
}

/* Loading & Toast */
.loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: #fff;
}

.empty-state p {
    margin-bottom: 20px;
}

.empty-state-small {
    text-align: center;
    padding: 20px;
    color: #888;
}

.create-btn-small {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    margin-top: 10px;
}

.recording-hint {
    margin-top: 16px;
    padding: 12px;
    background: #2d2d3f;
    border-radius: 12px;
    font-size: 12px;
    color: #667eea;
}

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 40px;
    font-size: 14px;
    z-index: 1000;
    animation: fadeUp 0.3s ease;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Responsive */
@media (max-width: 480px) {
    .transport button {
        padding: 10px 16px;
        font-size: 14px;
    }
    .position-display {
        font-size: 18px;
    }
    .song-card {
        flex-direction: column;
    }
    .song-thumb {
        width: 100%;
        height: 100px;
    }
    .user-card {
        flex-wrap: wrap;
    }
    .follow-small-btn {
        width: 100%;
        margin-top: 8px;
    }
    .studio-header {
        flex-direction: column;
    }
    .studio-actions {
        width: 100%;
    }
    .export-btn, .back-btn {
        flex: 1;
        text-align: center;
    }
    .username {
        display: none;
    }
    .comment-input-area {
        flex-direction: column;
    }
    .comment-input-area button {
        width: 100%;
    }
    .stats-row {
        gap: 16px;
    }
    .export-options {
        flex-direction: column;
    }
    .recording-panel-top .recording-controls {
        justify-content: center;
    }
    .message {
        max-width: 85%;
    }
}

@media (min-width: 769px) {
    .studio-view {
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 800px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #3d3d5f;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4d4d6f;
}

/* Metronome Control */
.metronome-control {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #2d2d3f;
    display: flex;
    justify-content: center;
}

.metronome-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #ccc;
}

.metronome-toggle input {
    display: none;
}

.metronome-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background-color: #2d2d3f;
    border-radius: 24px;
    transition: all 0.3s;
}

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

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

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

.metronome-label {
    font-size: 13px;
}

/* Metronome beat indicator */
.metronome-beat {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #667eea;
    margin-left: 8px;
    animation: pulse 0.5s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}