:root {
    --primary-color: #007aff;
    --secondary-color: #34c759;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --border-color: #e5e5ea;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

.container {
    max-width: 428px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 100px;
}

.header {
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b9d, #c44569, #f8b500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 8px 20px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.album-art-container {
    perspective: 1000px;
    margin-bottom: 20px;
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visualizer-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(255, 107, 157, 0.3);
    transition: all 0.1s ease-out;
}

.ring-1 {
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

.ring-2 {
    width: 110%;
    height: 110%;
    opacity: 0.4;
}

.ring-3 {
    width: 120%;
    height: 120%;
    opacity: 0.2;
}

.album-art {
    width: 280px;
    height: 280px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: float 6s ease-in-out infinite;
    z-index: 1;
}

.album-glow {
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 107, 157, 0.3), transparent 50%);
    animation: pulse 3s ease-in-out infinite;
    transition: all 0.15s ease-out;
}

.album-glow.active {
    animation: glowPulse 0.5s ease-out infinite;
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotateY(0deg); }
    50% { transform: translateY(-10px) rotateY(5deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

@keyframes barWave {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

.visualizer-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    height: 40px;
    width: 200px;
    margin-top: 15px;
}

.bar {
    width: 8px;
    height: 40px;
    background: linear-gradient(to top, #ff6b9d, #c44569);
    border-radius: 4px;
    transform-origin: bottom;
    transition: height 0.1s ease-out;
    min-height: 4px;
}

.now-playing {
    text-align: center;
}

.song-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
    color: white;
}

.song-artist {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.progress-section {
    margin-bottom: 30px;
}

.progress-bar {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    overflow: visible;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b9d, #c44569);
    border-radius: 3px;
    transition: width 0.1s linear;
}

.progress-dot {
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: left 0.1s linear;
    opacity: 0;
}

.progress-bar:hover .progress-dot {
    opacity: 1;
}

.time-display {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.controls-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
}

.control-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.control-btn.active {
    color: #ff6b9d;
}

.control-btn svg {
    width: 22px;
    height: 22px;
}

.play-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(255, 107, 157, 0.4);
    transition: all 0.3s ease;
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(255, 107, 157, 0.5);
}

.play-btn svg {
    width: 30px;
    height: 30px;
    margin-left: 3px;
}

.play-btn.paused svg {
    margin-left: 0;
}

.play-btn.paused svg path {
    d: path('M6 19h4V5H6v14zm8-14v14h4V5h-4z');
}

.playlist-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.song-count {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.playlist {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.song-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
}

.song-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.song-item.active {
    background: rgba(255, 107, 157, 0.2);
}

.song-item .song-number {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    margin-right: 12px;
}

.song-item.active .song-number {
    background: linear-gradient(135deg, #ff6b9d, #c44569);
}

.song-item.playing .song-number {
    animation: pulse 1.5s ease-in-out infinite;
}

.song-item img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
}

.song-info {
    flex: 1;
    min-width: 0;
}

.song-info h3 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-info p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.password-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.password-modal.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(180deg, #2a2a4a 0%, #1a1a2e 100%);
    border-radius: 24px;
    width: 90%;
    max-width: 360px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 24px;
}

.modal-body input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.modal-body input:focus {
    border-color: #ff6b9d;
    background: rgba(255, 255, 255, 0.08);
}

.modal-body input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.error-message {
    color: #ff3b30;
    font-size: 13px;
    margin-top: 12px;
    display: none;
}

.error-message.show {
    display: block;
}

.modal-footer {
    padding: 0 24px 24px;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(255, 107, 157, 0.4);
}

.admin-panel {
    display: none;
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    z-index: 999;
    padding: 20px;
    padding-bottom: 100px;
    overflow-y: auto;
}

.admin-panel.show {
    display: block;
}

.admin-panel .back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.admin-panel .back-btn:hover {
    color: #ff6b9d;
}

.admin-panel h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.add-song-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.add-song-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.url-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 14px;
    outline: none;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.url-input:focus {
    border-color: #ff6b9d;
}

.url-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.add-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #007aff, #34c759);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(52, 199, 89, 0.3);
}

.add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.preview-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    display: none;
}

.preview-card.show {
    display: block;
}

.preview-card img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 12px;
}

.preview-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.preview-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.success-message {
    background: rgba(52, 199, 89, 0.2);
    border: 1px solid rgba(52, 199, 89, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    color: #34c759;
    font-size: 14px;
    margin-top: 12px;
    display: none;
}

.success-message.show {
    display: block;
}

.manage-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.manage-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.manage-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.manage-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.manage-item img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
}

.manage-item .info {
    flex: 1;
    min-width: 0;
}

.manage-item .info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.manage-item .info p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.manage-item .delete-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 59, 48, 0.2);
    color: #ff3b30;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.manage-item .delete-btn:hover {
    background: rgba(255, 59, 48, 0.3);
    transform: scale(1.1);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-state p {
    margin-bottom: 8px;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

@media (max-width: 428px) {
    .container {
        padding: 15px;
    }

    .album-art {
        width: 240px;
        height: 240px;
    }

    .controls-section {
        gap: 16px;
    }

    .control-btn {
        width: 42px;
        height: 42px;
    }

    .play-btn {
        width: 64px;
        height: 64px;
    }
}
