:root {
    --bg-color: #0a0a0a;
    --text-color: #ffffff;
    --text-muted: #a0a0a0;
    --accent-color: #ff3366;
    --border-color: #2a2a2a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
    user-select: none; /* Prevent text selection in apps */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.app-container {
    width: 100%;
    max-width: 500px;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    position: relative;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.highlight {
    color: var(--accent-color);
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
}

.icon-btn.small {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.icon-btn.active {
    color: var(--accent-color);
}

.icon-btn.outline {
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.icon-btn:active {
    transform: scale(0.9);
}

.player-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.artwork-container {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 20px 50px rgba(255, 51, 102, 0.2);
}

#appArt {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-info {
    margin-bottom: 2rem;
    width: 100%;
}

#appTrackName {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

#appAlbumName {
    color: var(--accent-color);
    font-weight: 600;
}

.progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    font-variant-numeric: tabular-nums;
    font-size: 0.85rem;
    color: var(--text-muted);
}

#appProgressBar {
    flex: 1;
    accent-color: var(--accent-color);
}

.main-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 2rem;
}

.play-btn {
    background: var(--accent-color);
    border: none;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 20px rgba(255, 51, 102, 0.4);
    transition: transform 0.2s;
}

.play-btn:active {
    transform: scale(0.9);
}

.sub-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0 1rem;
}

#appVolume {
    flex: 1;
    accent-color: white;
}

/* Modals & Community Panel */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000;
}
.modal.hidden { display: none; }
.modal-content {
    background: #111;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--accent);
    width: 90%;
    max-width: 400px;
    position: relative;
}
.close-btn {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
}
.auth-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.auth-form input {
    padding: 0.8rem; border-radius: 4px; border: 1px solid #333; background: #000; color: white;
}
.btn.primary-btn {
    background: var(--accent); color: white; border: none; padding: 0.8rem; border-radius: 4px; font-weight: bold;
}
.community-panel {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #0a0a0a;
    z-index: 500;
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}
.community-panel.closed {
    transform: translateY(100%);
}
.panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem; background: #111; border-bottom: 1px solid #333;
}
.form-input {
    background: #000; border: 1px solid #333; color: white; padding: 0.8rem; border-radius: 4px; font-family: inherit;
}
.comment-card {
    background: rgba(255,255,255,0.05); padding: 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid #333;
}
.comment-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.comment-user { font-weight: bold; color: var(--accent); }
.like-btn { background: transparent; border: 1px solid #555; color: white; padding: 0.3rem 0.6rem; border-radius: 20px; cursor: pointer; }
.like-btn.liked { border-color: var(--accent); }
