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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
}

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

.search-bar {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s;
}

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

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-result-item:hover {
    background: #f9f9f9;
}

.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;
}

/* Navigation */
.nav-tabs {
    background: white;
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-tab {
    padding: 10px 20px;
    background: #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-tab:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

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

/* Content */
.content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    min-height: 500px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* Filters */
.filters {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.filters select, .filters input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

/* Beat Grid */
.beats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.beat-card {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.beat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.beat-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.beat-info {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.beat-stats {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    font-size: 12px;
    color: #999;
}

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

.tag {
    background: #e0e0e0;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    color: #666;
}

audio {
    width: 100%;
    margin: 10px 0;
    border-radius: 8px;
}

/* Feed Items */
.feed-item {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
    cursor: pointer;
}

.feed-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.feed-avatar {
    width: 50px;
    height: 50px;
    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: 18px;
}

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

.feed-username {
    font-weight: bold;
    font-size: 16px;
}

.feed-time {
    font-size: 12px;
    color: #999;
}

.feed-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 10px;
}

.badge-beat {
    background: #4CAF50;
    color: white;
}

.badge-recording {
    background: #2196F3;
    color: white;
}

/* Track Container - 8-Track DAW */
.track-container {
    margin-top: 20px;
    background: #1a1a1a;
    border-radius: 10px;
    padding: 20px;
}

.track {
    background: #2a2a2a;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 15px;
    transition: all 0.3s;
}

.track:hover {
    background: #333;
}

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

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

.track-name {
    font-size: 16px;
    font-weight: bold;
    color: white;
    flex: 1;
}

.track-name-input {
    background: #444;
    color: white;
    border: 1px solid #667eea;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    width: 200px;
}

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

.track-btn {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 5px;
    cursor: pointer;
    border: none;
}

.track-record {
    background: #f44336;
    color: white;
}

.track-record:hover {
    background: #d32f2f;
}

.track-clear {
    background: #ff9800;
    color: white;
}

.track-clear:hover {
    background: #f57c00;
}

.track-solo {
    background: #4CAF50;
    color: white;
}

.track-mute {
    background: #9e9e9e;
    color: white;
}

.track-waveform {
    height: 60px;
    background: #1a1a1a;
    border-radius: 5px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.track-waveform:hover {
    background: #222;
}

.track-waveform canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

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

.track-volume input {
    width: 100px;
    margin: 0;
}

/* Studio Controls */
.studio-controls {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.studio-selector {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* DAW Controls */
.daw-controls {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.daw-controls button {
    margin: 5px;
}

/* Recording items */
.recording-item {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

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

.recording-title {
    font-size: 16px;
    font-weight: bold;
}

.recording-rating {
    color: #ffd700;
    font-weight: bold;
}

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

.vote-select {
    padding: 5px;
    border-radius: 5px;
}

.vote-btn {
    background: #ffd700;
    color: #333;
    padding: 5px 15px;
    font-size: 12px;
}

.download-btn {
    background: #4CAF50;
    color: white;
    padding: 8px 15px;
    font-size: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.download-btn:hover {
    background: #45a049;
}

/* Profile Page */
.profile-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

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

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}

.profile-stats {
    display: flex;
    gap: 20px;
    margin: 15px 0;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 12px;
    color: #666;
}

.follow-btn {
    background: #2196F3;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
}

.follow-btn:hover {
    background: #1976D2;
}

/* Leaderboard */
.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.3s;
    cursor: pointer;
}

.leaderboard-item:hover {
    background: #f9f9f9;
}

.leaderboard-rank {
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
    width: 50px;
}

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

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

.leaderboard-stats {
    text-align: right;
}

/* Buttons */
button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #ff4757;
    color: white;
}

.btn-danger:hover {
    background: #ff3838;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

/* Forms */
input, select, textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
}

.upload-form {
    max-width: 500px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .beats-grid {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
    }
    
    .search-bar {
        max-width: 100%;
    }
    
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .feed-header {
        flex-wrap: wrap;
    }
    
    .track-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .track-name-input {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.beat-card, .feed-item, .leaderboard-item, .track {
    animation: fadeIn 0.5s ease-out;
}

/* Recording indicator */
@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

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

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Volume Slider */
input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

/* Meter */
.volume-meter {
    width: 100%;
    height: 4px;
    background: #444;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 5px;
}

.volume-level {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #ff9800, #f44336);
    width: 0%;
    transition: width 0.05s;
}

/* Profile bio */
.profile-bio {
    margin: 15px 0;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 8px;
    color: #666;
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}