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

/* גוף הדף ורקע */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  text-align: center;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #0a0e27 0%, #1a1d3a 50%, #2d1b4e 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

main {
  position: relative;
  z-index: 1;
}

/* כותרות */
h1, h2, h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
h1 {
  font-size: 3.5em;
  color: #ffffff;
  margin-top: 32px;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 0 40px rgba(100, 150, 255, 0.2);
}
h2 {
  font-size: 2em;
  color: #e8f0ff;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}
h3 {
  font-size: 1.3em;
  color: #d6e7ff;
}

/* פסקאות */
p {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.15em;
  color: #e0e9ff;
  line-height: 1.8;
  margin-bottom: 22px;
}

/* עיצוב תפריט ממורכז */
header {
  background: transparent;
  text-align: center;
  padding: 44px 0 24px 0;
}
nav {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 18px;
}

/* כפתורים ראשיים */
.menu-btn, .contact-btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 14px 36px;
  font-size: 1.1em;
  cursor: pointer;
  margin: 0 6px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4), 0 0 20px rgba(118, 75, 162, 0.2);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: inline-block;
}
.menu-btn:hover, .contact-btn:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6), 0 0 30px rgba(118, 75, 162, 0.3);
}
.menu-btn:active, .contact-btn:active {
  transform: translateY(0);
}

/* בלוק פרויקטים */
.project-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin: 0;
  padding: 0;
}
.project-card {
  background: rgba(118, 75, 162, 0.25);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 28px;
  margin: 0;
  min-width: 240px;
  max-width: 320px;
  flex: 1 1 260px;
  min-height: 140px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  color: inherit;
}
.project-card:hover {
  border: 2px solid rgba(102, 126, 234, 0.6);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4), 0 0 40px rgba(118, 75, 162, 0.3);
  background: rgba(118, 75, 162, 0.35);
  transform: translateY(-5px);
}
.project-card h3 {
  color: #ffffff;
  margin-bottom: 12px;
}
.project-card p {
  color: #d0d9ff;
  font-size: 1em;
}

/* מרווחים בין חלקים */
section {
  margin-bottom: 60px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 32px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* עיצוב טופס צור קשר */
#contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 330px;
  margin: 0 auto 52px auto;
  padding: 38px 36px 36px 36px;
  max-width: 540px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  border-radius: 24px;
  box-shadow: 0 8px 38px rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

#contact h2 {
  color: #ffffff;
  font-size: 2.2em;
  font-weight: 700;
  margin-bottom: 26px;
  letter-spacing: 1px;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

#contact-form {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

#contact-form input,
#contact-form textarea {
  font-family: 'Inter', sans-serif;
  font-size: 1.1em;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  padding: 14px 18px;
  width: 100%;
  resize: none;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

#contact-form input:focus,
#contact-form textarea:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(102, 126, 234, 0.6);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  outline: none;
}

#form-status {
  color: #ffffff;
  margin-top: 16px;
  font-weight: 500;
}

footer {
  color: rgba(255, 255, 255, 0.6);
  padding: 24px;
  margin-top: 40px;
  font-size: 0.95em;
}

/* ניצוצות ברקע */
#sparks-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.5) 30%, rgba(102, 126, 234, 0.3) 60%, transparent 100%);
  animation: sparkleFloat 15s linear forwards;
  opacity: 0.6;
}

@keyframes sparkleFloat {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0) scale(0) rotate(0deg);
  }
  5% {
    opacity: 0.6;
    transform: translateY(-5vh) translateX(5px) scale(1) rotate(90deg);
  }
  50% {
    opacity: 0.7;
    transform: translateY(-50vh) translateX(-8px) scale(1.1) rotate(180deg);
  }
  95% {
    opacity: 0.6;
    transform: translateY(-95vh) translateX(5px) scale(1) rotate(270deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) translateX(0) scale(0) rotate(360deg);
  }
}

.sparkle.large {
  width: 6px;
  height: 6px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5), 0 0 15px rgba(118, 75, 162, 0.4), 0 0 20px rgba(102, 126, 234, 0.3);
}

.sparkle.medium {
  width: 5px;
  height: 5px;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.4), 0 0 12px rgba(102, 126, 234, 0.3);
}

.sparkle:not(.large):not(.medium) {
  width: 3px;
  height: 3px;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.3), 0 0 10px rgba(102, 126, 234, 0.2);
}

/* Project Detail Page Styles */
.project-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.back-button {
  display: inline-block;
  margin-bottom: 30px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 20px;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.back-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.project-header {
  margin-bottom: 40px;
  text-align: left;
}

.project-header h1 {
  font-size: 3em;
  margin-bottom: 20px;
}

.project-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.project-meta span {
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9em;
  color: #e0e9ff;
}

.project-content {
  display: grid;
  gap: 30px;
}

.project-section {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.project-section h2 {
  color: #ffffff;
  margin-bottom: 20px;
  font-size: 2em;
}

.project-section p, .project-section li {
  color: #e0e9ff;
  line-height: 1.8;
  margin-bottom: 15px;
}

.project-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.project-image {
  width: 100%;
  border-radius: 15px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.project-image:hover {
  transform: scale(1.02);
}

.code-block {
  background: rgba(0, 0, 0, 0.4);
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid #667eea;
  margin: 20px 0;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  color: #d0d9ff;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  line-height: 1.6;
}

.features-list {
  list-style: none;
  padding: 0;
}

.features-list li {
  padding-left: 30px;
  position: relative;
  margin-bottom: 15px;
}

.features-list li:before {
  content: "✨";
  position: absolute;
  left: 0;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.tech-tag {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 6px 14px;
  border-radius: 15px;
  font-size: 0.85em;
  color: white;
  font-weight: 500;
}

/* Code File Viewer */
.code-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 20px 0;
}

.code-file-btn {
  background: rgba(102, 126, 234, 0.3);
  border: 2px solid rgba(102, 126, 234, 0.5);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  font-size: 0.95em;
  transition: all 0.3s ease;
}

.code-file-btn:hover {
  background: rgba(102, 126, 234, 0.5);
  border-color: rgba(102, 126, 234, 0.8);
  transform: translateY(-2px);
}

.code-file-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
}

.code-viewer {
  margin-top: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.code-viewer-header {
  background: rgba(0, 0, 0, 0.5);
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-viewer-header span {
  color: #e0e9ff;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  font-size: 0.95em;
}

.code-viewer-content {
  max-height: 600px;
  overflow: auto;
  background: rgba(0, 0, 0, 0.4);
}

.code-viewer-content pre {
  margin: 0;
  padding: 20px;
  color: #d0d9ff;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  user-select: text;
  -webkit-user-select: text;
}

.code-viewer-content code {
  color: #d0d9ff;
  background: transparent;
}

/* Scrollbar styling for code viewer */
.code-viewer-content::-webkit-scrollbar {
  width: 10px;
}

.code-viewer-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

.code-viewer-content::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.5);
  border-radius: 5px;
}

.code-viewer-content::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.7);
}

