@import url('https://fonts.googleapis.com/css2?family=Lucida+Grande:wght@400;700&display=swap');

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

body {
    font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background: #c0c0c0;
    color: #333;
}

/* Brushed Metal Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.03) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 0, 0, 0.03) 3px
        ),
        linear-gradient(135deg, #d0d0d0 0%, #b8b8b8 50%, #d0d0d0 100%);
    z-index: -1;
}

/* iTunes Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image: url('img/cat.jpg');
    background-repeat: repeat;
    background-size: auto;
    opacity: 0.1;
}

.stars, .stars2, .stars3 {
    display: none;
}

/* Marquee Banner - iTunes Style */
.marquee-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(180deg, #e8e8e8 0%, #d0d0d0 100%);
    z-index: 100;
    overflow: hidden;
    border-bottom: 1px solid #999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.marquee-text {
    color: #333;
    font-weight: normal;
    font-size: 12px;
    white-space: nowrap;
    animation: marqueeScroll 15s linear infinite;
    line-height: 30px;
}

@keyframes marqueeScroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Container */
.container {
    position: relative;
    z-index: 1000;
    padding: 40px 20px 20px;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(180deg, #e8e8e8 0%, #d0d0d0 100%);
    border-radius: 8px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #999;
}

h1 {
    font-size: 24px;
    color: #333;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
    font-weight: normal;
    letter-spacing: 0.5px;
}

/* Window - iTunes Brushed Metal Style */
.window {
    width: 100%;
    background: linear-gradient(180deg, #e8e8e8 0%, #d0d0d0 100%);
    border-radius: 8px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-size: 12px;
    border: 1px solid #999;
}

/* Titlebar - iTunes Style */
.titlebar {
    height: 22px;
    background: linear-gradient(180deg, #e8e8e8 0%, #d0d0d0 100%);
    border-bottom: 1px solid #999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 8px;
    color: #333;
    font-weight: normal;
    font-size: 11px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.titlebar-left {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.titlebar-icon {
    font-size: 12px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
}

.titlebar-text {
    font-weight: normal;
    opacity: 0.9;
}

/* Window Content */
.window-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    padding: 10px;
    gap: 10px;
}

/* Player Section */
.player-section {
    background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 4px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid #ccc;
}

.now-playing-box {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 6px;
    background: linear-gradient(180deg, #fff 0%, #f0f0f0 100%);
    border-radius: 4px;
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid #ccc;
}

.album-art-frame {
    width: 70px;
    height: 70px;
    border-radius: 3px;
    background: #000;
    padding: 2px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.album-art {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #666 0%, #888 50%, #666 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}

.album-art-placeholder {
    font-size: 48px;
    color: #999;
    opacity: 0.5;
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
}

.track-info-box {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    padding: 0;
}

.track-label {
    font-size: 8px;
    font-weight: normal;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.track-name {
    font-size: 13px;
    font-weight: normal;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 10px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: normal;
}

/* Controls Section */
.controls-section {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.control-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.control-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #999;
    background: linear-gradient(180deg, #f5f5f5 0%, #d5d5d5 100%);
    color: #333;
    cursor: pointer;
    font-size: 14px;
    font-weight: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 3px;
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.1s ease;
    position: relative;
    text-indent: -9999px; /* Hide text, use CSS icons */
    overflow: hidden;
}

.control-btn:hover {
    background: linear-gradient(180deg, #fff 0%, #e5e5e5 100%);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.control-btn:active {
    background: linear-gradient(180deg, #d5d5d5 0%, #c0c0c0 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(1px);
}

.play-btn {
    width: 38px;
    height: 38px;
    background: linear-gradient(180deg, #4a90e2 0%, #357abd 100%);
    border: 1px solid #357abd;
    color: #fff;
    font-size: 16px;
    box-shadow: 
        0 2px 4px rgba(74, 144, 226, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    text-indent: -9999px; /* Hide text, use CSS icons */
    overflow: hidden;
}

/* CSS-based pause icon - thinner bars */
.play-btn.playing::before,
.play-btn.playing::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 12px;
    background: #fff;
    border-radius: 1px;
}

.play-btn.playing::before {
    margin-left: -4px;
}

.play-btn.playing::after {
    margin-left: 4px;
}

/* Play icon - thinner triangle, centered */
.play-btn:not(.playing)::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 9px solid #fff;
    margin-left: 0;
}

/* Previous button - thinner left arrows, centered as a pair */
.prev-btn::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-right: 7px solid #333;
    margin-left: -2.5px;
}

.prev-btn::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-right: 7px solid #333;
    margin-left: 2.5px;
}

/* Next button - thinner right arrows, centered as a pair */
.next-btn::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 7px solid #333;
    margin-left: -2.5px;
}

.next-btn::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 7px solid #333;
    margin-left: 2.5px;
}

/* Stop button - smaller square, centered */
.stop-btn::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #333;
    border-radius: 1px;
    margin-left: 0;
}

.play-btn:hover {
    background: linear-gradient(180deg, #5aa0f2 0%, #458acd 100%);
    box-shadow: 
        0 4px 10px rgba(74, 144, 226, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.play-btn:active {
    background: linear-gradient(180deg, #357abd 0%, #2560ad 100%);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Progress Section */
.progress-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 180px;
}

.time-display-left,
.time-display-right {
    font-size: 9px;
    font-weight: normal;
    color: #666;
    font-family: 'Lucida Grande', sans-serif;
    background: transparent;
    white-space: nowrap;
    min-width: 32px;
}

.progress-bar-frame {
    flex: 1;
    border: 1px solid #999;
    background: #ccc;
    padding: 0;
    height: 6px;
    border-radius: 3px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.progress-bar {
    width: 100%;
    height: 100%;
    background: #ccc;
    cursor: pointer;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(180deg, #4a90e2 0%, #357abd 100%);
    width: 0%;
    transition: width 0.1s;
    border-radius: 3px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Volume Section */
.volume-section {
    display: flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    padding: 0;
}

.volume-label {
    font-size: 10px;
    font-weight: normal;
    color: #666;
    font-family: 'Lucida Grande', sans-serif;
}

.volume-slider-frame {
    width: 80px;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

.volume-slider {
    width: 100%;
    height: 16px;
    -webkit-appearance: none;
    appearance: none;
    background: #e0e0e0;
    outline: none;
    cursor: pointer;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}

.volume-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 16px;
    background: #e0e0e0;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border: 1px solid #999;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    margin-top: -1px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: linear-gradient(135deg, #fff 0%, #e5e5e5 100%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.volume-slider::-moz-range-track {
    width: 100%;
    height: 16px;
    background: #e0e0e0;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border: 1px solid #999;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    -moz-tap-highlight-color: transparent;
}

.volume-slider::-moz-range-thumb:hover {
    background: linear-gradient(135deg, #fff 0%, #e5e5e5 100%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.volume-value {
    font-size: 10px;
    color: #666;
    font-weight: normal;
    font-family: 'Lucida Grande', sans-serif;
    min-width: 32px;
    text-align: right;
}

/* Playlist Section */
.playlist-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(180deg, #fff 0%, #f5f5f5 100%);
    border-radius: 4px;
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid #ccc;
}

.playlist-header {
    padding: 6px 10px;
    border-bottom: 1px solid #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 4px 4px 0 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.playlist-title {
    font-size: 12px;
    font-weight: normal;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.playlist-stats {
    font-size: 10px;
    color: #666;
    font-weight: normal;
    font-family: 'Lucida Grande', sans-serif;
    background: transparent;
    padding: 0;
}

.playlist-box {
    flex: 1;
    overflow-y: auto;
    padding: 4px;
    background: #fff;
}

.playlist-box::-webkit-scrollbar {
    width: 12px;
}

.playlist-box::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 6px;
}

.playlist-box::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ccc 0%, #bbb 100%);
    border-radius: 6px;
    border: 2px solid #f5f5f5;
}

.playlist-box::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #bbb 0%, #aaa 100%);
}

.empty-playlist {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    padding: 40px;
    text-align: center;
}

.empty-text {
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 8px;
    color: #666;
}

.empty-subtext {
    font-size: 11px;
    color: #999;
}

.playlist-item {
    padding: 8px 10px;
    margin-bottom: 2px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    gap: 10px;
    align-items: center;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.playlist-item:hover {
    background: rgba(0, 113, 227, 0.1);
}

.playlist-item.active {
    background: linear-gradient(180deg, rgba(74, 144, 226, 0.2) 0%, rgba(74, 144, 226, 0.15) 100%);
    color: #000;
    font-weight: normal;
}

.playlist-item-art,
.playlist-item-art-placeholder {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 3px;
    object-fit: cover;
    background: linear-gradient(135deg, #666 0%, #888 50%, #666 100%);
    border: 1px solid #ccc;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.playlist-item-art-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #999;
    opacity: 0.5;
}

.playlist-item-art-placeholder::before {
    content: '♪';
}

.playlist-item-info {
    flex: 1;
    min-width: 0;
}

.playlist-item-name {
    font-weight: normal;
    font-size: 12px;
    color: #000;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item.active .playlist-item-name {
    color: #4a90e2;
    font-weight: 500;
}

.playlist-item-details {
    font-size: 11px;
    color: #666;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer */
.footer {
    text-align: center;
    padding: 10px 15px;
    background: linear-gradient(180deg, #e8e8e8 0%, #d0d0d0 100%);
    border-radius: 4px;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #999;
}

.copyright {
    font-size: 12px;
    color: #333;
    font-family: 'Lucida Grande', sans-serif;
    margin-bottom: 4px;
    font-weight: normal;
}

.footer-note {
    font-size: 10px;
    color: #666;
    font-family: 'Lucida Grande', sans-serif;
    font-style: italic;
    opacity: 0.8;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-link {
    color: #333;
    text-decoration: none;
    font-weight: normal;
    margin: 0 10px;
    font-size: 13px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.footer-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.copyright {
    font-size: 10px;
    color: #666;
    margin-bottom: 8px;
    font-family: 'Lucida Grande', sans-serif;
}

.webring {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

.webring a {
    color: #333;
    text-decoration: none;
    opacity: 0.8;
}

.webring a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Guestbook Styles */
.guestbook-section {
    padding: 0;
}

.guestbook-iframe-container {
    width: 100%;
    background: linear-gradient(180deg, #fff 0%, #f5f5f5 100%);
    border-radius: 4px;
    border: 1px solid #ccc;
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 8px;
}

.guestbook-iframe {
    width: 100%;
    height: 450px;
    border: none;
    display: block;
    border-radius: 3px;
}

.entries-list {
    width: 100%;
    min-height: 400px;
}

.empty-entries {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 12px;
}

.entry-item {
    padding: 8px;
    margin-bottom: 8px;
    background: linear-gradient(180deg, #fff 0%, #f9f9f9 100%);
    border: 1px solid #ddd;
    border-radius: 3px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.entry-name {
    font-size: 13px;
    font-weight: bold;
    color: #4a90e2;
}

.entry-date {
    font-size: 10px;
    color: #999;
    font-family: 'Lucida Grande', sans-serif;
}

.entry-message {
    font-size: 12px;
    color: #333;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.entries-list::-webkit-scrollbar {
    width: 12px;
}

.entries-list::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 6px;
}

.entries-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ccc 0%, #bbb 100%);
    border-radius: 6px;
    border: 2px solid #f5f5f5;
}

.entries-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #bbb 0%, #aaa 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 60px 10px 10px;
    }

    h1 {
        font-size: 18px;
    }

    .window {
        margin-bottom: 15px;
    }

    .now-playing-box {
        flex-direction: column;
        text-align: center;
    }

    .album-art-frame {
        width: 90px;
        height: 90px;
    }

    /* Mobile layout: controls centered, progress bar below */
    .controls-section {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        justify-content: center;
    }

    .control-buttons {
        order: 1;
        flex-shrink: 0;
    }

    .volume-section {
        order: 2;
        display: none; /* Hide volume slider on mobile */
    }

    .progress-section {
        order: 3;
        width: 100%;
        min-width: 100%;
        flex-basis: 100%;
    }

    /* Make volume slider more touch-friendly on mobile */
    .volume-slider {
        height: 20px;
        min-height: 44px; /* iOS touch target minimum */
    }

    .volume-slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }

    .volume-slider::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }

    .volume-slider-frame {
        width: 100px;
        min-width: 100px;
    }

}
