/* iOS 10 Safari & Modern Browser Optimized Stylesheet */

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

html, body {
    background-color: #121212;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.4;
    padding: 12px 10px;
    max-width: 480px;
    min-height: 100vh;
    width: 100%;
    margin: 0 auto;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: start;
    -webkit-justify-content: flex-start;
    justify-content: flex-start;
}

#app {
    display: block;
    width: 100%;
}

/* Header & Search */
.header {
    margin-bottom: 15px;
    width: 100%;
}

.search-box {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    width: 100%;
    height: 44px;
}

.search-box input {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
    height: 44px;
    background-color: #1c1c1e;
    border: 1px solid #2c2c2e;
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: #ffffff;
    padding: 0 12px;
    font-size: 15px;
    outline: none;
    -webkit-appearance: none;
}

.search-box button {
    height: 44px;
    background-color: #ffcc00;
    color: #000000;
    border: none;
    border-radius: 0 10px 10px 0;
    padding: 0 16px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    line-height: 44px;
    -webkit-appearance: none;
}

/* My Wave Button */
.wave-box {
    margin-top: 10px;
    width: 100%;
}

.wave-btn {
    width: 100%;
    height: 46px;
    background: #ffcc00;
    background: -webkit-linear-gradient(135deg, #007aff, #af52de, #ff2d55);
    background: linear-gradient(135deg, #007aff, #af52de, #ff2d55);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 46px;
    text-align: center;
    -webkit-appearance: none;
}

/* Player Card */
.player-card {
    background-color: #1c1c1e;
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #2c2c2e;
}

.cover-wrapper {
    width: 200px;
    height: 200px;
    margin: 0 auto 16px auto;
    border-radius: 14px;
    overflow: hidden;
    background-color: #2c2c2e;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.cover-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.track-info {
    margin-bottom: 16px;
    padding: 0 10px;
}

.track-info .title {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-info .artist {
    font-size: 14px;
    color: #8e8e93;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Progress Section */
.progress-section {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    margin-bottom: 18px;
    height: 24px;
}

.progress-section .time {
    font-size: 12px;
    color: #8e8e93;
    width: 40px;
    text-align: center;
}

.progress-section input[type="range"] {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    margin: 0 10px;
    -webkit-appearance: none;
    appearance: none;
    background: #3a3a3c;
    height: 6px;
    border-radius: 3px;
    outline: none;
}

.progress-section input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffcc00;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Controls - Centered without margins */
.controls {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
}

.btn {
    border: none;
    border-radius: 50%;
    cursor: pointer;
    outline: none;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    padding: 0;
    margin: 0;
    -webkit-appearance: none;
}

.btn svg {
    display: block;
    margin: 0 auto;
    pointer-events: none;
}

.btn-primary {
    width: 56px;
    height: 56px;
    background-color: #ffcc00;
    color: #000000;
    margin: 0 20px;
}

.btn-secondary {
    width: 44px;
    height: 44px;
    background-color: #2c2c2e;
    color: #ffffff;
}

/* Playlist Section */
.playlist-section {
    margin-top: 20px;
}

.playlist-section h2 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #8e8e93;
    padding-left: 4px;
}

.track-list {
    background-color: #1c1c1e;
    border-radius: 14px;
    border: 1px solid #2c2c2e;
    overflow: hidden;
}

.track-item {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #2c2c2e;
    cursor: pointer;
    min-height: 56px;
}

.track-item:last-child {
    border-bottom: none;
}

.track-item.active {
    background-color: #2c2c2e;
}

.track-item .item-cover {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    margin-right: 12px;
    background-color: #2c2c2e;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    object-fit: cover;
}

.track-item .item-details {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.track-item .item-title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-item .item-title.active-text {
    color: #ffcc00;
}

.track-item .item-artist {
    font-size: 13px;
    color: #8e8e93;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loading {
    padding: 24px;
    text-align: center;
    color: #8e8e93;
    font-size: 14px;
}
