@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #0a0a0a;
  color: #e5e5e5;
  height: 100vh;
  overflow: hidden;
}

.app {
  display: flex;
  height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: #111111;
  border-right: 1px solid #222;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 3rem;
}

.checker-logo {
  width: 32px;
  height: 32px;
  background: repeating-conic-gradient(#fff 0% 25%, #000 0% 50%);
  border-radius: 6px;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.sidebar li:hover,
.sidebar li.active {
  background: #222;
  color: white;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 3rem;
  overflow-y: auto;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* Create Screen */
.create-container {
  max-width: 720px;
  margin: 0 auto;
}

.create-container h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: #888;
  margin-bottom: 2rem;
}

.project-name {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 14px 16px;
  color: white;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

#html-input {
  width: 100%;
  height: 520px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 20px;
  color: #ddd;
  font-family: ui-monospace, monospace;
  font-size: 0.95rem;
  resize: none;
  line-height: 1.5;
}

.textarea-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.clipboard-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: #222;
  color: #aaa;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.clipboard-btn:hover {
  background: #333;
  color: #ddd;
  border-color: #666;
}

.clipboard-btn:active {
  transform: scale(0.97);
}

.save-btn {
  margin-top: 1.5rem;
  width: 100%;
  padding: 16px;
  background: white;
  color: black;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255,255,255,0.2);
}

/* Portfolio */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #222;
  transition: all 0.3s;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: #444;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.card-header {
  height: 160px;
  background: linear-gradient(135deg, #1a1a1a, #222);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.6;
}

.card-info {
  padding: 1.25rem;
}

.card-info h3 {
  margin-bottom: 0.5rem;
}

.meta {
  font-size: 0.85rem;
  color: #666;
  display: flex;
  justify-content: space-between;
}

/* Loader */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loader-container {
  text-align: center;
}

.loader {
  width: 60px;
  aspect-ratio: 1;
  margin: 0 auto 1.5rem;
  --g: conic-gradient(from -90deg at 10px 10px, #fff 90deg, #0000 0);
  background: var(--g), var(--g) 10px 10px, var(--g) 20px 20px;
  background-size: 50% 50%;
  animation: l15 1s infinite;
  border-radius: 4px;
}

@keyframes l15 {
  90%, 100% { background-position: -30px 30px, -20px 40px, -10px 50px; }
}

.loading-text {
  color: #aaa;
  font-size: 1.1rem;
}

/* Utilities */
.hidden { display: none !important; }
.danger-btn {
  background: #330000;
  color: #ff6666;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
}