/* =================================================================== */
/* --- THEME COLOR VARIABLES (YIN & YANG) --- */
/* =================================================================== */
:root {
    /* Yin (Light) Mode Colors */
    --bg-color: #1a1a1a;
    --bg-image: url('https://images.unsplash.com/photo-1588345921523-c2dcdb7f1dcd?q=80&w=2070&auto-format&fit=crop');
    --text-color: #070707;
    --text-color-light: #333;
    --text-secondary: #555;
    --card-bg: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --nav-bg: rgba(10, 10, 10, 0.8);
    --nav-text: white;
    --nav-active-bg: white;
    --nav-active-text: black;
    --primary-button-bg: #1a1a1a;
    --primary-button-text: white;
    --primary-button-hover-bg: white;
    --primary-button-hover-text: #1a1a1a;
    --footer-bg: #0a0a0a;
    --footer-text: #ccc;
    --border-color: #eee;
    --modal-bg: #fefefe;
    --modal-text: #1a1a1a;
    --input-bg: white;
    --input-border: #ccc;
    --input-text: #333;
    --record-border: #1a1a1a;
    --player-control-color: #1d1d1d;
    --player-control-hover: #fff;
    --player-play-btn-bg: #fff;
    --player-play-btn-text: #000;
}

body.dark-mode {
    /* Yang (Dark) Mode Colors */
    --bg-color: #121212;
    --bg-image: none; /* No background image in dark mode for better readability */
    --text-color: #e0e0e0;
    --text-color-light: #f5f5f5;
    --text-secondary: #a0a0a0;
    --card-bg: #1e1e1e;
    --glass-bg: rgba(26, 26, 26, 0.5);
    --glass-border: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(10, 10, 10, 0.8);
    --nav-text: white;
    --nav-active-bg: white;
    --nav-active-text: black;
    --primary-button-bg: #e0e0e0;
    --primary-button-text: #121212;
    --primary-button-hover-bg: #121212;
    --primary-button-hover-text: #e0e0e0;
    --footer-bg: #0a0a0a;
    --footer-text: #ccc;
    --border-color: #333;
    --modal-bg: #2c2c2c;
    --modal-text: #e0e0e0;
    --input-bg: #333;
    --input-border: #555;
    --input-text: #e0e0e0;
    --record-border: #f5f5f5;
    --player-control-color: #e0e0e0;
    --player-control-hover: #1dcf53;
    --player-play-btn-bg: #e0e0e0;
    --player-play-btn-text: #121212;
}

/* General Body & Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color-light);
    margin: 0;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- Animation Keyframes --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding-bottom: 120px; /* Space for footer */
}

h1, h2, h3, p {
    color: var(--text-color);
    margin-bottom: 20px;
    text-align: center;
}

h1 {
    font-size: 2.2em;
}

p {
    font-size: 1.2em;
}

/* --- Navigation Bar --- */
nav {
    background-color: var(--nav-bg);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-logo-link {
    padding: 5px 0;
    flex-shrink: 0;
}

.nav-logo {
    height: 22.5px;
    width: auto; /* Use auto for better scaling */
}

nav .nav-links {
    flex-grow: 1;
    text-align: center;
}

nav .nav-links a {
    color: var(--nav-text);
    text-decoration: none;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    display: inline-block;
}

nav .nav-links a:hover, nav .nav-links a.active {
    background-color: var(--nav-active-bg);
    color: var(--nav-active-text);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-icon-container {
    position: relative;
    color: var(--nav-text);
    text-decoration: none;
    cursor: pointer;
}

#cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: var(--nav-active-bg);
    color: var(--nav-active-text);
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid var(--nav-active-text);
}

nav .icon {
    display: none;
    color: var(--nav-text);
    font-size: 24px;
    text-decoration: none;
    cursor: pointer;
}

/* --- Theme Switcher Button --- */
.theme-btn {
    background: transparent;
    border: none;
    color: var(--nav-text);
    cursor: pointer;
    font-size: 1.2em;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* NEW: Animate the Yin-Yang icon */
.theme-btn .fa-yin-yang {
    transition: transform 0.4s ease-in-out;
}
body.dark-mode .theme-btn .fa-yin-yang {
    transform: rotate(180deg);
}


/* --- Homepage Specific Styles --- */
.hero-section {
    padding: 40px 20px;
    margin-bottom: 40px;
    border-radius: 15px;
    background: linear-gradient(rgba(65, 68, 77, 0.7), rgba(24, 25, 26, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.hero-section h1, .hero-section p {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.homepage-section {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#latest-music-section {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

#latest-music-section .section-header h2 {
    color: var(--text-color);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

#latest-music-section .section-header {
    border-bottom-color: var(--glass-border);
}

.section-header h2 {
    margin: 0;
    text-align: left;
}

.view-all-btn {
    background-color: #333;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.view-all-btn:hover {
    background-color: #555;
}

.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    padding-bottom: 20px;
    gap: 25px;
}

.horizontal-scroll::-webkit-scrollbar { height: 8px; }
.horizontal-scroll::-webkit-scrollbar-track { background: var(--border-color); border-radius: 10px; }
.horizontal-scroll::-webkit-scrollbar-thumb { background: var(--text-secondary); border-radius: 10px; }
.horizontal-scroll::-webkit-scrollbar-thumb:hover { background: #555; }

.horizontal-scroll .music-card {
    flex: 0 0 220px;
    width: 220px;
}

/* Grids for Content */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

/* --- Search Bar --- */
.search-container {
    margin-bottom: 25px;
}

#music-search-input, #merch-search-input {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--input-text);
    box-sizing: border-box;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#music-search-input:focus, #merch-search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.5);
}

/* --- UNIFIED MUSIC CARD STYLES --- */
.music-card {
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.music-card .card-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 Aspect Ratio */
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}
.music-card:hover .card-image-wrapper {
    transform: scale(1.03);
}

.music-card .card-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-card .card-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 50%);
}

.music-card .card-play-button {
    position: absolute;
    bottom: 15px;
    left: 15px;
    width: 45px;
    height: 45px;
    background-color: white;
    color: black;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.3s ease;
    z-index: 10;
    opacity: 0;
}

.music-card:hover .card-play-button,
.music-card.is-playing .card-play-button {
    opacity: 1;
}

.music-card .card-play-button .fa-pause { display: none; }
.music-card.is-playing .card-play-button .fa-play { display: none; }
.music-card.is-playing .card-play-button .fa-pause { display: inline-block; }


.music-card .card-info { text-align: left; }
.music-card .card-info h4 {
    color: var(--text-color);
    font-size: 1em;
    font-weight: 500;
    margin: 0 0 2px 0;
    text-align: left;
}
.music-card .card-info p {
    color: #aaa;
    font-size: 0.9em;
    margin: 0;
    text-align: left;
}

/* --- Gallery Card Styling --- */
.gallery-card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.gallery-card:hover { transform: translateY(-5px); }
.gallery-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}
.gallery-card .card-content {
    padding: 15px;
    flex-grow: 1;
}

/* --- Admin Page Styling --- */
.admin-tabs {
    overflow: hidden; border: 1px solid var(--input-border); background-color: var(--input-bg);
    border-radius: 8px; margin-bottom: 20px; display: flex;
}
.tab-button {
    background-color: inherit; flex-grow: 1; border: none; outline: none; cursor: pointer;
    padding: 14px 16px; transition: 0.3s; font-size: 17px;
    color: var(--text-color);
    position: relative; /* For the badge */
}
.tab-button:hover { background-color: var(--border-color); }
.tab-button.active { background-color: var(--input-border); }
.tab-content { display: none; padding: 6px 12px; border-top: none; animation: fadeIn 0.5s; }
.form-container {
    background: var(--card-bg); padding: 20px; border-radius: 8px;
    margin-bottom: 30px; box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.form-container h3 { border-bottom: 2px solid var(--border-color); padding-bottom: 10px; margin-bottom: 20px; text-align: left; }
.form-container input, .form-container textarea, .form-container select {
    width: 100%; padding: 12px; margin-bottom: 15px;
    border: 1px solid var(--input-border); border-radius: 4px; box-sizing: border-box;
    background-color: var(--input-bg);
    color: var(--input-text);
}
.form-container label { display: block; margin-bottom: 5px; font-weight: bold; text-align: left; color: var(--text-color);}

.manage-list {
    max-height: 500px; overflow-y: auto; display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px; padding: 10px;
}
.manage-item-detailed {
    display: flex; flex-direction: column; gap: 10px; background: var(--card-bg);
    padding: 10px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.manage-item-info { display: flex; align-items: center; gap: 15px; }
.manage-item-thumbnail { width: 60px; height: 60px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.manage-item-details { overflow: hidden; }
.manage-item-details strong {
    font-size: 1.1em; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; text-align: left; display: block;
    color: var(--text-color);
}
.manage-item-details span { color: var(--text-secondary); text-align: left; font-size: 0.9em; }
.manage-item-actions {
    display: flex; justify-content: flex-end; gap: 10px;
    border-top: 1px solid var(--border-color); padding-top: 10px; margin-top: 5px;
}

.action-btn {
    border: none; padding: 8px 12px; font-size: 0.9em;
    border-radius: 4px; cursor: pointer; color: white;
    background-color: #555;
    transition: background-color 0.2s;
}
.action-btn:hover {
    background-color: #333;
}
.edit-btn { background-color: #3498db; }
.delete-btn { background: #e74c3c; }


/* --- Player Page Styles --- */
.player-container {
    position: relative; width: 100%; max-width: 400px; margin: 40px auto; padding: 30px;
    border-radius: 20px; overflow: hidden; display: flex; flex-direction: column;
    align-items: center; box-sizing: border-box;
}
.glass-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(25px); backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border); z-index: -1;
}
.player-album-art-container {
    width: 80%; padding-bottom: 80%; position: relative; border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2), 0 6px 6px rgba(0,0,0,0.23);
    margin-bottom: 30px;
}
#player-album-art {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; border-radius: 20px; border: 3px solid #fff;
}
.player-song-info { text-align: center; margin-bottom: 20px; width: 100%; }
.player-song-info h2, .player-song-info p { color:  var(--text-color); animation: none; }
.player-song-info h2 { font-size: 1.5em; margin-bottom: 5px; }
.player-song-info p { font-size: 1em; opacity: 0.8; }
.player-controls-wrapper {
    width: 100%; padding: 20px 10px; box-sizing: border-box;
    display: flex; flex-direction: column; gap: 10px;
}

.progress-bar-container {
    width: 100%; height: 4px; background: rgba(255, 255, 255, 0.3);
    border-radius: 2px; cursor: pointer; position: relative;
}
.progress-bar {
    width: 0%; height: 100%; background: #fff; border-radius: 2px; position: relative;
}
.progress-bar::after {
    content: ''; position: absolute; right: 0; top: 50%;
    transform: translate(50%, -50%); width: 14px; height: 14px;
    background-color: white; border-radius: 50%; box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.song-timer {
    width: 100%; display: flex; justify-content: space-between;
    font-size: 0.8em; color: var(--text-color); text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.control-buttons {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; margin-top: 15px;
}
.control-btn {
    position: relative; border: none; outline: none; background: transparent;
    font-size: 1.5rem; color: var(--player-control-color); cursor: pointer; transition: color 0.2s ease-in-out;
}
.control-btn:hover { color: var(--player-control-hover); }
.control-btn.play-btn {
    width: 65px; height: 65px; background-color: var(--player-play-btn-bg); color: var(--player-play-btn-text);
    border-radius: 50%; font-size: 1.8rem; display: flex; align-items: center;
    justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,0.4); transition: transform 0.1s ease;
}
.control-btn.play-btn:active { transform: scale(0.95); }
.control-btn.active { color: #1dcf53; }
.control-btn:disabled { color: rgba(224, 224, 224, 0.4); cursor: not-allowed; }
.control-btn.play-btn:disabled { background-color: rgba(255, 255, 255, 0.5); color: rgba(0, 0, 0, 0.5); }
#repeat-btn.repeat-one::after {
    content: '1'; position: absolute; bottom: 2px; right: 2px;
    padding-top: 2px; font-size: 9px; font-weight: bold; background-color: #1dcf53;
    color: #000; border-radius: 50%; width: 12px; height: 12px;
    line-height: 12px; text-align: center;
}

/* Player Page Details Grid */
.player-details-grid {
    display: grid; grid-template-columns: 1fr; gap: 30px; margin-top: 40px;
}
.player-details-card {
    background: var(--glass-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    padding: 20px; border-radius: 15px;
}
.player-details-card h3 {
    color: var(--text-color); text-align: left; margin-top: 0; margin-bottom: 15px;
    padding-bottom: 10px; border-bottom: 1px solid var(--glass-border);
}

/* Playlist Styles */
#playlist-items { max-height: 400px; overflow-y: auto; padding-right: 10px; }
.playlist-item {
    display: flex; align-items: center; gap: 15px; padding: 10px;
    border-radius: 8px; cursor: pointer; transition: background-color 0.3s;
}
.playlist-item:hover { background-color: rgba(255, 255, 255, 0.15); }
.playlist-item.is-playing { background-color: rgba(108, 92, 231, 0.3); }
.playlist-item img { width: 50px; height: 50px; border-radius: 5px; object-fit: cover; }
.playlist-item-info { flex-grow: 1; }
.playlist-item-info strong, .playlist-item-info span {
    color: var(--text-color); text-align: left; animation: none; margin: 0; padding: 0;
}
.playlist-item-info span { font-size: 0.9em; opacity: 0.7; display: block; }
.playlist-item .play-indicator { display: none; color: #fff; }
.playlist-item.is-playing .play-indicator { display: block; }

/* Track Info Styles */
#track-info-content div { margin-bottom: 12px; }
#track-info-content strong {
    color: var(--text-secondary); display: block; font-size: 0.9em;
    margin-bottom: 2px; text-transform: uppercase;
}
#track-info-content span { color: var(--text-color); font-size: 1.05em; }

/* --- RESPONSIVE MODAL SYSTEM --- */
.modal {
  display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%;
  height: 100%; overflow: auto; background-color: rgba(0,0,0,0.7);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  padding: 1rem; box-sizing: border-box; animation: fadeIn 0.3s ease-out;
}
.modal-content {
  background-color: var(--modal-bg); margin: auto; padding: 1.5rem; border: none;
  border-radius: 15px; width: 100%; max-width: 500px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15); position: relative; display: flex;
  flex-direction: column; max-height: 90vh;
  animation: zoomIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-content h2, .modal-content h3, .modal-content h4, .modal-content strong {
    color: var(--modal-text);
}
.modal-content p {
    color: var(--text-secondary);
}
.close-btn {
  color: #888; position: absolute; top: 10px; right: 15px; font-size: 35px;
  font-weight: bold; cursor: pointer; z-index: 10; line-height: 1; transition: color 0.2s;
}
.close-btn:hover, .close-btn:focus { color: var(--modal-text); }

/* Cart Modal */
.cart-modal-content { max-width: 500px; }
.cart-item {
    display: flex; align-items: center; gap: 15px; margin-bottom: 15px;
    padding-bottom: 15px; border-bottom: 1px solid var(--border-color);
}
.cart-item img { width: 60px; height: 60px; object-fit: cover; border-radius: 5px; }
.cart-item-details { flex-grow: 1; }
.cart-item-details h4 { margin: 0 0 5px 0; text-align: left; }
.cart-item-details p { margin: 0; font-size: 0.9em; text-align: left; animation: none; }
.cart-item-variations { color: var(--modal-text) !important; font-weight: bold; }
.cart-item-remove { background: none; border: none; color: #e74c3c; font-size: 1.2em; cursor: pointer; }
.cart-summary { text-align: right; font-size: 1.2em; margin-bottom: 20px; }
.checkout-btn {
    background-color: #27ae60; color: white; width: 100%; padding: 12px;
    border: none; border-radius: 5px; font-size: 1.1em; cursor: pointer;
    transition: background-color 0.3s;
}
.checkout-btn:hover { background-color: #229954; }
#cart-items-container {
  overflow-y: auto; flex-shrink: 1; margin-bottom: 1rem; padding-right: 5px;
}
.cart-summary { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border-color); }

/* Edit Content Modal */
.edit-modal-content { max-width: 750px; padding: 2rem; }
#edit-form { display: flex; flex-direction: column; overflow: hidden; height: 100%; }
#edit-fields { overflow-y: auto; padding-right: 15px; margin-right: -15px; }
.edit-section { margin-bottom: 25px; }
.edit-section h4 {
    font-size: 1.1em; margin-bottom: 15px; border-bottom: 1px solid #e9ecef;
    padding-bottom: 8px; text-align: left;
    color: var(--modal-text);
}
.edit-image-preview {
    width: 120px; height: 120px; object-fit: cover; border-radius: 8px;
    border: 1px solid var(--input-border); margin-bottom: 10px;
}
.edit-audio-preview { width: 100%; margin-bottom: 10px; }
.edit-gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 15px;
}
.edit-gallery-item { position: relative; }
.edit-gallery-item img { width: 100%; height: 100px; object-fit: cover; border-radius: 8px; }
.edit-gallery-delete-btn {
    position: absolute; top: 5px; right: 5px; background: rgba(231, 76, 60, 0.8);
    color: white; border: none; border-radius: 50%; width: 24px; height: 24px;
    font-size: 14px; line-height: 24px; text-align: center; cursor: pointer; transition: background 0.3s;
}
.edit-gallery-delete-btn:hover { background: #c0392b; }

/* Gallery & Product Gallery Modal */
.product-gallery-modal-content {
    display: flex; flex-direction: column; width: 100%; max-width: 95vw;
    height: auto; max-height: 90vh; padding: 20px; gap: 15px;
}
#gallery-modal-title {
    text-align: center;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.5em;
    flex-shrink: 0;
}
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--input-bg);
    border-radius: 10px;
    flex-grow: 1;
    min-height: 200px;
    flex-basis: 0;
}
#carousel-main-image-container img, #gallery-carousel-main-image-container img {
    max-width: 100%;
    max-height: 60vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}
#carousel-thumbnails-container, #gallery-carousel-thumbnails-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    padding: 5px;
    flex-shrink: 0;
}
.carousel-thumbnail {
    width: 60px; height: 60px; object-fit: cover; border: 2px solid var(--input-border);
    border-radius: 8px; cursor: pointer; opacity: 0.6; transition: all 0.3s ease; flex-shrink: 0;
}
.carousel-thumbnail:hover { opacity: 1; border-color: #555; }
.carousel-thumbnail.active { opacity: 1; border-color: var(--modal-text); }
.carousel-prev, .carousel-next {
    cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; padding: 0; color: var(--modal-text); font-weight: bold; font-size: 20px;
    transition: 0.3s ease; -webkit-user-select: none; user-select: none;
    background-color: rgba(255, 255, 255, 0.7); border-radius: 50%; display: flex;
    align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,0.1); z-index: 10;
}
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }
.carousel-prev:hover, .carousel-next:hover { background-color: var(--modal-bg); color: var(--modal-text); }

/* --- Floating Spinning Record Player --- */
#floating-record-player {
    visibility: hidden; opacity: 0; position: fixed; bottom: 80px; /* Adjusted for footer */
    right: 20px; width: 80px; height: 80px; z-index: 1500; cursor: pointer;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out; transform: scale(0.8);
}
#floating-record-player.visible { visibility: visible; opacity: 1; transform: scale(1); }
#record-art {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
    border: 4px solid var(--record-border); box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    animation: spin 8s linear infinite; animation-play-state: paused;
}

/* Footer */
footer {
    background-color: var(--footer-bg); color: white; text-align: center; padding: 20px;
}
footer p { margin: 0; color: var(--footer-text); font-size: 1em; animation: none; }

/* --- MERCHANDISE CARD STYLES --- */
.merch-card-new-style {
    display: flex; flex-direction: column; background-color: transparent;
    border: none; box-shadow: none;
}
.merch-image-wrapper-new {
    padding: 0; margin-bottom: 15px; background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}
.merch-image-wrapper-new img { width: 100%; height: auto; display: block; }
.merch-info-new {
    text-align: left; display: flex; flex-direction: column; flex-grow: 1;
}
.merch-info-new h3, .merch-info-new .price {
    text-align: left; animation: none; margin: 0 0 5px 0; color: var(--text-color);
}
.merch-info-new h3 { font-size: 1em; font-weight: 500; }
.merch-info-new .price {
    font-size: 1em; font-weight: normal; color: var(--text-color-light); margin-bottom: 15px;
}

.merch-variations {
    display: flex;
    flex-direction: column; 
    gap: 10px;
    margin-bottom: 15px;
}

/* ## MODIFIED: REMOVED CHEVRON ICON FROM SELECTORS ## */
.size-selector, .color-selector {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: transparent;
    border: 1px solid var(--primary-button-bg);
    border-radius: 50px; /* Pill shape */
    padding: 10px 15px; /* Adjusted padding */
    font-size: 1em;
    color: var(--primary-button-bg);
    text-align: center;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    /* Removed background-image and related properties */
}

.size-selector::-ms-expand, .color-selector::-ms-expand {
    display: none;
}

.merch-card-new-style .add-to-cart-btn {
    background-color: var(--primary-button-bg); color: var(--primary-button-text); border: 2px solid var(--primary-button-bg);
    width: 100%; margin-top: auto; padding: 12px 15px; font-size: 1em;
    font-weight: 600; border-radius: 0;
    transition: all 0.3s ease-in-out; cursor: pointer;
}

.merch-card-new-style .add-to-cart-btn:hover { background-color: var(--primary-button-hover-bg); color: var(--primary-button-hover-text); }

/* ## NEW STYLES: Orders List and Notification Badge ## */
.orders-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.order-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
}
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.order-date {
    font-size: 0.9em;
    color: var(--text-secondary);
}
.order-total {
    font-weight: bold;
    font-size: 1.1em;
}
.order-customer {
    margin-bottom: 10px;
    font-size: 0.95em;
}
.order-details ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}
.order-details li {
    background-color: var(--input-bg);
    padding: 8px;
    border-radius: 4px;
    margin-top: 5px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.order-item-thumbnail {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.new-order-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: var(--text-color);
    color: var(--card-bg);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 20px;
}

/* --- Social Links Section --- */
.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px; /* Space between icons */
    margin-top: 20px;
}

.social-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background-color: #333; /* Dark background */
    color: white; /* White icon */
    text-decoration: none;
    border-radius: 50%; /* Make it a circle */
    font-size: 24px; /* Icon size */
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.social-link:hover {
    background-color: #555; /* Lighter on hover */
    transform: scale(1.1); /* Slightly enlarge on hover */
}

/* =================================================================== */
/* --- RESPONSIVE DESIGN & MEDIA QUERIES --- */
/* =================================================================== */

/* Desktop layout for Gallery Modals */
@media screen and (min-width: 769px) {
    .product-gallery-modal-content {
        display: grid; grid-template-columns: 100px 1fr; /* Thumbnails on left */
        grid-template-rows: auto 1fr; gap: 20px; max-width: 900px;
        max-height: 80vh; padding: 25px;
    }
    #gallery-modal-title { grid-column: 1 / -1; text-align: left; }
    #carousel-thumbnails-container, #gallery-carousel-thumbnails-container {
        grid-row: 2; grid-column: 1; flex-direction: column; /* Vertical thumbnails */
        overflow-y: auto; overflow-x: hidden; padding: 0 10px 0 0;
    }
    .carousel-thumbnail { width: 80px; height: 80px; }
    .carousel-container { grid-row: 2; grid-column: 2; }
    #carousel-main-image-container img, #gallery-carousel-main-image-container img { max-height: 70vh; }
    .carousel-prev { left: 15px; }
    .carousel-next { right: 15px; }
    .player-details-grid { grid-template-columns: 1fr 1fr; }
}

/* Tablet & Smaller Desktop (max-width: 992px) */
@media screen and (max-width: 992px) {
    .manage-list { grid-template-columns: 1fr; }
}

/* Mobile & Tablet (max-width: 768px) */
@media screen and (max-width: 768px) {
    nav { padding: 0.5rem 1rem; flex-wrap: wrap; }
    nav .nav-links {
        display: none; width: 100%; text-align: center; order: 3;
        background-color: var(--nav-bg); padding: 10px 0;
    }
    nav .nav-links a { display: block; margin: 10px 0; }
    .nav-right { order: 2; }
    .nav-logo-link { order: 1; }
    nav .icon { display: block; }
    nav .nav-links.responsive { display: block; animation: fadeIn 0.3s; }

    .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
    }
    .music-card .card-play-button { opacity: 1; }
}

/* Mobile Devices (max-width: 600px) */
@media screen and (max-width: 600px) {
    main { padding: 15px; padding-bottom: 120px; }
    h1 { font-size: 1.8em; }
    .hero-section { padding: 30px 15px; }

    .grid-container { grid-template-columns: 1fr 1fr; gap: 15px; }
    /* UPDATED: Changed from ID to class for SPA compatibility */
    .page-gallery #content-area {
        grid-template-columns: 1fr; gap: 25px;
    }
    .gallery-card img { height: auto; }

    .admin-tabs { flex-direction: column; }
    .tab-button { text-align: center; }

    .player-container {
        padding: 20px 15px; margin: 20px auto;
    }
    .player-album-art-container { width: 85%; padding-bottom: 85%; margin-bottom: 20px; }
    .player-song-info h2 { font-size: 1.2em; }
    .player-song-info p { font-size: 0.9em; }
    .control-buttons { gap: 15px; justify-content: space-around;} /* Better spacing */
    .control-btn { font-size: 1.3rem; }
    .control-btn.play-btn { width: 60px; height: 60px; font-size: 1.3em; }

    #floating-record-player {
        width: 65px; height: 65px; bottom: 80px; right: 15px;
    }
}

/* === NEW STYLES FOR CHECKOUT MODAL === */

/* Main modal content box */
#checkoutModal .modal-content {
    background: rgba(26, 26, 26, 0.85); /* Dark charcoal, semi-transparent */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    
    /* --- QUERIES ADDED FOR RESPONSIVENESS --- */
    max-width: 400px; /* Prevents it from becoming too wide on larger screens */
    width: 90%;       /* Ensures it fits nicely on smaller screens */
    margin: auto;     /* This is key for centering it vertically and horizontally */
    box-sizing: border-box; /* Ensures padding is included in the width */
    max-height: 90vh; /* Prevents it from being taller than the screen */
    overflow-y: auto; /* Adds a scrollbar if content is too long for the screen */
}

/* Title text */
#checkoutModal h2 {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Labels for the form fields */
#checkoutModal label {
    color: #a0a0a0; /* Light grey for less emphasis */
    font-weight: normal;
}

/* Input fields (name, email, phone) */
#checkoutModal input {
    background-color: #f3ececff;
    border: 1px solid #444;
    color: black;
    border-radius: 8px;
    padding: 12px 15px;
}

#checkoutModal input:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

/* Read-only amount field */
#checkoutModal input[readonly] {
    background-color:#f3ececff;
    cursor: not-allowed;
    font-weight: bold;
    color: black;
}

/* "Pay Now" button */
#checkoutModal .checkout-btn {
    background-color: #27ae60; /* Green to match screenshot */
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
    margin-top: 10px;
    border-radius: 8px; /* Added for consistency */
}

#checkoutModal .checkout-btn:hover {
    background-color: #229954;
    transform: translateY(-2px);
}