/* 🌐 Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #f8fafc;
  line-height: 1.8;
  font-size: 16px;
  padding: 20px;
  animation: bgPulse 15s infinite alternate;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 40px;
}

.header-logo {
  width: 150px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.header-logo:hover {
  transform: scale(1.1) rotate(-10deg);
}

/* First section (welcome text) */
.first {
  text-align: center;
  padding: 30px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  animation: fadeInUp 1s ease;
}

.first h1 {
  font-size: 2.5rem;
  color: #3b82f6;
  margin-bottom: 15px;
  text-shadow: 0 0 10px #60a5fa;
}

.first p {
  font-size: 1.1rem;
  color: #f1f5f9;
  margin-bottom: 10px;
}

/* Grid section */
.grid {
  color: #f1f5f9;
  font-size: 1.4rem;
  position: relative;
  margin-top: 25px;
  animation: fadeInUp 1s ease;
}

/* Headers */
h1, h2, h3 {
  margin-bottom: 15px;
  font-weight: bold;
  animation: fadeInDown 0.8s ease;
}

h1 {
  font-size: 2rem;
  color: #4f46e5;
  text-shadow: 0 0 10px #6366f1;
}

h2 {
  color: #f1f5f9;
  font-size: 1.4rem;
  position: relative;
}

h2::before {
  content: "✨";
  position: absolute;
  left: -25px;
  animation: bounce 2s infinite;
}

/* Links */
a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: bold;
}

a:hover {
  text-decoration: underline;
}

/* Buttons */
button, .btn {
  display: inline-block;
  margin-top: 12px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

button:hover, .btn:hover {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  transform: translateY(-2px) scale(1.05);
}

/* Inputs */
input, textarea, select {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  margin-bottom: 15px;
  border: 1px solid #475569;
  border-radius: 6px;
  font-size: 15px;
  background: #1e293b;
  color: #f1f5f9;
}

/* Containers */
.container {
  max-width: 900px;
  margin: auto;
  background: rgba(255,255,255,0.05);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  animation: fadeInUp 0.8s ease;
  backdrop-filter: blur(8px);
}

/* Code editor style */
.code-editor {
  margin-top: 30px;
  background: #1e1e2f;
  border-radius: 12px;
  padding: 15px;
  color: #f8f8f2;
}

.code-editor textarea {
  width: 100%;
  height: 200px;
  background: #1e1e2f;
  color: #f8f8f2;
  border: none;
  outline: none;
  font-family: monospace;
  font-size: 15px;
  border-radius: 8px;
  padding: 10px;
  resize: vertical;
}

/* iframe for Try it Yourself */
iframe {
  margin-top: 15px;
  width: 100%;
  height: 250px;
  border: 1px solid #475569;
  border-radius: 10px;
  background: #1e293b;
}

/* Tables */
table {
  border-collapse: collapse;
  margin-top: 15px;
  width: 100%;
}

th, td {
  border: 1px solid #475569;
  padding: 10px;
  text-align: left;
}

th {
  background: #1e293b;
  color: #f1f5f9;
}

/* Footer */
.footer {
  margin-top: 50px;
  text-align: center;
  color: #cbd5e1;
  font-size: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.footer img {
  width: 25px;
  height: 25px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.footer img:hover {
  transform: scale(1.2);
}



/* responsive smaller */
@media (max-width:480px){
  .site-alert { left: 50%; padding: 12px 14px; min-width: 200px; }
  .site-alert .title { font-size: 13px; }
  .site-alert .msg { font-size: 12px; }
}


/* Animations */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes bgPulse {
  0% { background: linear-gradient(135deg, #0f172a, #1e293b); }
  50% { background: linear-gradient(135deg, #1e3a8a, #1e293b); }
  100% { background: linear-gradient(135deg, #0f172a, #1e293b); }
}
