/* Reset and base terminal setup */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: #0d0d0d;
  font-family: 'Courier New', Courier, monospace;
  color: #e6e6e6;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Main Container Window */
.terminal-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 90vh;
  width: 92vw;
  max-width: 1000px;
  padding: 2rem 1.5rem;
  background: linear-gradient(180deg, #181818 0%, #0d0d0d 100%);
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
}

.terminal-header {
  width: 100%;
  text-align: left;
}

.welcome-text {
  font-size: 1rem;
  color: #888888;
  letter-spacing: 1px;
}

/* ASCII Banner */
.ascii-banner {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  font-weight: bold;
  line-height: 1.15;
  background: linear-gradient(180deg, #ffffff 0%, #777777 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: pre;
  text-align: center;
  margin: 0.5rem 0;
}

/* Header Name */
.main-name {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 3px;
  color: #ffffff;
  text-align: center;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Folder Explorer Grid */
.folders-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  width: 100%;
  margin: auto 0;
  padding: 1rem 0;
}

.folder-card {
  background: linear-gradient(180deg, #222222 0%, #141414 100%);
  border: 1px solid #333333;
  border-radius: 8px;
  padding: 1.25rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
}

.folder-card:hover {
  border-color: #ffffff;
  background: linear-gradient(180deg, #2d2d2d 0%, #1a1a1a 100%);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}

.folder-icon {
  font-size: 3.5rem;
  color: #cccccc;
  margin-bottom: 0.75rem;
  transition: color 0.2s ease;
}

.folder-card:hover .folder-icon {
  color: #ffffff;
}

.folder-label {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  font-weight: bold;
  color: #cccccc;
  text-align: center;
  letter-spacing: 0.5px;
}

/* Bottom Center Dock */
.bottom-dock {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 0.5rem;
}

.social-icons {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.social-icons a {
  color: #666666;
  font-size: 1.8rem;
  transition: all 0.25s ease-in-out;
}

.social-icons a:hover {
  color: #ffffff;
  transform: translateY(-3px);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

/* Modal Document Viewer Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  width: 90vw;
  max-width: 850px;
  height: 80vh;
  background-color: #121212;
  border: 1px solid #333333;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.modal-top-bar {
  background-color: #1f1f1f;
  border-bottom: 1px solid #333333;
  padding: 0.8rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 0.95rem;
  font-weight: bold;
  color: #ffffff;
  letter-spacing: 1px;
}

.close-btn {
  background: transparent;
  border: 1px solid #555555;
  color: #cccccc;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background-color: #ffffff;
  color: #000000;
}

.markdown-body {
  padding: 2rem;
  overflow-y: auto;
  color: #dddddd;
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.6;
}

/* Custom scrollbar inside modal */
.markdown-body::-webkit-scrollbar {
  width: 8px;
}

.markdown-body::-webkit-scrollbar-track {
  background: #121212;
}

.markdown-body::-webkit-scrollbar-thumb {
  background: #333333;
  border-radius: 4px;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  color: #ffffff;
  margin-top: 1.2rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 0.3rem;
}

.markdown-body p {
  margin-bottom: 1rem;
}

.markdown-body img {
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid #333333;
  margin: 1rem 0;
}

.markdown-body code {
  background-color: #1e1e1e;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
}

/* Responsive Grid layout for small screens */
@media (max-width: 820px) {
  .folders-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .ascii-banner {
    font-size: 0.45rem;
  }
  .main-name {
    font-size: 1.1rem;
  }
}