/* ========================================

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');



:root {

  --black: #0a0a0a;

  --dark: #111111;

  --card: #161616;

  --border: rgba(255,255,255,0.08);

  --white: #f5f5f5;

  --muted: #888888;

  --radius: 12px;

  --shadow: 0 2px 16px rgba(0,0,0,0.3);

  --shadow-hover: 0 8px 32px rgba(0,0,0,0.5);

}



* {

  margin: 0;

  padding: 0;

  box-sizing: border-box;

}



body {

  font-family: 'Inter', 'Poppins', sans-serif;

  background: var(--black);

  color: var(--white);

  line-height: 1.6;

  min-height: 100vh;

  overflow-x: hidden;

}





/* Header matches site */


:root {

  --black: #0a0a0a;

  --dark: #111111;

  --card: #161616;

  --border: rgba(255,255,255,0.08);

  --white: #f5f5f5;

  --muted: #888888;

  --radius: 12px;

  --shadow: 0 2px 16px rgba(0,0,0,0.3);

  --shadow-hover: 0 8px 32px rgba(0,0,0,0.5);

}
.main-navbar {

  position: fixed;

  top: 0;

  width: 100%;

  background: rgba(0,0,0,0.95);

  backdrop-filter: blur(20px);

  z-index: 1000;

  padding: 12px 0;

}



/* Library Header */

.library-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--black) 100%);
  padding: 90px 24px 80px;
  text-align: center;
  position: relative;

}



.library-hero::before {

  content: '';

  position: absolute;

  top: 0;

  left: 0;

  right: 0;

  height: 1px;

  background: var(--border);

}



.library-title {

  font-family: 'Inter', sans-serif;

  font-size: clamp(36px, 8vw, 64px);

  font-weight: 800;

  letter-spacing: -0.02em;

  background: linear-gradient(135deg, var(--white) 0%, #ccc 100%);

  -webkit-background-clip: text;

  -webkit-text-fill-color: transparent;

  background-clip: text;

  margin-bottom: 16px;

}



.library-subtitle {

  font-size: 1.3rem;

  color: var(--muted);

  max-width: 600px;

  margin: 0 auto;

  font-weight: 400;

}



/* Filters */

.filter-row {

  display: flex;

  gap: 12px;

  flex-wrap: wrap;

  justify-content: center;

  margin: 40px 0;

  padding: 0 24px;

}



.filter-btn {

  padding: 10px 20px;

  border: 1.5px solid var(--border);

  background: rgba(255,255,255,0.03);

  color: var(--white);

  font-family: 'Inter', sans-serif;

  font-size: 14px;

  font-weight: 600;

  border-radius: 25px;

  cursor: pointer;

  transition: all 0.3s ease;

  backdrop-filter: blur(10px);

}



.filter-btn:hover,

.filter-btn.active {

  background: var(--white);

  color: var(--black);

  border-color: var(--white);

  box-shadow: var(--shadow);

  transform: translateY(-2px);

}



/* Grid */

.grid {

  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));

  gap: 24px;

  padding: 0 24px 60px;

  max-width: 1400px;

  margin: 0 auto;

}



.template-card {

  background: var(--card);

  border: 1px solid var(--border);

  border-radius: var(--radius);

  overflow: hidden;

  transition: all 0.3s ease;

  backdrop-filter: blur(20px);

}



.template-card:hover {

  transform: translateY(-8px);

  box-shadow: var(--shadow-hover);

  border-color: rgba(255,255,255,0.15);

}



.tc-head {

  padding: 24px;

  border-bottom: 1px solid var(--border);

}



.tc-meta {

  display: flex;

  align-items: center;

  justify-content: flex-start;

  margin-bottom: 12px;

}



.tc-cat {

  font-size: 11px;

  font-weight: 700;

  padding: 6px 12px;

  border-radius: 20px;

  text-transform: uppercase;

  letter-spacing: 0.5px;

}



.tc-title {

  font-size: 20px;

  font-weight: 700;

  color: var(--white);

  line-height: 1.3;

  margin-bottom: 4px;

}



.tc-sub {

  font-size: 14px;

  color: var(--muted);

  font-weight: 500;

}



.tc-body {

  padding: 24px;

}



.tc-preview {

  font-size: 14px;

  color: var(--muted);

  line-height: 1.7;

  margin-bottom: 20px;

  display: -webkit-box;

  -webkit-line-clamp: 3;

  -webkit-box-orient: vertical;

  overflow: hidden;

}



.tc-actions {

  display: flex;

  gap: 12px;

}



.btn-view,

.btn-copy {

  flex: 1;

  padding: 12px 16px;

  border: none;

  border-radius: 10px;

  font-family: 'Inter', sans-serif;

  font-size: 14px;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.3s ease;

}



.btn-view {

  background: var(--white);

  color: var(--black);

}



.btn-view:hover {

  background: #f0f0f0;

  transform: translateY(-1px);

}



.btn-copy {

  background: transparent;

  color: var(--white);

  border: 1.5px solid var(--border);

}



.btn-copy:hover {

  border-color: var(--white);

  background: rgba(255,255,255,0.1);

}

/* =========================

   MODAL (FIXED VERSION)

========================= */



/* Background Overlay */

.modal-bg {

  position: fixed;

  top: 0;

  left: 0;

  width: 100vw;

  height: 100vh;

  background: rgba(0, 0, 0, 0.85);

  backdrop-filter: blur(15px);

  z-index: 9999;

  display: none;

  align-items: center;

  justify-content: center;

  padding: 20px;

  animation: fadeInBg 0.3s ease;

}



@keyframes fadeInBg {

  from { opacity: 0; }

  to { opacity: 1; }

}



/* Show Modal */

.modal-bg.show {

  display: flex;

}



/* Modal Box */

.modal {

  background: linear-gradient(145deg, var(--card), rgba(22,22,22,0.9));

  border: 1px solid rgba(255,255,255,0.12);

  border-radius: 24px;

  box-shadow: 0 40px 120px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.05);

  width: 90%;

  max-width: 850px;

  margin-top: 30px;
  margin-left: 380px;

  max-height: 90vh;

  display: flex;

  flex-direction: column;

  overflow: hidden;

  animation: modalSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  backdrop-filter: blur(20px);

}

.pag-btn {
  padding: 10px 16px;

  color: white;

  border-bottom: 2px solid var(--border);

  background: none;

  border-radius: 8px;

  font-size: 14px;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.3s ease;

}



@keyframes modalSlideIn {

  from {

    opacity: 0;

    transform: scale(0.8) translateY(50px);

  }

  to {

    opacity: 1;

    transform: scale(1) translateY(0);

  }

}



/* Animation */

@keyframes modalFade {

  from {

    opacity: 0;

    transform: translateY(30px) scale(0.96);

  }

  to {

    opacity: 1;

    transform: translateY(0) scale(1);

  }

}



/* Modal Header */

.modal-head {

  padding: 28px 32px;

  background: linear-gradient(to right, var(--dark), transparent);

  border-bottom: 1px solid rgba(255,255,255,0.08);

  display: flex;

  justify-content: space-between;

  align-items: center;

  position: sticky;

  top: 0;

  z-index: 10;

  backdrop-filter: blur(20px);

}



/* Title */

.modal-head h2 {

  font-size: 20px;

  font-weight: 700;

  color: var(--white);

}



/* Close Button */

.modal-close {

  background: none;

  border: none;

  font-size: 22px;

  cursor: pointer;

  color: var(--muted);



  padding: 6px;

  border-radius: 50%;



  transition: all 0.2s ease;

}



.custom-modal-close:hover {

  color: var(--white);

  background: rgba(255,255,255,0.1);

}



/* Modal Body */

.modal-body {

  padding: 24px;

  overflow-y: auto;

  flex: 1;

}



/* Template Text */

.modal-text {

  background: rgba(255,255,255,0.03);

  border: 1px solid var(--border);

  border-radius: 12px;

 

  padding: 20px;

  margin-bottom: 20px;



  font-size: 14px;

  line-height: 1.7;

  color: var(--white);



  white-space: pre-wrap;

}



/* Copy Button */

.modal-copy {

  width: 100%;

  padding: 14px;



  background: linear-gradient(135deg, var(--white), #eaeaea);

  color: var(--black);



  border: none;

  border-radius: 10px;



  font-size: 15px;

  font-weight: 700;



  cursor: pointer;

  transition: all 0.25s ease;

}



.modal-copy:hover {

  transform: translateY(-2px);

  box-shadow: 0 10px 30px rgba(0,0,0,0.4);

}



/* Background Fade Animation */

.custom-modal-bg {

  animation: fadeBg 0.2s ease;

}



@keyframes fadeBg {

  from { opacity: 0; }

  to { opacity: 1; }

}



/* Responsive */

@media (max-width: 600px) {

  .custom-modal {

    max-width: 100%;

    border-radius: 12px;

  }



  .modal-body {

    padding: 16px;

  }



  .modal-head {

    padding: 16px;

  }

}

/* Footer match */

.footer-section {

  background: var(--black);

  border-top: 1px solid var(--border);

  padding: 60px 24px 40px;

  color: var(--muted);

}



.footer-content {

  max-width: 1200px;

  margin: 0 auto;

  text-align: center;

}



.footer-links {

  display: flex;

  justify-content: center;

  gap: 32px;

  margin-bottom: 32px;

  flex-wrap: wrap;

}



.footer-links a {

  color: var(--muted);

  text-decoration: none;

  font-size: 14px;

  font-weight: 500;

  transition: 0.3s;

}



.footer-links a:hover {

  color: var(--white);

}



.footer-bottom {

  border-top: 1px solid var(--border);

  padding-top: 24px;

  font-size: 13px;

}



/* Responsive */

@media (max-width: 768px) {

  .grid {

    grid-template-columns: 1fr;

    gap: 20px;

    padding: 0 16px;

  }

 

  .filter-row {

    padding: 0 16px;

    gap: 8px;

  }

 

  .library-hero {

    padding: 100px 20px 60px;

  }

 

  .tc-head, .tc-body {

    padding: 20px;

  }

}



@media (max-width: 480px) {

  .tc-actions {

    flex-direction: column;

  }

 

  .filter-btn {

    padding: 8px 16px;

    font-size: 13px;

  }

}



/* Empty state */

.empty-state {

  grid-column: 1 / -1;

  text-align: center;

  padding: 80px 24px;

  color: var(--muted);

}



.empty-state h3 {

  font-size: 24px;

  margin-bottom: 12px;

  color: var(--white);

}

