/* Font settings */
@font-face {
    font-family: 'Macintosh Regular';
    src: url('fonts/macintosh-regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Font settings for pixelated effect */
.pixel-text {
    font-family: 'Macintosh Regular', 'Monaco', 'Lucida Console', 'Courier New', monospace; /* Use retro fonts */
    font-size: 14px; /* Adjust size for better pixelation */
    line-height: .69; /* Keep the lines close together */
    letter-spacing: 0px; /* Slight spacing to mimic pixelated UI */
    transform: scale(1); /* Slightly scales the text to appear thicker */
    color: #333; /* Dark gray for readability */
    /* text-transform: uppercase; /* Optional: makes text look like an old UI */
}

/* Disable font smoothing for pixelation */
.pixel-text {
    -webkit-font-smoothing: none; /* Disable WebKit anti-aliasing */
    -moz-osx-font-smoothing: grayscale; /* Disable macOS font smoothing */
    font-smooth: never; /* General font-smoothing property */
}

/* Reset body styles */
body {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #dadace; /* Light gray background */
    font-family: 'Macintosh Regular', sans-serif;
}

/* iPod Screen */
.ipod-screen {
    width: 300px; /* Fixed width */
    height: 240px; /* Fixed height */
    background-color: #BDBDBD; /* iPod screen color */
    border: 2px solid #000; /* Black border around screen */
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 15px; /* Rounded corners */
    display: flex;
    flex-direction: column; /* Stack elements vertically */
    justify-content: flex-start; /* Spread content evenly */
    align-items: center;
    overflow: hidden; /* Prevent content overflow */
    position: relative; /* For absolute positioning inside */
}

.ipod-body {
    box-sizing: border-box;
    width: 430px;
    height: 711px;
    padding-top: 27px;
    /* More glossy gradient with multiple layers */
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, transparent 50%),
        linear-gradient(225deg, rgba(255, 255, 255, 0.2) 0%, transparent 30%),
        linear-gradient(180deg, #E8E8E8, #E0E0E0); /* Lighter bottom */
    border-radius: 30px;
    /* Gradient border effect - darker inside, lighter outside */
    border: 3px solid transparent;
    background-clip: padding-box;
    box-shadow: 
        /* Inner dark shadow for depth */
        inset 0 0 0 1px rgba(0, 0, 0, 0.4),
        inset 0 0 0 2px rgba(0, 0, 0, 0.2),
        /* Outer lighter border */
        0 0 0 1px rgba(255, 255, 255, 0.3),
        0 0 0 2px rgba(0, 0, 0, 0.15),
        /* Glossy highlights */
        inset 0 1px 3px rgba(255, 255, 255, 0.8),
        inset 0 10px 20px rgba(255, 255, 255, 0.3),
        /* Corner shine highlights */
        0 2px 8px rgba(255, 255, 255, 0.4),
        /* Main drop shadow */
        0 6px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Add corner shine effect */
.ipod-body::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 33px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(255, 255, 255, 0.4) 15%, 
        transparent 30%, 
        transparent 70%, 
        rgba(255, 255, 255, 0.2) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Add secondary glossy highlight */
.ipod-body::after {
    content: '';
    position: absolute;
    top: 300px; /* Moved below the screen area */
    left: 50px;
    width: 50%;
    height: 30%;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        transparent 100%);
    z-index: 0;
    pointer-events: none;
}

.menu {
    list-style: none;
    font-size: 14px;
    color: #333;
}

.menu li {
    margin: 5px 0;
}

.menu .active {
    background: #444;
    color: #fff;
    padding: 2px 5px;
    border-radius: 5px;
}

/* Click Wheel */
.click-wheel {
    margin-top: 74px; 
    position: relative;
    width: 284px;
    height: 284px;
    /* Glossy gradient background */
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 50%),
        linear-gradient(145deg, #F5F5F5, #E8E8E8);
    border-radius: 50%;
    border: .2px solid #333;
    box-shadow: 
        inset 0 2px 5px rgba(0, 0, 0, 0.2),
        inset 0 -2px 3px rgba(255, 255, 255, 0.6),
        0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: grab;
    transition: transform 0.1s ease;
    user-select: none;
}

.click-wheel:active {
    cursor: grabbing;
}

.ipod-buttons {
    position: relative;
    width: 200px; /* Outer ring size */
    height: 200px;
    margin: 0 auto;
    border-radius: 50%; /* Full circle */
    background: #f9f9f9;
}

.button {
    position: absolute;
    width: 100px;
    height: 30px;
    background: #ddd;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.button:hover {
    background: #ccc;
}

/* Positioning buttons */
.button.center {
    width: 100px;
    height: 100px;
    /* Glossy center button gradient */
    background: 
        radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.8) 0%, transparent 40%),
        linear-gradient(145deg, #FFFFFF, #F0F0F0);
    border-radius: 50%;
    border: 1px solid #999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 
        inset 0 2px 5px rgba(0, 0, 0, 0.1),
        inset 0 -1px 2px rgba(255, 255, 255, 0.9),
        0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.1s ease;
    /* Prevent flash by ensuring immediate styling */
    display: block;
    position: absolute;
}

.button.center:hover {
    background: 
        radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.6) 0%, transparent 40%),
        linear-gradient(145deg, #F8F8F8, #E8E8E8);
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.15),
        inset 0 -1px 2px rgba(255, 255, 255, 0.8),
        0 1px 3px rgba(0, 0, 0, 0.25);
}

.button.center:active {
    background: 
        radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.4) 0%, transparent 40%),
        linear-gradient(145deg, #E8E8E8, #D8D8D8);
    box-shadow: 
        inset 0 3px 8px rgba(0, 0, 0, 0.3),
        inset 0 -1px 1px rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%) scale(0.98);
}

/* Top Section (Battery and Title) */
.ipod-top {
    width: 100%;
    padding: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #2F302C; /* Add a subtle separation line */
}

.ipod-top-middle {
    flex-grow: 1; /* Make the middle section take up remaining space */
    display: flex;
    justify-content: center; /* Horizontally center the text */
    align-items: center; /* Vertically center the text */
    text-align: center; /* Ensure text is centered */
    padding-left: 45px;
}

.ipod-top-middle-text {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0; /* Remove margin to ensure perfect centering */
}

.battery {
    width: 40px;
    height: auto; /* Maintain aspect ratio */
    margin-right: 10px; /* Spacing from the edge */
}

/* Main Content Section */
.screen-content {
    flex: 1; /* Take up all available space */
    width: 90%; /* Center content with padding */
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    font-size: 16px;
    color: #333;
    padding: 10px; /* Prevent text from touching edges */
    background-color: #FFF; /* White content area */
}

/* Menu list */
.menu {
    list-style: none;
    padding: 0;
    margin: 5px 0;
    width: 100%;
    text-align: left;
    font-weight: normal;
}

.menu li {
    font-size: 16px;
    padding: 8px 10px;
    color: #333; /* Dark gray for inactive items */
    cursor: pointer;
}

.menu li::after {
    content: '>'; /* Unicode for right-facing arrow */
    font-size: 16px; /* Match the text size */
    font-weight: bold;
    color: #000; /* Arrow color */
    position: absolute;
    right: 15px; /* Moved arrow closer to center */
    padding-right: 0; /* Removed extra padding */
}

/* Highlighted (selected) menu item */
.menu .selected {
    background-color: #333; /* Dark grey background */
    color: #BDBDBD; /* Same color as screen background - like pixels turned off */
    font-weight: normal;
    border-radius: 3px;
    margin: 2px 5px; /* Reduced side margins */
    padding: 6px 10px; /* Increased horizontal padding */
    /* Removed transition to prevent text jitter */
}

.menu .selected::after {
    color: #BDBDBD; /* Same color as screen background for the arrow */
}

/* Footer Section */
.footer {
    width: 100%;
    padding: 10px;
    font-size: 12px;
    color: #666;
    text-align: center;
    background-color: #BDBDBD; /* Match iPod screen color */
    border-top: 2px solid #333; /* Add a subtle separation line */
}

/* Now Playing Styles */
.now-playing-content {
    flex: 1;
    width: 90%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px 20px;
    text-align: center;
}

.track-info {
    margin-bottom: 20px;
    width: 100%;
}

.track-number {
    font-size: 11px;
    margin-bottom: 15px;
    text-align: right;
}

.song-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
}

.artist-name {
    font-size: 14px;
    margin-bottom: 8px;
}

.album-name {
    font-size: 12px;
    margin-bottom: 20px;
}

/* Progress Bar */
.progress-container {
    margin: 20px 0;
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: #999;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    width: 35%; /* Represents current progress */
    height: 100%;
    background-color: #333;
    border-radius: 2px;
}

/* Time Display */
.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin: 15px 0;
    width: 100%;
}

.current-time {
    font-weight: bold;
}

.remaining-time {
    font-weight: bold;
}

/* Back Button */
.back-button {
    margin-top: 15px;
    font-size: 14px;
}

.back-button.selected {
    background-color: #333;
    color: #BDBDBD;
    font-weight: bold;
    border-radius: 3px;
    margin: 2px 5px;
    padding: 6px 20px;
}

.back-button.selected a {
    color: #BDBDBD !important;
}

/* Preview Page Styles */
.preview-content {
    flex: 1;
    width: 90%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 10px 15px;
    overflow-y: auto;
}

.profile-section {
    text-align: center;
    margin-bottom: 15px;
}

.profile-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 4px;
}

.profile-title {
    font-size: 12px;
    margin-bottom: 2px;
}

.profile-location {
    font-size: 11px;
    margin-bottom: 10px;
}

.divider {
    width: 100%;
    height: 1px;
    background-color: #999;
    margin: 10px 0;
}

.info-section {
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 10px;
    padding: 2px 5px;
    line-height: 1.3; /* Add proper line spacing for wrapped text */
    align-items: flex-start; /* Align items to top to handle multi-line content */
}

.info-item .label {
    font-weight: normal;
    line-height: 1.3; /* Add proper line spacing for wrapped text */
}

.info-item .value {
    text-align: right;
    max-width: 60%;
    line-height: 1.3; /* Ensure proper line spacing for wrapped text */
}