/* HODL Desktop - Application Specific Styles */

/* ===== HODLpad (Notepad) ===== */
.hodlpad-textarea {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  resize: none;
  padding: 4px 6px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.4;
  background: #fff;
  color: #000;
  user-select: text;
  -webkit-user-select: text;
}

/* ===== HODL Explorer (IE) ===== */
.explorer-address-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: #ece9d8;
  border-bottom: 1px solid #d4d0c8;
}

.explorer-address-label {
  font-size: 11px;
  font-family: var(--font-system);
  white-space: nowrap;
  color: #000;
}

.explorer-address-input {
  flex: 1;
  height: 20px;
  padding: 0 4px;
  font-size: 11px;
  font-family: var(--font-system);
  border: 1px solid #7f9db9;
  background: #fff;
  outline: none;
}

.explorer-go-btn {
  padding: 1px 8px;
  font-size: 11px;
  font-family: var(--font-system);
  background: linear-gradient(180deg, #fff 0%, #ece9d8 100%);
  border: 1px solid #999;
  border-radius: 2px;
  cursor: pointer;
}

.explorer-go-btn:hover {
  background: linear-gradient(180deg, #fff 0%, #e0ddd0 100%);
}

.explorer-links-bar {
  display: flex;
  gap: 2px;
  padding: 2px 6px;
  background: #ece9d8;
  border-bottom: 1px solid #d4d0c8;
  flex-wrap: wrap;
}

.explorer-link {
  font-size: 10px;
  color: #0066cc;
  text-decoration: none;
  padding: 1px 6px;
  border-radius: 2px;
  font-family: var(--font-system);
  cursor: pointer;
}

.explorer-link:hover {
  background: rgba(0,102,204,0.1);
  text-decoration: underline;
}

.explorer-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ===== HODLsweeper (Minesweeper) ===== */
.minesweeper-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px;
  background: #c0c0c0;
  height: 100%;
}

.minesweeper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 4px 6px;
  background: #c0c0c0;
  border: 2px inset #fff;
  margin-bottom: 6px;
}

.minesweeper-counter {
  font-family: 'Courier New', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #ff0000;
  background: #000;
  padding: 2px 4px;
  min-width: 40px;
  text-align: center;
  border: 1px inset #888;
}

.minesweeper-face {
  width: 28px;
  height: 28px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #c0c0c0;
  border: 2px outset #fff;
  cursor: pointer;
  user-select: none;
}

.minesweeper-face:active {
  border-style: inset;
}

.minesweeper-grid {
  display: grid;
  gap: 0;
  border: 2px inset #fff;
}

.mine-cell {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-system);
  cursor: pointer;
  user-select: none;
  border: 2px outset #fff;
  background: #c0c0c0;
}

.mine-cell.revealed {
  border: 1px solid #808080;
  background: #d0d0d0;
}

.mine-cell.flagged::after {
  content: '💎';
  font-size: 12px;
}

.mine-cell.mine-exploded {
  background: #ff0000;
}

.mine-cell.mine-shown::after {
  content: '🧻';
  font-size: 12px;
}

.mine-cell .num-1 { color: #0000ff; }
.mine-cell .num-2 { color: #008000; }
.mine-cell .num-3 { color: #ff0000; }
.mine-cell .num-4 { color: #000080; }
.mine-cell .num-5 { color: #800000; }
.mine-cell .num-6 { color: #008080; }
.mine-cell .num-7 { color: #000; }
.mine-cell .num-8 { color: #808080; }

/* ===== My HODLings (My Computer) ===== */
.my-hodlings-layout {
  display: flex;
  height: 100%;
}

.my-hodlings-content {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  background: #fff;
}

.hodlings-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #333;
  padding: 4px 0;
  border-bottom: 1px solid #c8c4b8;
  margin-bottom: 8px;
  font-family: var(--font-system);
}

.hodlings-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 3px;
  font-size: 11px;
  font-family: var(--font-system);
}

.hodlings-item:hover {
  background: #e8f0ff;
}

.hodlings-item-icon {
  font-size: 24px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hodlings-item-info {
  flex: 1;
}

.hodlings-item-name {
  font-weight: 700;
  color: #000;
}

.hodlings-item-desc {
  color: #666;
  font-size: 10px;
}

.token-info-card {
  background: #f0f0f0;
  border: 1px solid #d4d0c8;
  border-radius: 4px;
  padding: 10px;
  margin: 8px 0;
  font-family: var(--font-system);
  font-size: 11px;
}

.token-info-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  border-bottom: 1px solid #e8e4d8;
}

.token-info-row:last-child {
  border-bottom: none;
}

.token-info-label {
  color: #666;
  font-weight: 700;
}

.token-info-value {
  color: #000;
  word-break: break-all;
  text-align: right;
  max-width: 300px;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--hodl-orange);
  font-size: 11px;
  padding: 0 4px;
}

.copy-btn:hover {
  text-decoration: underline;
}

/* ===== Meme Gallery ===== */
.meme-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
  padding: 8px;
  overflow-y: auto;
  height: 100%;
  background: #fff;
}

.meme-thumb {
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid #d4d0c8;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  background: #f0f0f0;
}

.meme-thumb:hover {
  border-color: var(--hodl-orange);
  box-shadow: 0 0 4px rgba(255,149,0,0.3);
}

.meme-thumb img,
.meme-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meme-thumb .video-indicator {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 2px;
}

/* Lightbox */
.meme-lightbox {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.meme-lightbox img,
.meme-lightbox video {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 8px;
  right: 12px;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  background: none;
  border: none;
  text-shadow: 1px 1px 2px #000;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  background: rgba(0,0,0,0.5);
  border: none;
  padding: 10px 14px;
  border-radius: 4px;
}

.lightbox-nav:hover {
  background: rgba(255,149,0,0.6);
}

.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }

/* ===== $HODL Chart ===== */
.chart-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.chart-iframe {
  flex: 1;
  width: 100%;
  border: none;
}

/* ===== HODL Terminal ===== */
.terminal-container {
  width: 100%;
  height: 100%;
  background: #0c0c0c;
  padding: 8px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--hodl-orange);
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

.terminal-line {
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.4;
}

.terminal-line.cyan {
  color: var(--hodl-cyan);
}

.terminal-line.green {
  color: var(--hodl-green);
}

.terminal-line.red {
  color: var(--hodl-red);
}

.terminal-line.white {
  color: #fff;
}

.terminal-line.dim {
  color: #666;
}

.terminal-input-line {
  display: flex;
  white-space: pre;
}

.terminal-prompt {
  color: var(--hodl-orange);
  white-space: pre;
}

.terminal-input {
  background: none;
  border: none;
  outline: none;
  color: var(--hodl-orange);
  font-family: var(--font-mono);
  font-size: 13px;
  flex: 1;
  caret-color: var(--hodl-orange);
}

/* ===== HODL Player (Winamp) ===== */
.player-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #232323;
  color: #fff;
  font-family: var(--font-system);
}

.player-visualizer {
  height: 80px;
  background: #000;
  border: 1px inset #444;
  margin: 6px;
}

.player-display {
  padding: 4px 8px;
  background: #000;
  margin: 0 6px;
  border: 1px inset #444;
}

.player-title {
  color: var(--hodl-orange);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
}

.player-time {
  color: var(--hodl-cyan);
  font-family: var(--font-mono);
  font-size: 16px;
  text-align: center;
  margin: 4px 0;
}

.player-seek {
  width: calc(100% - 12px);
  margin: 4px 6px;
  accent-color: var(--hodl-orange);
  height: 4px;
  cursor: pointer;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px;
}

.player-btn {
  width: 28px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3a3a3a;
  border: 1px outset #555;
  border-radius: 2px;
  cursor: pointer;
  color: #fff;
  font-size: 12px;
}

.player-btn:hover {
  background: #4a4a4a;
}

.player-btn:active {
  border-style: inset;
  background: #2a2a2a;
}

.player-btn.playing {
  background: var(--hodl-orange-dark);
  color: #fff;
}

.player-volume-container {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px 6px;
}

.player-volume-label {
  font-size: 10px;
  color: #999;
}

.player-volume {
  flex: 1;
  accent-color: var(--hodl-cyan);
  height: 3px;
  cursor: pointer;
}

.player-playlist {
  flex: 1;
  margin: 0 6px 6px;
  background: #1a1a1a;
  border: 1px inset #444;
  padding: 4px;
  overflow-y: auto;
}

.player-playlist-item {
  padding: 2px 6px;
  font-size: 10px;
  color: var(--hodl-orange);
  cursor: pointer;
}

.player-playlist-item:hover {
  background: #333;
}

.player-playlist-item.active {
  color: #fff;
  background: #444;
}

/* ===== Recycle Bin ===== */
.recycle-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.recycle-header {
  padding: 8px 10px;
  background: #f0f0f0;
  border-bottom: 1px solid #d4d0c8;
  font-size: 11px;
  color: #666;
}

.recycle-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px;
}

.recycle-list-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 80px;
  padding: 3px 8px;
  background: #ece9d8;
  border-bottom: 1px solid #d4d0c8;
  font-size: 11px;
  font-weight: 700;
  color: #000;
}

.recycle-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 80px;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
  align-items: center;
}

.recycle-item:hover {
  background: #e8f0ff;
}

.recycle-item:nth-child(even) {
  background: #f8f8f8;
}

.recycle-item:nth-child(even):hover {
  background: #e8f0ff;
}

.recycle-item-name {
  display: flex;
  align-items: center;
  gap: 4px;
}

.recycle-empty-btn {
  margin: 8px 10px;
  padding: 4px 16px;
  background: linear-gradient(180deg, #fff 0%, #ece9d8 100%);
  border: 1px solid #999;
  border-radius: 2px;
  font-size: 11px;
  font-family: var(--font-system);
  cursor: pointer;
}

.recycle-empty-btn:hover {
  background: linear-gradient(180deg, #fff 0%, #e0ddd0 100%);
}

.recycle-empty-msg {
  text-align: center;
  padding: 40px;
  color: #888;
  font-size: 12px;
}

/* ===== About HODL ===== */
.about-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}

.about-tab-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.about-section {
  padding: 12px;
  font-family: var(--font-system);
  font-size: 11px;
  line-height: 1.6;
  color: #333;
}

.about-section h2 {
  font-size: 14px;
  font-family: var(--font-display);
  color: var(--hodl-orange);
  margin-bottom: 8px;
  border-bottom: 2px solid var(--hodl-orange);
  padding-bottom: 4px;
}

.about-section h3 {
  font-size: 12px;
  color: #222;
  margin: 10px 0 4px;
}

.about-quote {
  background: #f8f4e8;
  border-left: 3px solid var(--hodl-orange);
  padding: 8px 12px;
  margin: 8px 0;
  font-style: italic;
  color: #555;
}

.about-lore-img {
  max-width: 100%;
  border: 2px solid #d4d0c8;
  margin: 8px 0;
  border-radius: 2px;
}

.about-timeline {
  padding-left: 20px;
  border-left: 2px solid var(--hodl-orange);
  margin: 8px 0;
}

.about-timeline-item {
  padding: 6px 0 6px 12px;
  position: relative;
  font-size: 11px;
}

.about-timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 10px;
  width: 10px;
  height: 10px;
  background: var(--hodl-orange);
  border-radius: 50%;
  border: 2px solid #fff;
}

.about-timeline-year {
  font-weight: 700;
  color: var(--hodl-orange);
}

.about-links a {
  display: inline-block;
  margin: 4px 8px 4px 0;
  padding: 4px 10px;
  background: linear-gradient(180deg, var(--hodl-orange-light) 0%, var(--hodl-orange) 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
}

.about-links a:hover {
  background: linear-gradient(180deg, var(--hodl-orange) 0%, var(--hodl-orange-dark) 100%);
}

/* ===== HODL Chat ===== */
.hodl-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hodl-chat-msg {
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: var(--font-system);
  line-height: 1.4;
  background: #f8f6f0;
  border: 1px solid #e8e4d8;
  flex-shrink: 0;
}

.hodl-chat-msg:hover {
  background: #f0ede4;
}

.hodl-chat-msg-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.hodl-chat-name {
  font-weight: 700;
  font-size: 11px;
}

.hodl-chat-time {
  font-size: 9px;
  color: #999;
}

.hodl-chat-text {
  color: #222;
  word-break: break-word;
  white-space: pre-wrap;
  margin-top: 1px;
}

.hodl-chat-system {
  text-align: center;
  color: #999;
  font-size: 11px;
  font-style: italic;
  padding: 20px;
  flex-shrink: 0;
}

.hodl-chat-date-sep {
  text-align: center;
  font-size: 10px;
  font-family: var(--font-system);
  color: #999;
  padding: 6px 0 2px;
  margin: 4px 0;
  position: relative;
  flex-shrink: 0;
}

.hodl-chat-date-sep::before,
.hodl-chat-date-sep::after {
  content: '';
  position: absolute;
  top: 50%;
  height: 1px;
  background: #ddd;
  width: calc(50% - 40px);
}

.hodl-chat-date-sep::before { left: 0; }
.hodl-chat-date-sep::after { right: 0; }

.hodl-chat-input-bar {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  background: #ece9d8;
  border-top: 1px solid #d4d0c8;
  flex-shrink: 0;
}

.hodl-chat-input {
  flex: 1;
  height: 26px;
  padding: 0 8px;
  font-size: 12px;
  font-family: var(--font-system);
  border: 1px solid #7f9db9;
  border-radius: 2px;
  background: #fff;
  color: #000;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}

.hodl-chat-input:focus {
  border-color: var(--hodl-orange);
}

.hodl-chat-send {
  padding: 0 14px;
  height: 26px;
  font-size: 11px;
  font-family: var(--font-system);
  font-weight: 700;
  background: linear-gradient(180deg, #fff 0%, #ece9d8 100%);
  border: 1px solid #999;
  border-radius: 2px;
  cursor: pointer;
  color: #000;
}

.hodl-chat-send:hover {
  background: linear-gradient(180deg, #fff 0%, #e0ddd0 100%);
}

.hodl-chat-send:active {
  background: #ddd;
}

.hodl-chat-send:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ===== Floating Chat Button ===== */
#chat-fab {
  position: fixed;
  bottom: calc(var(--taskbar-height) + 14px);
  right: 14px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hodl-orange) 0%, var(--hodl-orange-dark) 100%);
  border: 2px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 3px 12px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,0,0,0.1);
  transition: transform 0.15s, box-shadow 0.15s;
  line-height: 1;
}

#chat-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(255,149,0,0.5), 0 0 0 1px rgba(0,0,0,0.1);
}

#chat-fab:active {
  transform: scale(0.95);
}
