/** Theme Name: astra child Author: Rahul Singh Author URI: https://novelsaura.com/ Description: Astra Child Theme for custom Novel layout Version: 1.0.0 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: astra-child Template: astra */
/* ================================ Home / Archive Novel Grid =================================*/
.login-btn {
    /*background-color: #715A5A;*/
    color: #fff ;
    border-radius: 6px;
    text-decoration: none;

}

.novel-grid {
	display: grid;
	grid-template-columns: repeat(4 , 1fr);
	gap: 25px;
	margin: 3rem 0;
}
.novel-grid p{
    color: white;
}

h1{
    color:white;
    margin-top:10px;
}

h3{
    color: white;
}

.novel-card {
    position: relative;
	border: 1px solid #ddd;
	text-align: left;
	border-radius: 8px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
	transition: transform 0.2s, box-shadow 0.2s;
	overflow: hidden;
	background: #171717;
	height: 370px;
}


.novel-card img {
	height: 100%;
	width: 280px;
	display: block;
	margin: 0 auto 12px;
	border-radius: 6px;
	transition: transform 0.5s ease-in-out;
}

.novel-card:hover img {
    transform: scale(1.2);
}

.novel-card h2 {
    position: absolute;
    bottom: 2px;
    font-size: 18px;
    color: #fff;
    z-index: 10;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3em;
    max-height: 2.6em;
    background: rgba(0, 0, 0, 0.6); 
    padding: 2px 4px;
    margin: 4px 1px;
    border-radius: 3px;
}

.novel-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%; /* how tall the gradient is */
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
  z-index: 4; /* sits above the image but below text */
  pointer-events: none; /* don’t block clicks */
}


.novel-language {
    position: absolute;
    top: 3px;
    left: 3px;
    background: #715A5A;
    color: white;
    padding: 2px 6px;
    font-size: 1rem;
    border-radius: 3px;
    z-index: 5; 
}


.novel-tags {
    position: absolute;
    top: 290px; 
    left: 2px;
    font-size: 10px;
    margin-bottom: 4px;
    color: #fff;
    background-color: #715A5A;
    padding: 3px 3px;
    z-index: 1;
}

.novel-genres {
    font-size: 12px;
    color: #999;
}

.novel-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  margin-top: 20px;
  align-items: center;
  padding: 8px 200px;
  font-size: 14px;
}

.announcement{
    background-color: #715A5A;
    padding: 12px 16px;
    color: white;
    margin: 18px 16px;
    font-size: 14px;
    border-radius: 10px;
}

.novel-filters input[type="text"],
.novel-filters select {
  padding: 6px 8px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: black;
}

.novel-filters button,
.novel-filters .clear-btn {
  padding: 12px 8px;
  border: none;
  background: #715A5A;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  font-size: 16px;

}
.clear-button{
    padding: 8px 8px;
    border: none;
    background: red;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 16px;
    color: white;
    margin: 4px 4px;
}

.clear-button a {
    color: #fff;             /* text color white */
    text-decoration: none;   /* remove underline */
}


.novel-filters .clear-btn {
  background-color: red;

}

.novel-filters button:hover,
.novel-filters .clear-btn:hover {
  opacity: 0.9;
}


/*Single novel */
/* Top section: two columns */
.single-novel .novel-top {
	display: flex;
	gap: 30px;
	padding: 10px;
	margin-bottom: 2rem;
}

/* Left: Cover Image */
.single-novel .novel-cover img {
	width: 260px;
	height: 360px;
	margin-top: 20px;
	border-radius: 8px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Right: Details */
.single-novel .novel-details {
	flex: 1;
}

span{
    color: white;
}

.translator{
    color: white;
    background-color: #715A5A;
    display: inline-block;
    border-radius: 5px;
    padding: 4px 6px;
}

/* Title */
.single-novel .novel-title {
	font-size: 2rem;
	margin-bottom: 0.5rem;
}

/* Meta info */
.single-novel .novel-meta p {
	margin: 0.25rem 0;
	font-size: 0.95rem;
	color: white;
}

/* Content */
.single-novel .novel-content {
	margin-top: 2rem;
	line-height: 1.6;
	font-size: 1rem;
	color: grey;
}
/* Buttons under cover */
.novel-actions {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.read-now,
.add-collection {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  text-align: center;
  background: #715A5A;
  color: #fff;
  border: none;
  cursor: pointer;
}

.add-collection {
  background: #444;
}

.read-now:hover { background: #6d53d9; }
.add-collection:hover { background: #333; }

/* Novel tags (right side) */
.novel-tags span {
  display: inline-block;
  background: #2a2a2a;
  padding: 4px 8px;
  margin: 3px 3px 0 0;
  border-radius: 4px;
  font-size: 12px;
  color: #fff;
}

/* Updated info */
.novel-updated {
  margin: 10px 0;
  font-size: 13px;
  color: #aaa;
}

/* Scrollable description */
.novel-description {
  max-height: 280px;   /* ~100 words worth of space */
  overflow-y: auto;    /* adds scroll only if needed */
  line-height: 1.6;
  color: grey;
  padding-right: 8px;
  -webkit-overflow-scrolling: touch; /* smooth scroll on mobile */
}



/* Chapter List Container */
.chapters-list {
  margin-top: 2rem;
}

/* Top row: title + controls */
.chapters-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.chapters-title h2 {
  margin: 0;
  display: inline-block;
  color: #fff;
}

.chapters-title small {
  color: #fff;
  margin-left: 8px;
}

.chapter-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Filter buttons */
.chapter-filters {
  display: flex;
  gap: 6px;
}

.filter-btn {
  background: #715A5A;
  border: 1px solid #ddd;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  color: #fff;
}

.filter-btn.active {
  background: #715A5A;
  /*border-color: #6a4ed0;*/
}

/* Sort dropdown */
.chapter-sort {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chapter-sort label {
  font-size: 0.9rem;
  color: #fff;
}

#chapter-sort-select {
  color: #fff;
  background: #715A5A;
  border: 1px solid #fff;
  padding: 4px 6px;
  border-radius: 4px;
}

/* Chapter list + items */
.chapter-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 40px;
  overflow-x: scroll;
}

.chapter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0.5rem;
  border-bottom: 1px solid #2c2c30;
  transition: background-color 0.2s ease;
  gap: 10px;
}

/* Chapter link + title */
.chapter-link,
.chapter-link.locked {
  color: #fff;
  text-decoration: none;
}

.chapter-link:hover {
  /*text-decoration: underline;*/
  color: #D3DAD9;
}

.chapter-link.locked {
  opacity: 0.7;
}

/* Right-side (Free/Unlock) */
.chapter-right {
  margin-left: 12px;
  white-space: nowrap;
}

.chapter-cost {
  margin-right: 8px;
  font-weight: 500;
  color: #fff;
}

.chapter-free-label {
  color: #00ff88; /* brighter green for dark bg */
  font-weight: bold;
}

.unlock-chapter-btn {
  padding: 6px 8px;
  background: #B12C00;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.login-to-unlock-btn {
  color: #fff;
  text-decoration: none;
  border: 1px solid #fff;
  padding: 4px 6px;
  border-radius: 4px;
  background-color: #EB5B00;
}

.login-to-unlock-btn:hover {
  background-color: #715A5A;
  color: white;
  padding: 4px 6px;
}


/* =========================
   Gems Page Styles
   ========================= */
.gems-page {
  max-width: 800px;
  margin: 20px auto;
  font-family: sans-serif;
  color: white; /* default text color */
}

/* Force headings inside gems page to black */
.gems-page h1,
.gems-page h2,
.gems-page h3,
.gems-page h4,
.gems-page h5,
.gems-page h6 {
  color: white;
  padding: 10px;
}

/* Force span and strong inside gems page to black unless overridden */
.gems-page span,
.gems-page strong,
.gems-page p {
  color: white;
}

.gems-header,
.buy-gems-section,
.gems-history {
  text-align: center;
  /*border: 1px solid #e0e0e0;*/
  padding: 4px;
  /*border-radius: 8px;*/
  margin-bottom: 10px;
  background: darkslategrey;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  overflow-x: scroll;
}

.balance-display {
  font-size: 1.5em;
  color: #000;
}

.gem-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.gem-plan-item {
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 8px;
  background: darkgrey;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gem-plan-item span {
  font-size: 1.1em;
  font-weight: bold;
  color: #000; /* ensure span text is black */
}

.gem-plan-item small {
  font-weight: normal;
  font-size: 0.8em;
  color: #0073aa;
}

.gem-plan-item .price {
  font-size: 1.2em;
  color: white;
  margin: 10px 0;
}

.gems-history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  color: white;
}

.gems-history-table th,
.gems-history-table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: left;
}

.gems-history-table th {
  background-color: darkgrey;
}

.gems-added {
  color: green;
  font-weight: bold;
}

.gems-spent {
  color: red;
  font-weight: bold;
}

/* Buttons reused from chapters */
.buy-chapter-btn {
  background: #0073aa;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.buy-chapter-btn:hover {
  background: #005177;
}

.chapter-locked {
  /*border: 1px solid #ddd;*/
  padding: 20px;
  background: border-box;
  text-align: center;
  margin-bottom: 20px;
  border-radius: 8px;
  color: white;
}

.chapter-locked p {
  margin: 10px 0;
}

.no-chapter{
    text-align: center;       
    font-size: 18px;          
    font-weight: 500;         
    color: #555;              
    background: #f9f9f9;      
    padding: 15px 20px;       
    border: 1px solid #ddd;   
    border-radius: 8px;       
    margin: 20px auto;       
    max-width: 600px;         

}
.chapter-locked .button {
  /*display: inline-block;*/
  padding: 8px 15px;
  background-color: #EB5B00;
  text-decoration: none;
}

/* Single Chapter Page */
.single-chapter {
  max-width: 1500px; 
  margin: 0 auto;
  padding: 20px;
}

.single-chapter .chapter-content {
  color: #fff;
  line-height: 1.8;
  font-size: 18px;
  margin: 0 auto;     /* center the text block */
  max-width: 1200px;   /* limit width for readability */
}

.single-chapter .chapter-content p,
.single-chapter .chapter-content h1,
.single-chapter .chapter-content h2,
.single-chapter .chapter-content h3,
.single-chapter .chapter-content h4,
.single-chapter .chapter-content h5,
.single-chapter .chapter-content h6 {
  color: #fff;
  margin-bottom: 1rem;
}

/* Top Chapter Controls ( < A- A A+ > ) */
.chapter-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 15px 0;
}

/* Font size control buttons */
.font-btn {
  margin: 0 5px;
  padding: 4px 8px;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #000;
  transition: background 0.3s ease;
}

.font-btn:hover {
  background: #f0f0f0;
}

/* Navigation buttons */
.nav-btn {
  background: #715A5A;
  color: white;
  padding: 8px 14px;
  margin: 5px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  transition: background 0.3s ease;
}

.nav-btn:hover {
  background: #6a4fe0;
}

/* Prev/Next Icons (< >) at top */
.chapter-controls .nav-btn {
  background: transparent;
  color: #715A5A;
  padding: 0;
  font-size: 24px;
  font-weight: bold;
}

.chapter-controls .nav-btn:hover {
  color: #574599;
}


/*dmca page css */
.editor-styles-wrapper, .entry-content{
    color: #d1d1d1;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 20px;
}



/* Responsive: stack image & details on smaller screens */
@media (max-width: 426px) {
  .single-novel .novel-top {
    flex-direction: column;
  }
    
  .novel-card  img{
    	width: 100%;
    }

  .single-novel .novel-cover img {
    max-width: 100%;
    margin-bottom: 1rem;
  }

  .single-chapter .chapter-content {
    max-width: 100%; /* full width on mobile */
    padding: 0 10px;
  }
  
  .announcement{
	    font-size: 7px;
        padding: 4px 6px;
        margin: 9px -11px;
	}
	
  .novel-grid {
	display: grid;
	grid-template-columns: repeat(1 , 1fr);
    }
    
  .novel-filters{
    display: block !important;  
    padding: 4px 0px;
  }
  
  .clear-button{
      display: none;
  }
	
    .novel-filters input[type="text"], .novel-filters select{
	    margin: 4px 1px;
	    background-color: black;
	}
	
	.chapters-top-row{
	    display: block;
	}
}


/* Tablet */
@media (min-width: 427px) and (max-width: 768px) {
	.novel-grid {
		grid-template-columns: repeat(3, 1fr);
	}
	.novel-card  {
    	height: 380px;
    	width: 280px;
    }
    .novel-grid{
        overflow-x: scroll;
    }
    
    .novel-filters{
        padding: 8px 20px;
    }
}

