/* ============================= */
/* GLOBAL RESET */
/* ============================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Garamond", system-ui, -apple-system, sans-serif;
}

body {
  background-color: #0d1117;
  color: #e6edf3;
  display: flex;
  height: 100vh;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);

  background-size: 40px 40px;
}

/* ============================= */
/* LAYOUT */
/* ============================= */

.app-container {
  display: flex;
  width: 100%;
}

/* ============================= */
/* SIDEBAR */
/* ============================= */

.sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    90deg,
    #00f5d4,
    #7c3aed,
    #00f5d4
  );
  background-size: 200% 100%;
  animation: gradientShift 6s linear infinite;
}

.sidebar {
  position: relative;
  width: 240px;
  background: #11161c;
  border-right: 1px solid #1f2933;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
}

@keyframes gradientShift {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

.sidebar h2 {
  font-size: 1.2rem;
  letter-spacing: 2px;
  margin-bottom: 2rem;
  color: #00f5d4;
  text-transform: uppercase;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  padding: 0.8rem 1rem;
  margin-bottom: 0.4rem;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  color: #8b949e;
}

.sidebar li:hover {
  background: #161b22;
  color: #e6edf3;
}

.sidebar li.active {
  background: #161b22;
  color: #00f5d4;
  border-left: 3px solid #00f5d4;
}

/* ============================= */
/* MAIN VIEW */
/* ============================= */

.main-view {
  flex: 1;
  padding: 2rem 3rem;
  overflow-y: auto;
}

h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  letter-spacing: 1px;
  padding: 1rem 1rem;
}

/* ============================= */
/* DASHBOARD */
/* ============================= */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 0rem 1rem;
}

.dashboard-card {
  background: #161b22;
  border: 1px solid #1f2933;
  padding: 1.5rem;
  border-radius: 10px;
  transition: 0.2s ease;
}

.dashboard-card:hover {
  border-color: #00f5d4;
}

.dashboard-card h3 {
  font-size: 0.9rem;
  color: #8b949e;
  margin-bottom: 0.5rem;
}

.dashboard-card p {
  font-size: 1.8rem;
  font-weight: 600;
}

/* ============================= */
/* CONTROLS */
/* ============================= */

.controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 0rem 1rem;
}

.controls input,
.controls select {
  background: #161b22;
  border: 1px solid #1f2933;
  color: #e6edf3;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  outline: none;
  transition: border 0.2s ease;
}

.controls input:focus,
.controls select:focus {
  border-color: #00f5d4;
}

/* ============================= */
/* NOTE FORM */
/* ============================= */

.note-form-section {
  margin-bottom: 2rem;
  padding: 0rem 1rem;
}

#noteForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #161b22;
  padding: 1.5rem;
  border-radius: 10px;
  border: 1px solid #1f2933;
}

#noteForm input,
#noteForm textarea,
#noteForm select {
  background: #0d1117;
  border: 1px solid #1f2933;
  padding: 0.8rem;
  border-radius: 6px;
  color: #e6edf3;
  outline: none;
}

#noteForm textarea {
  resize: vertical;
  min-height: 100px;
}

#noteForm input:focus,
#noteForm textarea:focus,
#noteForm select:focus {
  border-color: #00f5d4;
}

#noteForm button {
  align-self: flex-start;
  background: transparent;
  border: 1px solid #00f5d4;
  color: #00f5d4;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s ease;
}

#noteForm button:hover {
  background: #00f5d4;
  color: #0d1117;
}

/* ============================= */
/* NOTES GRID */
/* ============================= */

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 0rem 1rem;
}

.note-card {
  backdrop-filter: blur(6px);
  background: rgba(22, 27, 34, 0.85);
  border: 1px solid #1f2933;
  padding: 1.2rem;
  border-radius: 10px;
  transition: 0.2s ease;
  position: relative;
}

.note-card:hover {
  border-color: #7c3aed;
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.4),
    0 8px 25px rgba(0, 0, 0, 0.6);
  transform: translateY(-3px);
}

.note-card h3 {
  margin-bottom: 0.6rem;
}

.note-card p {
  font-size: 0.9rem;
  color: #8b949e;
  margin-bottom: 1rem;
}

.note-card .tag {
  font-size: 0.75rem;
  color: #00f5d4;
  border: 1px solid #00f5d4;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Delete button */

.delete-note {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: #8b949e;
  cursor: pointer;
  font-size: 0.8rem;
}

.delete-note:hover {
  color: #ff4d4d;
}


#playgroundTitle::after,
#projectsTitle::after,
#resourcesTitle::after,
#notesTitle::after,
#terminalTitle::after {
  content: "_";
  margin-left: 5px;
  animation: blink 1s infinite;
}

/* ============================= */
/* PLAYGROUND */
/* ============================= */

.playground-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  height: 80vh;
  padding: 0rem 1rem;
}

.editor-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.editor-panel label {
  font-size: 0.8rem;
  color: #8b949e;
  letter-spacing: 1px;
}

.editor-panel textarea {
  background: #161b22;
  border: 1px solid #1f2933;
  color: #e6edf3;
  padding: 1rem;
  border-radius: 8px;
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
  resize: yes;
  height: 150px;
}

.editor-panel textarea:focus {
  border-color: #00f5d4;
  outline: none;
}

.preview-panel {
  background: #11161c;
  border: 1px solid #1f2933;
  border-radius: 10px;
  overflow: hidden;
}

#previewFrame {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
}

.playground-container {
  display: flex;
  gap: 1rem;
}

.editor-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.editor {
  height: 200px;
  border: 1px solid #1f2933;
  border-radius: 8px;
  overflow: hidden;
  resize: vertical;
}

.preview-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 50em;
  width: 50em;
}

.console-panel {
  height: 150px;
  background: #0d1117;
  border-top: 1px solid #1f2933;
  padding: 0.5rem;
  font-family: monospace;
  overflow-y: auto;
}

.editor-block {
  position: relative;
}

textarea {
  line-height: 1.5;
  padding-left: 3rem;
}

.editor-block::before {
  content: " ";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2.5rem;
  background: #11161c;
  border-right: 1px solid #1f2933;
}