/* #region ANIMATION */
@keyframes shimmerMove {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
/* #endregion */

/* #region BASE */
html {
  background-color: white;
}

body {
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-image: url('../images/background/13.jpg');
    background-size: 100% 100%;
}
/* #endregion */

/* #region FRAME */
.musicPlayerFrame {
    position: absolute;
    border: 2px solid #00144c;
    background: rgba(0, 0, 0, 0.5);
    width: 1200px;
    height: 600px;
    transform: rotate(90deg);
    scale: 1.225;
}

.frameProtocal {
    border: 1px solid #00144c;
    background: rgba(0, 0, 0, 0.5);
    width: calc(400px - 1px);
    height: calc(450px - 1px);
    background-image: url('../images/musicPlayer/protocal.png');
    background-size: 100% 100%;
}

.frameInformation {
    border: 1px solid #00144c;
    background: rgba(0, 0, 0, 0.5);
    width: 250px;
    height: calc(150px - 1px);
    background-image: url('../images/musicPlayer/information.png');
    background-size: 100% 100%;
}

.frameInf1 {
    position: absolute; 
    bottom: calc(80px - 1px);
    left: 250px;
    border: 1px solid #00144c;
    background: rgba(0, 0, 0, 0.5);
    width: calc(150px - 1px);
    height: calc(70px - 1px);
    background-image: url('../images/musicPlayer/inf1.png');
    background-size: 100% 100%;
}

.frameInf2 {
    position: absolute; 
    bottom: 0;
    left: 250px;
    border: 1px solid #00144c;
    background: rgba(0, 0, 0, 0.5);
    width: calc(150px - 1px);
    height: calc(80px - 1px);
    background-image: url('../images/musicPlayer/inf2.png');
    background-size: 100% 100%;
}

.frameMusic {
    position: absolute; 
    top: 0;
    left: calc(400px - 1px);
    border: 1px solid #00144c;
    background: rgba(0, 0, 0, 0.5);
    width: calc(400px - 1px);
    height: calc(150px - 1px);
    background-image: url('../images/musicPlayer/music.png');
    background-size: 100% 100%;
}

#frameSystemConsole {
    position: relative; 
    bottom: 450px;
    left: calc(400px - 1px);
    border: 1px solid #00144c;
    background: rgba(0, 0, 0, 0.5);
    width: calc(400px - 1px);
    height: 300px;
    background-image: url('../images/musicPlayer/systemConsole.png');
    background-size: 100% 100%;
}

.frameSystemConsoleInner {
    position: relative; 
    bottom: -10px;
    width: calc(400px - 2px);
    height: 265px;
}

.frameWorldClock {
    position: absolute; 
    top: calc(450px - 1px);
    left: calc(400px - 1px);
    border: 1px solid #00144c;
    background: rgba(0, 0, 0, 0.5);
    width: calc(400px - 1px);
    height: 150px;
    background-image: url('../images/musicPlayer/worldClock.png');
    background-size: 100% 100%;
    display: flex;
    flex-direction: row; 
}

.frameWorldClockInnerRight,
.frameWorldClockInnerLeft {
    top: calc(450px - 1px);
    left: calc(400px - 1px);
    width: calc(200px - 1px);
    height: 150px;
    background-size: 100% 100%;
}

.frameCalendar {
    position: absolute; 
    top: 0;
    left: calc(800px - 1px);
    border: 1px solid #00144c;
    background: rgba(0, 0, 0, 0.5);
    width: 400px;
    height: calc(150px - 1px);
    background-image: url('../images/musicPlayer/calendar.png');
    background-size: 100% 100%;
}

#frameCharacter {
    position: relative; 
    bottom: calc(750px + 2px);
    left: calc(800px - 1px);
    border: 1px solid #00144c;
    background: rgba(0, 0, 0, 0.5);
    width: 400px;
    height: 450px;
    background-image: url('../images/musicPlayer/characater.png');
    background-size: 100% 100%;
}

/* #endregion */

/* #region MOVEABLE FRAME */

#frameCube {
    position: absolute;
    cursor: grab;
    border: 1px solid #00144c;
    background: rgba(0, 0, 0, 0.5);
    width: 100px;
    height: 120px;
    background-image: url('../images/musicPlayer/cube.png');
    background-size: 100% 100%;
    right: 20px;
    top: 35px;
}

#frameCube:active {
  cursor: grabbing;
}

#frameMemory {
    position: absolute;
    cursor: grab;
    border: 1px solid #00144c;
    background: rgba(0, 0, 0, 0.5);
    width: 115px;
    height: 110px;
    background-image: url('../images/musicPlayer/memory.png');
    background-size: 100% 100%;
    left: 15px;
    bottom: 20px;
}

#frameMemory:active {
  cursor: grabbing;
}

#frameAvatar {
    position: absolute;
    cursor: grab;
    border: 1px solid #00144c;
    background: rgba(0, 0, 0, 0.5);
    width: 165px;
    height: 75px;
    background-image: url('../images/musicPlayer/avatar.png');
    background-size: 100% 100%;
    right: 10px;
    bottom: 10px;
}

#frameAvatar:active {
  cursor: grabbing;
}

#frameSecretCode {
    position: absolute;
    cursor: grab;
    border: 1px solid #00144c;
    background: rgba(0, 0, 0, 0.5);
    width: 200px;
    height: 150px;
    background-image: url('../images/musicPlayer/secretCode.png');
    background-size: 100% 100%;
    left: 5px;
    top: 15px;
}

#frameSecretCode:active {
  cursor: grabbing;
}

#frameSmile {
    position: absolute;
    cursor: grab;
    border: 1px solid #00144c;
    background: rgba(0, 0, 0, 0.5);
    width: 200px;
    height: 215px;
    background-image: url('../images/musicPlayer/smile.png');
    background-size: 100% 100%;
    left: 0px;
    top: 30px;
}

#frameSmile:active {
  cursor: grabbing;
}
/* #endregion */

/* #region TEXT */
.musTitle1 {
    position: absolute;
    color: #b4b5c2;
    font-family:'Book Antiqua';
    font-size: 40px; 
    font-weight: normal;
    text-align: center;
    writing-mode: vertical-rl;
    left: 0;
}

.musTitle2 {  
    position: absolute;
    color: #eac1f2;
    font-family:'JMH Typewriter';
    font-weight: normal;
    text-align: center;
    font-size: 35px; 
    top: 105px;
}

.protocalText {
    transform: translate(1px, -3px);
    color: white;
    font-family:'JMH Typewriter';
    font-size: 15px; 
    font-weight: normal;
}

.informationText {
    transform: translate(1px, -3px);
    color: white;
    font-family:'JMH Typewriter';
    font-size: 15px; 
    font-weight: normal;
}

.nameText1 {
    transform: translate(12.5px, 2.5px);
    color: #eac1f2;
    font-family:'JMH Typewriter';
    font-size: 17.5px; 
    font-weight: normal;
}

.nameText2 {
    transform: translate(12.5px, 2.5px);
    color: #eac1f2;
    font-family:'JMH Typewriter';
    font-size: 17.5px; 
    font-weight: normal;
}

.nameText3 {
    transform: translate(12.5px, 2.5px);
    color: #eac1f2;
    font-family:'JMH Typewriter';
    font-size: 17.5px; 
    font-weight: normal;
    white-space: pre;
}

.nameText4 {
    transform: translate(12.5px, 2.5px);
    color: #eac1f2;
    font-family:'JMH Typewriter';
    font-size: 17.5px; 
    font-weight: normal;
}

.nameText5 {
    transform: translate(12.5px, 2.5px);
    color: #eac1f2;
    font-family:'JMH Typewriter';
    font-size: 17.5px; 
    font-weight: normal;
}

.inf1Text {
    transform: translate(0px, 17.5px);
    color: #eac1f2;
    font-family:'JMH Typewriter';
    font-size: 8.5px; 
    font-weight: normal;
    text-align: center;
}

.inf2Text1 {
    transform: translate(3px, -1px);
    color: white;
    font-family:'JMH Typewriter';
    font-size: 15px; 
    font-weight: normal;
}

.inf2Text2 {
    transform: translate(8px, -1px);
    color: #eac1f2;
    font-family:'JMH Typewriter';
    font-size: 20px; 
    font-weight: normal;
}

.inf2Text3 {
    transform: translate(8px, -1px);
    color: #eac1f2;
    font-family:'JMH Typewriter';
    font-size: 20px; 
    font-weight: normal;
}

.systemConsoleText {
    transform: translate(3px, 0px);
    color: white;
    font-family:'JMH Typewriter';
    font-size: 15px; 
    font-weight: normal;
}

.worldClockText {
    transform: translate(3px, -1px);
    color: white;
    font-family:'JMH Typewriter';
    font-size: 15px; 
    font-weight: normal;
    position: absolute;
}

.clockRightName,
.clockLeftName {
    transform: translate(20px, 40px);
    color: #eac1f2;
    font-family:'JMH Typewriter';
    font-size: 20px; 
    font-weight: normal;
}

#clockFinland,
#clockChina {
    transform: translate(20px, 40px);
    color: #0038bc;
    font-family:'JMH Typewriter';
    font-size: 25px; 
    font-weight: normal;
}

#dateFinland,
#dateChina {
    transform: translate(20px, 40px);
    color: #eac1f2;
    font-family:'JMH Typewriter';
    font-size: 20px; 
    font-weight: normal;
}

.characterText {
    transform: translate(3px, -1px);
    color: white;
    font-family:'JMH Typewriter';
    font-size: 15px; 
    font-weight: normal;
}

.smileText {
    transform: translate(3px, -1px);
    color: white;
    font-family:'JMH Typewriter';
    font-size: 15px; 
    font-weight: normal;
}

.calculateText {
    transform: translate(3px, -1px);
    color: white;
    font-family:'JMH Typewriter';
    font-size: 15px; 
    font-weight: normal;
}

.secretCodeText {
    transform: translate(3px, -1px);
    color: white;
    font-family:'JMH Typewriter';
    font-size: 15px; 
    font-weight: normal;
}

.avatarText {
    transform: translate(3px, 0px);
    color: white;
    font-family:'JMH Typewriter';
    font-size: 15px; 
    font-weight: normal;
}
/* #endregion */

/* #region MUSIC */
.frameMusic * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.frameMusic {
  display: flex;
  justify-content: center;
  align-items: center;

}
.frameMusic h2 {
  font-weight: 400;
  font-size: 1.2rem;
  color: #1e2b3a;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #eef2f6;
  padding-bottom: 0.5rem;
}

.frameMusic .player {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}

.frameMusic .track-list {
  transform: translate(85px, 7.5px);
  width: 300px;
  max-height: 26px;
  overflow-y: auto;
  margin: 0.2rem 0 1rem 0;
  background: #062d72;
  padding: 0.1rem 0;
  scroll-behavior: smooth;
}

.frameMusic .track-list::-webkit-scrollbar {
  width: 4px;
}
.frameMusic .track-list::-webkit-scrollbar-track {
  background: black;
}
.frameMusic .track-list::-webkit-scrollbar-thumb {
  background: #2f77a2;
}

.frameMusic .track-item {
  display: block;
  width: 100%;
  padding: 0.375rem 0.8rem;
  font-size: 9px;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid black;
  cursor: pointer;
  color: #eac1f2;
  transition: background 0.1s;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 0.01;
}
.frameMusic .track-item:last-of-type {
  border-bottom: none;
}
.frameMusic .track-item:hover {
  background: grey;
}
.frameMusic .track-item.active {
  background: #296683;
  font-weight: 500;
  color: #1b4b6c;
  border-left: 2px solid #6598be;
}

.frameMusic .track-item .name {
  font-size: 9px;
  font-family: "JMH Typewriter", "Yu Mincho";
  flex: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.frameMusic .track-item .status-dot {
  font-size: 0.6rem;
  flex-shrink: 0;
  color: #8a9aa8;
}
.frameMusic .track-item .status-dot.playing {
  color: white;
}
.frameMusic .track-item .status-dot.error {
  color: #dc3545;
}

/* Music Player Style */

.frameMusic .custom-audio {
  width: 100%;
  margin: 0.2rem 0 0.3rem;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.frameMusic .play-btn {
  color: #eac1f2;
  background: transparent; 
  width: 36px;
  height: 36px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.frameMusic .play-btn:active {
  transform: scale(0.95);
}

.frameMusic .progress-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.frameMusic .progress-bar {
  flex: 1;
  height: 4px;
  background: black;
  cursor: pointer;
  position: relative;
  min-width: 40px;
  transition: height 0.2s;
}
.frameMusic .progress-bar:hover {
  height: 6px;
}

.frameMusic .progress-fill {
  height: 100%;
  background: midnightblue;
  width: 0%;
  transition: width 0.05s linear;
  position: relative;
}
.frameMusic .progress-fill::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: rgb(39, 39, 174);
  opacity: 0;
  transition: opacity 0.2s;
}
.frameMusic .progress-bar:hover .progress-fill::after {
  opacity: 1;
}

.frameMusic .time-display {
  font-family:'JMH Typewriter';
  font-size: 0.7rem;
  color: #eac1f2;
  font-variant-numeric: tabular-nums;
  min-width: 90px;
  text-align: center;
  flex-shrink: 0;
}

.frameMusic .volume-container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.frameMusic .volume-icon {
  font-size: 14px;
  color: #5a6f7e;
  cursor: pointer;
}
.frameMusic .volume-bar {
  width: 50px;
  height: 4px;
  background: black;
  cursor: pointer;
  position: relative;
  transition: height 0.2s;
}
.frameMusic .volume-bar:hover {
  height: 6px;
}
.frameMusic .volume-fill {
  height: 100%;
  background: rgb(39, 39, 174);
  width: 100%;
}

.frameMusic .now-playing {
  transform: translate(0px, 5px);
  font-family: "JMH Typewriter", "Yu Mincho";
  font-size: 17.5px;
  color: #eac1f2;
  padding: 0.2rem 1rem;
  display: inline-block;
  margin-top: 0.2rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frameMusic .status-text {
    font-family:'JMH Typewriter';
    position: absolute;
    display: inline-block;
    color: #eac1f2;
    font-size: 14px;
    padding: 4px 16px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    bottom: 2.5px;
}

.frameMusic .status-text.paused {
    color: #eac1f2;
}

.frameMusic .footnote {
  margin-top: 1rem;
  font-size: 0.65rem;
  color: #8f9eab;
  border-top: 1px solid #e9edf2;
  padding-top: 0.7rem;
  text-align: center;
}
/* #endregion */

/* #region PROGRESS BAR */
.progress-track {
    position: absolute;
    top: 110.5px;
    width: 85vw;
    max-width: 94vw;
    height: 30px;
    border-radius: 0;
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.04);
    border: 1px solid white;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: transparent;
    border-radius: 0;
}

.progress-track::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(200, 0, 255, 0.35) 30%,
        rgba(200, 0, 255, 0.55) 50%,
        rgba(200, 0, 255, 0.35) 70%,
        transparent 100%
    );
    pointer-events: none;
    animation: shimmerMove 3s linear infinite;
}
/* #endregion */

/* #region SYSTEM CONSOLE */
#logOutput {
    flex: 1;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    scroll-behavior: smooth;
    background: transparent;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    color: #e6edf3;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
#logOutput::-webkit-scrollbar {
    width: 5px;
}
#logOutput::-webkit-scrollbar-track {
    background: transparent;
}
#logOutput::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
#logOutput::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* 单条日志 — 极简，只保留可读性 */
.log-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 2px 4px;
    font-size: 0.78rem;
    line-height: 1.5;
    word-break: break-word;
    color: #e6edf3;
    border-left: 3px solid transparent;
    background: transparent;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.7);
}
.log-time {
    color: #004480;
    font-size: 0.65rem;
    white-space: nowrap;
    min-width: 62px;
    letter-spacing: 0.1px;
}
.log-level {
    font-size: 0.55rem;
    font-weight: 600;
    padding: 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    line-height: 1.6;
    white-space: nowrap;
    backdrop-filter: blur(2px);
}

.log-message {
    color: #004480;
    opacity: 0.95;
}

/* 级别色条 — 左侧边框颜色 */
.log-line.level-info {
    border-left-color: #004480;
}
.log-line.level-info .log-level {
    background: #003360;
    color: white;
}
.log-line.level-warn {
    border-left-color: #004480;
}
.log-line.level-warn .log-level {
    background: #003360;
    color: white;
}
.log-line.level-error {
    border-left-color: #004480;
}
.log-line.level-error .log-level {
    background: #003360;
    color: white;
}
.log-line.level-success {
    border-left-color: #004480;
}
.log-line.level-success .log-level {
    background: #003360;
    color: white;
}
.log-line.level-debug {
    border-left-color: #004480;
}
.log-line.level-debug .log-level {
    background: #003360;
    color: white    ;
}

/*.log-line.level-info {
    border-left-color: #58a6ff;
}
.log-line.level-info .log-level {
    background: rgba(31, 58, 95, 0.8);
    color: #79c0ff;
}
.log-line.level-warn {
    border-left-color: #d29922;
}
.log-line.level-warn .log-level {
    background: rgba(77, 58, 26, 0.8);
    color: #e3b341;
}
.log-line.level-error {
    border-left-color: #f85149;
}
.log-line.level-error .log-level {
    background: rgba(78, 30, 36, 0.8);
    color: #ff7b72;
}
.log-line.level-success {
    border-left-color: #3fb950;
}
.log-line.level-success .log-level {
    background: rgba(31, 61, 42, 0.8);
    color: #56d364;
}
.log-line.level-debug {
    border-left-color: #8b949e;
}
.log-line.level-debug .log-level {
    background: rgba(45, 51, 59, 0.8);
    color: #b1bac4;
}*/
/* #endregion */