/* Import Lato font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap');

/* Upload Zone Styles */
.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: var(--bg-secondary);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.upload-zone:hover {
  border-color: var(--primary-accent, #3FA9F5);
  background-color: var(--bg-elevated, #f0f8ff);
}

.upload-zone.drag-over {
  border-color: var(--primary-accent, #3FA9F5);
  background-color: var(--bg-elevated, #e6f4ff);
  border-width: 3px;
}

.upload-placeholder {
  color: var(--text-muted);
  width: 100%;
}

.upload-placeholder i {
  font-size: 3rem;
  display: block;
  margin-bottom: 10px;
  opacity: 0.5;
}

.upload-placeholder p {
  margin: 10px 0 5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.upload-placeholder small {
  display: block;
  font-size: 0.85rem;
}

.upload-preview {
  width: 100%;
  position: relative;
}

.upload-preview img {
  max-width: 100%;
  max-height: 150px;
  border-radius: 4px;
  object-fit: contain;
}

.btn-remove-image,
.btn-remove-file {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--error, #E74C3C);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  padding: 0;
  cursor: pointer;
  color: white;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  z-index: 10;
}

.btn-remove-image:hover,
.btn-remove-file:hover {
  transform: scale(1.1);
}

.upload-zone-multiple .upload-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  width: 100%;
}

.upload-gallery-item {
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 5px;
  background-color: var(--bg-card);
}

.upload-gallery-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
}

.upload-gallery-item .btn-remove-image {
  top: 0;
  right: 0;
}

.upload-zone-download {
  min-height: 120px;
}

.upload-preview-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background-color: var(--bg-card);
  border-radius: 4px;
  position: relative;
  width: 100%;
}

.upload-preview-file i {
  font-size: 2rem;
  color: var(--primary-accent, #3FA9F5);
}

.upload-preview-file .file-name {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-zone.uploading {
  pointer-events: none;
  opacity: 0.6;
}

.upload-zone.uploading::after {
  content: "Uploading...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--primary-accent, #3FA9F5);
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 600;
  z-index: 100;
}

/* Theme Variables */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --text-primary: #333333;
  --text-secondary: #555555;
  --text-muted: #6c757d;
  --border-color: #ddd;
  --shadow: rgba(0, 0, 0, 0.08);
  --shadow-hover: rgba(0, 0, 0, 0.15);
}

/* Serialcoder Dark Pro Theme */
html[data-theme="dark"] {
  --bg-primary: #0C0D10;
  --bg-secondary: #16181D;
  --bg-card: #16181D;
  --bg-elevated: #1F2228;
  --text-primary: #FFFFFF;
  --text-body: #D6D7DA;
  --text-secondary: #D6D7DA;
  --text-muted: #9FA3A9;
  --text-disabled: #64676D;
  --border-color: #2A2D33;
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(0, 0, 0, 0.5);
  --primary-accent: #3FA9F5;
  --secondary-accent: #63D5FF;
  --highlight: #00E4B8;
  --link-color: #5DB7FF;
  --success: #2ECC71;
  --warning: #F1C40F;
  --error: #E74C3C;
  --info: #3498DB;
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin-bottom: 60px;
  font-family: 'Lato', sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Toggle Button Styles */
#theme-toggle {
  color: #fff;
  font-size: 1.2rem;
  padding: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease;
}

#theme-toggle:hover {
  transform: scale(1.1);
}

#theme-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* ---- HERO SECTION ---- */

.hero {
    position: relative;
    width: 100%;
    padding: 160px 20px 70px;   /* reduced bottom padding from 100px to 70px */
    background: radial-gradient(
        circle at center,
        rgba(63, 169, 245, 0.10) 0%,
        #0C0D10 65%
    );
    text-align: center;
    overflow: hidden;
}

/* Breadcrumb in hero section */
.hero .breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 0 1rem 0 !important;
    justify-content: center;
}

.hero .breadcrumb-item a {
    color: #3FA9F5 !important;
    text-decoration: none;
}

.hero .breadcrumb-item a:hover {
    color: #63D5FF !important;
}

.hero .breadcrumb-item.active {
    color: #9da1a8 !important;
}

.hero .breadcrumb-item + .breadcrumb-item::before {
    color: #9da1a8 !important;
}

/* main title */
.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

/* subtitle */
.hero-subtitle {
    font-size: 1.35rem;
    color: #c3c7ce;
    font-weight: 400;
    margin-bottom: 3.5rem;
}

/* description */
.hero-description {
    font-size: 1.1rem;
    color: #9da1a8;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ---- SUBTLE GRID OVERLAY ---- */
.hero-grid-overlay {
    pointer-events: none;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.25;
    animation: gridFloat 24s linear infinite;
}

/* subtle motion for premium feel */
@keyframes gridFloat {
    from { transform: translateY(0px); }
    to { transform: translateY(-80px); }
}

/* Content Sections */
.content-section {
  padding: 60px 0;
}

/* -= SECTION WRAPPER =- */

.section {
    position: relative;
    padding: 80px 20px 100px;
}

/* subtle top divider to break from hero */
.section::before {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 70px;
}

/* -= GRID LAYOUT =- */

.section-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

/* -= TEXT SIDE =- */

.section-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: #3FA9F5;
    margin-bottom: 26px;
}

.section-text {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 22px;
    color: #c3c7ce;
}

/* -= IMAGE SIDE =- */

.section-image {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.35);
    opacity: 0.95;
    transition: opacity 0.3s ease;
}

.section-image:hover {
    opacity: 1;
}

/* -= RESPONSIVE =- */

@media (max-width: 768px) {
    .section {
        padding: 60px 20px 80px;
    }

    .section::before {
        margin-bottom: 50px;
    }

    .section-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-text {
        font-size: 1.05rem;
    }
}

.content-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: #1e3c72;
}

html[data-theme="dark"] .content-section h2 {
  color: var(--primary-accent);
}

.content-section h3 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #2a5298;
}

html[data-theme="dark"] .content-section h3 {
  color: var(--primary-accent);
}

.content-section p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.content-section ul {
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Alternating content layout */
.content-row {
  margin-bottom: 80px;
}

.content-row:last-child {
  margin-bottom: 0;
}

.content-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Image Placeholder Styling */
.image-placeholder {
  position: relative;
  width: 100%;
  min-height: 400px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

html[data-theme="dark"] .image-placeholder {
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-secondary) 100%);
}

.image-placeholder img {
  display: block;
  width: 100%;
  height: auto;
}

.image-placeholder .placeholder-text {
  display: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
  transition: color 0.3s ease;
}

.image-placeholder.show-placeholder .placeholder-text {
  display: block;
}

/* Navigation updates */
.navbar-dark {
  background: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

.navbar-logo {
  height: 50px;
  width: auto;
  max-width: 250px;
}

@media (max-width: 576px) {
  .navbar-logo {
    height: 40px;
  }
}

/* Focus styles */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--primary-accent);
}

/* Form styles */
.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Footer */
.footer {
  color: #E8EAED;  /* very light for maximum readability */
  background: #08090B;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px 0;
  font-size: 0.95rem;
  text-align: center;
  transition: background-color 0.3s ease;
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, #0C0D10 0%, #121418 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
  margin-bottom: 60px;
  border-radius: 20px;
  margin-left: 15px;
  margin-right: 15px;
  position: relative;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border-color);
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
  border-radius: 20px;
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.page-header .lead {
  font-size: 1.2rem;
  font-weight: 300;
  max-width: 700px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .page-header {
    padding: 60px 0;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .page-header .lead {
    font-size: 1.1rem;
  }
}

/* Project Cards */
.project-card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px var(--shadow-hover);
}

.project-image-container {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: var(--bg-secondary);
  position: relative;
  transition: background-color 0.3s ease;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e3c72;
  margin-bottom: 15px;
  transition: color 0.3s ease;
}

html[data-theme="dark"] .project-content h3 {
  color: var(--primary-accent);
}

.project-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 20px;
  flex-grow: 1;
  transition: color 0.3s ease;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tag {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1565c0;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 20px;
  transition: all 0.2s ease;
}

html[data-theme="dark"] .tag {
  background: rgba(63, 169, 245, 0.15);
  color: var(--secondary-accent);
  border: 1px solid rgba(63, 169, 245, 0.3);
}

.tag:hover {
  background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
  transform: scale(1.05);
}

html[data-theme="dark"] .tag:hover {
  background: rgba(63, 169, 245, 0.25);
  border-color: var(--secondary-accent);
}

/* Project links container */
.project-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 15px;
}

/* Project link */
.project-link {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(180deg, var(--primary-accent) 0%, #2484CF 100%);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
}

.project-link:hover {
  background: linear-gradient(180deg, var(--secondary-accent) 0%, var(--primary-accent) 100%);
  transform: translateX(5px);
  color: white;
  box-shadow: 0 4px 12px rgba(63, 169, 245, 0.4);
}

.project-link-download {
  background: linear-gradient(180deg, var(--success) 0%, #27AE60 100%);
}

.project-link-download:hover {
  background: linear-gradient(180deg, #27AE60 0%, var(--success) 100%);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
}

/* Project image placeholder */
.project-image-container .image-placeholder {
  height: 100%;
  min-height: auto;
}

/* Contact Page Styles */
.contact-block {
  background: #14161A;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 60px 40px;
  max-width: 900px;
  margin: 80px auto;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.contact-block h2 {
  font-size: 2rem;
  margin-bottom: 16px;
  color: #3FA9F5;
}

.contact-email {
  font-size: 1.4rem;
  color: #63B3FF;
  text-decoration: none;
}

.contact-email:hover {
  text-decoration: underline;
}

.contact-desc {
  margin-top: 20px;
  font-size: 1.1rem;
  color: #AEB3BB;
}

/* Login Page Styles */
.login-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 20px var(--shadow-hover);
  margin-top: 20px;
  transition: background-color 0.3s ease;
}

.login-card .form-label {
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.login-card .form-control {
  padding: 12px;
  font-size: 1rem;
}

.login-card .btn {
  padding: 12px;
  font-size: 1rem;
  margin-top: 10px;
}

/* Admin Page Styles */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 2px solid var(--border-color);
  transition: border-color 0.3s ease;
}

.admin-card {
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 4px 20px var(--shadow);
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.admin-card-header {
  background: linear-gradient(180deg, var(--primary-accent) 0%, #2484CF 100%);
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-card-header h4 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.admin-card-body {
  padding: 25px;
}

.form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

.form-control {
  border-radius: 6px;
  border: 1px solid var(--border-color);
  padding: 10px 15px;
  background-color: var(--bg-card);
  color: var(--text-primary);
  transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 0.2rem rgba(63, 169, 245, 0.25);
}

.btn {
  border-radius: 6px;
  padding: 10px 20px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(180deg, var(--primary-accent) 0%, #2484CF 100%);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(180deg, var(--secondary-accent) 0%, var(--primary-accent) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(63, 169, 245, 0.4);
}

.btn-success {
  background: linear-gradient(180deg, var(--success) 0%, #27AE60 100%);
  border: none;
}

.btn-success:hover {
  background: linear-gradient(180deg, #27AE60 0%, var(--success) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
}

.btn-danger {
  background: linear-gradient(180deg, var(--error) 0%, #C0392B 100%);
  border: none;
}

.btn-danger:hover {
  background: linear-gradient(180deg, #C0392B 0%, var(--error) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.btn-secondary {
  background: linear-gradient(180deg, #64676D 0%, #4A4D52 100%);
  border: none;
}

.btn-secondary:hover {
  background: linear-gradient(180deg, #4A4D52 0%, #64676D 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 103, 109, 0.4);
}

/* E-commerce / Purchase Styles */
.project-image-container {
  position: relative;
}

.price-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(135deg, #00E4B8 0%, #00B896 100%);
  color: #0C0D10;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0, 228, 184, 0.4);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
}

.price-badge i {
  font-size: 0.9rem;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.project-header h3 {
  margin: 0;
  flex: 1;
}

.for-sale-badge {
  background: linear-gradient(135deg, #3FA9F5 0%, #2484CF 100%);
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(63, 169, 245, 0.3);
  animation: pulse-badge 2s infinite;
}

.for-sale-badge i {
  font-size: 0.7rem;
}

@keyframes pulse-badge {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(63, 169, 245, 0.3);
  }
  50% {
    box-shadow: 0 2px 12px rgba(63, 169, 245, 0.6);
  }
}

/* Admin Purchase Configuration Styles */
.purchase-config-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid rgba(63, 169, 245, 0.2);
  background: rgba(0, 228, 184, 0.02);
  padding: 1.5rem;
  border-radius: 8px;
}

.purchase-config-section .section-title {
  color: #00E4B8;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.purchase-config-section .section-title i {
  font-size: 1.2rem;
}

.purchase-config-section .form-check-input:checked {
  background-color: #00E4B8;
  border-color: #00E4B8;
}

.purchase-config-section .form-switch .form-check-input {
  width: 3em;
  height: 1.5em;
}

.purchase-fields {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(22, 24, 29, 0.5);
  border-radius: 8px;
  border: 1px solid rgba(63, 169, 245, 0.1);
  transition: all 0.3s ease;
}

.purchase-fields .text-danger {
  color: #E74C3C;
}

.purchase-fields .badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  vertical-align: middle;
}

.purchase-fields .alert-info {
  background: rgba(63, 169, 245, 0.1);
  border-color: rgba(63, 169, 245, 0.2);
  color: #D6D7DA;
}

.purchase-fields .alert-info strong {
  color: #3FA9F5;
}