/* --- GLOBAL & RESET --- */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #008080;
  font-family: 'Tahoma', 'Verdana', sans-serif;
  color: #000;
  width: 100%;
}

/* ============================
   --- STRICT ICON SIZING --- 
   ============================ */
.tree-icon {
  width: 16px !important;
  height: 16px !important;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 5px;
  display: inline-block;
}

.toolbar-icon {
  width: 20px !important;
  height: 20px !important;
  object-fit: contain;
  display: block;
}

.xp-icon {
  width: 32px !important;
  height: 32px !important;
  object-fit: contain;
  margin-right: 10px;
}

.avatar-img {
  width: 64px !important;
  height: 64px !important;
  object-fit: contain;
  border: 2px inset #fff;
  background: #fff;
  margin-bottom: 5px;
}

.badge-grid img {
  width: 88px !important;
  height: 31px !important;
  display: block;
}

#bg-grid img {
  width: 88px !important;
  height: 31px !important;
  object-fit: fill;
  display: block;
}

/* ============================
   --- DESKTOP LAYOUT --- 
   ============================ */

/* Lock Desktop Body */
html, body {
  height: 100%;
  overflow: hidden; 
}

/* Background Animation */
#bg-grid {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  z-index: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  pointer-events: none;
  animation: slideGrid 60s linear infinite;
  font-size: 0;
  line-height: 0;
}

@keyframes slideGrid {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-88px, -31px); }
}

/* Layout Wrappers */
.screen-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  padding: 15px;
  display: flex;
  justify-content: center;
}

.layout-grid {
  display: flex;
  gap: 15px;
  width: 100%;
  max-width: 1100px;
  height: 100%; 
  align-items: stretch;
}

/* Sidebar */
.sidebar-col {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  overflow-y: auto; 
  padding-bottom: 5px;
}

/* Main Column */
.main-col {
  flex: 1; 
  min-width: 0; 
  display: flex;
  flex-direction: column;
  height: 100%;
}

.window {
  display: flex;
  flex-direction: column;
}

.main-col .window {
  height: 100%; 
  max-height: 100%;
}

.title-bar {
  padding: 5px 8px !important; 
  min-height: 30px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Content Area */
.content-scroll {
  flex: 1;
  background: #fff;
  padding: 20px;
  overflow-y: auto; 
  overflow-x: hidden;
  border-top: 1px solid #999;
}

/* IE Toolbar */
.ie-toolbar {
  background: #ECE9D8;
  border-bottom: 1px solid #999;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  height: 36px;
}

.address-container {
  flex: 1; 
  min-width: 0; 
  display: flex;
  background: #fff;
  border: 1px inset #ccc;
  align-items: center;
  padding: 2px;
  height: 24px;
}

.address-input {
  width: 100%;
  border: none;
  outline: none;
  font-family: 'Tahoma', sans-serif;
  font-size: 11px;
  background: transparent;
}

.toolbar-btn {
  flex-shrink: 0; 
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px; 
  padding: 2px 8px;
  height: 26px;
  font-family: 'Tahoma', sans-serif;
  font-size: 11px;
}

/* Content Components */
.bio-container {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.bio-text h2 {
  font-size: 18px;
  color: #003399;
  border-bottom: 2px solid #E66632;
  padding-bottom: 5px;
  margin-top: 0;
}

.xp-photo-frame {
  border: 2px inset #dfdfdf;
  background: #fff;
  padding: 4px;
  text-align: center;
  margin-top: auto;
}

.xp-photo-frame img {
  width: 100%;
  height: 200px;
  object-fit: fill; 
  border: 1px solid #000;
  display: block;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.detail-grid > div {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.detail-grid fieldset {
  flex: 1;
  margin-bottom: 10px;
}

/* --- INTEREST LIST LAYOUT (NEW) --- */
.interest-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.interest-item {
  border: 1px solid #ccc;
  padding: 10px;
  background: #fcfcfc;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.05);
}

.interest-header {
  font-size: 13px;
  font-weight: bold;
  color: #003399;
  border-bottom: 1px dotted #999;
  padding-bottom: 5px;
  margin-bottom: 10px;
}

.interest-body {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.interest-thumb {
  flex-shrink: 0;
  width: 120px;
  border: 2px inset #dfdfdf;
  padding: 2px;
  background: #fff;
}

.interest-thumb img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border: 1px solid #000;
  display: block;
}

.interest-desc {
  font-size: 11px;
  line-height: 1.5;
  color: #333;
}

/* Contact Grid Layout */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}
.contact-card {
  border: 1px solid #ccc;
  padding: 10px;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #000;
  background: #fff;
}

.text-center { text-align: center; }
.listening-to {
  display: flex;
  align-items: center;
  font-size: 10px;
  border: 1px inset #fff;
  background: #000;
  color: #0f0;
  padding: 2px;
  margin-top: 5px;
}
.badge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  justify-items: center;
}

/* Utilities */
.hidden { display: none !important; }
.clippy, .clippy-balloon { z-index: 9999 !important; position: fixed !important; }

/* ============================
   --- MOBILE OVERRIDES --- 
   ============================ */
@media (max-width: 800px) {
  
  html, body {
    height: auto;
    overflow-y: auto !important; 
    overflow-x: hidden;
  }

  .screen-wrapper {
    height: auto;
    display: block; 
    padding: 10px;
  }

  .layout-grid {
    flex-direction: column;
    height: auto;
  }

  .sidebar-col, .main-col, .content-scroll, .main-col .window {
    height: auto;
    overflow: visible;
  }
  
  .sidebar-col { margin-bottom: 20px; }

  .hidden {
    display: block !important;
    border-top: 2px solid #E66632; 
    margin-top: 30px;
    padding-top: 20px;
  }

  .ie-toolbar { display: none; }
  .title-bar-controls { display: none; }
  .status-bar { display: none; }

  .bio-container { flex-direction: column; align-items: center; text-align: center; }
  .detail-grid { grid-template-columns: 1fr; }
  
  /* Interest List Mobile */
  .interest-body { flex-direction: column; }
  .interest-thumb { width: 100%; }
  .interest-thumb img { height: 150px; }
}