/* AMKYAW.DEV - Main Stylesheet */

/* CSS Variables */
:root {
  --primary-color: #00d4aa;
  --secondary-color: #7c3aed;
  --dark-bg: #0f0f1a;
  --card-bg: #1a1a2e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --border-color: #2a2a4a;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --glass-bg: rgba(26, 26, 46, 0.8);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Three.js Canvas Background */
#three-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Content Overlay */
.content-overlay {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* Navbar */
.navbar {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  transition: var(--transition);
}

.navbar.is-fixed {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color) !important;
  letter-spacing: 2px;
}

.navbar-item {
  color: var(--text-primary) !important;
  transition: var(--transition);
  position: relative;
}

.navbar-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
  transform: translateX(-50%);
}

.navbar-item:hover::after,
.navbar-item.is-active::after {
  width: 100%;
}

.navbar-item:hover {
  background: transparent !important;
  color: var(--primary-color) !important;
}

.navbar-burger {
  color: var(--text-primary);
}

.navbar-burger span {
  background-color: currentColor;
}

/* Buttons */
.button {
  border-radius: 8px;
  font-weight: 600;
  transition: var(--transition);
  border: none;
}

.button.is-primary {
  background: linear-gradient(135deg, var(--primary-color), #00a88a) !important;
  color: var(--dark-bg) !important;
}

.button.is-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 212, 170, 0.4);
}

.button.is-secondary {
  background: linear-gradient(135deg, var(--secondary-color), #5b21b6) !important;
  color: white !important;
}

.button.is-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

.button.is-outline {
  background: transparent !important;
  border: 2px solid var(--primary-color) !important;
  color: var(--primary-color) !important;
}

.button.is-outline:hover {
  background: var(--primary-color) !important;
  color: var(--dark-bg) !important;
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition);
}

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

.card-image {
  position: relative;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: var(--transition);
}

.card:hover .card-image img {
  transform: scale(1.1);
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.card-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Inputs */
.input, .textarea, .select select {
  background: var(--card-bg) !important;
  border: 2px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: 8px !important;
  transition: var(--transition);
}

.input:focus, .textarea:focus, .select select:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.2) !important;
}

.input::placeholder {
  color: var(--text-secondary) !important;
}

.label {
  color: var(--text-primary) !important;
  font-weight: 600;
}

/* Section Styles */
.section {
  padding: 4rem 2rem;
  min-height: calc(100vh - 52px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

/* Hero Section */
.hero-section {
  min-height: calc(100vh - 52px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.hero-title {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  animation: fadeInUp 1s ease-out 0.4s both;
}

/* Login Form */
.login-container {
  max-width: 450px;
  margin: 0 auto;
  padding: 2.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  animation: fadeInUp 0.8s ease-out;
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

/* Chat Widget */
.chat-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

.chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), #00a88a);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(0, 212, 170, 0.4);
  transition: var(--transition);
  animation: pulse 2s infinite;
}

.chat-toggle:hover {
  transform: scale(1.1);
}

.chat-toggle svg {
  width: 28px;
  height: 28px;
  fill: var(--dark-bg);
}

.chat-box {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  height: 500px;
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease-out;
}

.chat-box.is-open {
  display: flex;
}

.chat-header {
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary-color), #00a88a);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header h3 {
  color: var(--dark-bg);
  font-weight: 700;
  margin: 0;
}

.chat-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

.chat-close svg {
  width: 20px;
  height: 20px;
  fill: var(--dark-bg);
}

.chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-message {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  animation: fadeIn 0.3s ease-out;
}

.chat-message.user {
  align-self: flex-end;
  background: var(--primary-color);
  color: var(--dark-bg);
}

.chat-message.other {
  align-self: flex-start;
  background: var(--border-color);
}

.chat-message .username {
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  opacity: 0.8;
}

.chat-message .text {
  font-size: 0.9rem;
}

.chat-input-area {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.5rem;
}

.chat-input-area .input {
  flex: 1;
}

.chat-input-area .button {
  padding: 0.5rem 1rem;
}

/* Modal */
.modal-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
}

.modal-card-head {
  background: var(--border-color);
  border-bottom: none;
  padding: 1.5rem;
}

.modal-card-title {
  color: var(--text-primary);
  font-weight: 700;
}

.modal-card-body {
  background: var(--card-bg);
  padding: 1.5rem;
}

.modal-card-foot {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 1rem;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Admin Panel */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Code Editor */
.code-editor {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.code-header {
  background: var(--border-color);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dot.red { background: #ff5f56; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #27c93f; }

.code-body {
  padding: 1rem;
  min-height: 300px;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.code-textarea {
  width: 100%;
  min-height: 300px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  resize: vertical;
  outline: none;
}

/* Tags */
.tag {
  border-radius: 20px;
  font-weight: 600;
}

.tag.is-primary {
  background: rgba(0, 212, 170, 0.2) !important;
  color: var(--primary-color) !important;
}

.tag.is-secondary {
  background: rgba(124, 58, 237, 0.2) !important;
  color: var(--secondary-color) !important;
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: 0;
  top: 52px;
  width: 250px;
  height: calc(100vh - 52px);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-color);
  padding: 2rem 1rem;
  transform: translateX(-100%);
  transition: var(--transition);
  z-index: 99;
}

.sidebar.is-open {
  transform: translateX(0);
}

.sidebar-menu {
  list-style: none;
}

.sidebar-item {
  margin-bottom: 0.5rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: var(--transition);
}

.sidebar-link:hover,
.sidebar-link.is-active {
  background: var(--border-color);
  color: var(--primary-color);
}

.sidebar-link svg {
  width: 20px;
  height: 20px;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 52px;
  left: 0;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem;
  display: none;
  z-index: 98;
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 8px;
  transition: var(--transition);
}

.mobile-menu a:hover {
  background: var(--border-color);
  color: var(--primary-color);
}

/* Footer */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
}

.footer a {
  color: var(--primary-color);
  text-decoration: none;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.4);
  }
  50% {
    box-shadow: 0 8px 35px rgba(0, 212, 170, 0.6);
  }
}

/* Utilities */
.has-text-primary-custom {
  color: var(--primary-color) !important;
}

.has-text-secondary-custom {
  color: var(--text-secondary) !important;
}

.bg-glass {
  background: var(--glass-bg);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Responsive */
@media screen and (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .chat-box {
    width: calc(100vw - 40px);
    right: -10px;
    height: 400px;
  }
  
  .sidebar {
    width: 100%;
  }
  
  .login-container {
    margin: 1rem;
    padding: 1.5rem;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Selection */
::selection {
  background: var(--primary-color);
  color: var(--dark-bg);
}
