/* CSS Variables for Color Theme */
:root {
    --primary-blue: #2563eb;
    --dark-blue: #1e40af;
    --primary-purple: #7c3aed;
    --dark-purple: #5b21b6;
    --black: #0f172a;
    --dark-gray: #1e293b;
    --white: #ffffff;
    --off-white: #f8fafc;
    --gray-text: #64748b;
    --success: #10b981;
    --error: #ef4444;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, var(--black) 0%, var(--dark-gray) 100%);
    color: var(--white);
    min-height: 100vh;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Header */
.nav-header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: "Cinzel", serif;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-purple));
    background-clip: text;   
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-blue);
}

.nav-menu a.locked::after {
    content: '🔒';
    margin-left: 0.25rem;
    font-size: 0.875rem;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.coin-display {
    background: linear-gradient(45deg, var(--primary-purple), var(--dark-purple));
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.coin-icon {
    width: 20px;
    height: 20px;
    background: gold;
    border-radius: 50%;
    display: inline-block;
}

/* Homepage Hero Section */
.hero-section {
    padding: 4rem 0;
    text-align: center;
}

.cover-art-container {
    max-width: 400px;
    margin: 0 auto 2rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--primary-purple);
}

.cover-art {
    width: 100%;
    height: auto;
    display: block;
}

.novel-title {
    font-family: "Cinzel", serif;
    font-size: 3rem;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-purple));
    background-clip: text;        /* standard property */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.synopsis {
    font-family: "Cormorant Garamond", serif;
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: 1.18rem;
    color: var(--off-white);
    line-height: 1.8;
    font-style: italic;
}

.genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.genre-tag {
    background: rgba(124, 58, 237, 0.2);
    color: var(--primary-purple);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid var(--primary-purple);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.genre-tag:hover {
    background: var(--primary-purple);
    color: var(--white);
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-purple));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(124, 58, 237, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Cards */
.card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.card-header {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

/* Author Notes Card */
.notes-container {
    max-width: 800px;
    margin: 0 auto;
}

.note-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
    border: 1px solid var(--primary-purple);
    min-height: 300px;
    position: relative;
}

.note-date {
    color: var(--gray-text);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.note-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* Chapters List */
.chapters-list {
    list-style: none;
    max-width: 800px;
    margin: 0 auto;
}

.chapter-item {
    background: rgba(30, 41, 59, 0.3);
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.chapter-item:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary-blue);
    transform: translateX(5px);
}

.chapter-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--white);
    text-decoration: none;
}

.chapter-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.free-badge {
    background: var(--success);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: bold;
}

.locked-badge {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
    border: 1px solid var(--error);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Chapter Content */
.chapter-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.chapter-header {
    font-family: "Orbitron", serif;
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--primary-purple);
}

.chapter-number {
    font-family: "Orbitron", serif;
    color: var(--primary-purple);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.chapter-title {
    font-family: "Cinzel", serif;
    font-size: 2.5rem;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
    margin-top: 0.5rem;
}

.chapter-text {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--off-white);
}

.chapter-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

/* Art Gallery */
.art-hub {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.art-category {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.art-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(124, 58, 237, 0.5);
}

.art-category img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.art-category-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: var(--white);
    padding: 2rem 1rem 1rem;
    font-size: 1.25rem;
    font-weight: bold;
    text-align: center;
}

.art-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.art-item {
    background: rgba(30, 41, 59, 0.3);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.art-item:hover {
    transform: scale(1.05);
}

.art-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Shop */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.coin-package {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
    border: 2px solid var(--primary-purple);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.coin-package:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(124, 58, 237, 0.5);
}

.coin-amount {
    font-size: 3rem;
    font-weight: bold;
    color: gold;
    margin: 1rem 0;
}

.coin-price {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.coin-value {
    color: var(--gray-text);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* Login Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--dark-gray);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    border: 2px solid var(--primary-purple);
}

.modal-header {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--primary-blue);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--off-white);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
    background: rgba(15, 23, 42, 0.5);
    color: var(--white);
    border-radius: 0.5rem;
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Connect Section */
.connect-section {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-purple);
    color: var(--white);
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--dark-purple);
    transform: translateY(-2px);
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-blue);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Infinite Scroll */
.infinite-scroll-trigger {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Unlock Prompt */
.unlock-prompt {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.2));
    border: 2px solid var(--error);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    margin: 2rem auto;
    max-width: 500px;
}

.unlock-cost {
    font-size: 2rem;
    color: gold;
    margin: 1rem 0;
}

/* Success/Error Messages */
.message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.message-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.message-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

/* Error and Success Messages */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: none;
    text-align: center;
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: none;
    text-align: center;
}

/* Password Reset Modal Specific Styles */
#passwordResetModal .modal-content {
    max-width: 450px;
}

#passwordResetModal .form-input[type="text"] {
    font-family: monospace;
}

/* Forgot Password Link */
#forgotPasswordLink {
    display: none;
    margin-top: 0.5rem;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Hamburger Menu Button (Mobile Only) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 2001;
  position: relative;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background: var(--white);
  border-radius: 10px;
  transition: all 0.3s ease;
  position: relative;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
  pointer-events: none;
}

/* ============================================
   TABLET & MOBILE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
  
  /* ===== NAVIGATION ===== */
  .nav-container {
    flex-wrap: nowrap;
    position: relative;
    gap: 0.5rem;
  }

  .hamburger {
    display: flex;
    order: 1; /* Hamburger first (left side) */
    margin-right: 0.5rem;
    flex-shrink: 0; /* Never shrink */
  }

  .nav-logo {
    font-size: 1.2rem;
    order: 2; /* Logo in middle */
    margin-right: auto; /* Push user info to the right */
  }

  .user-info {
    order: 3; /* User info last (right side) */
    margin-right: 0;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 200px; /* Prevent overflow */
    flex-shrink: 1; /* Allow shrinking if needed */
  }

  /* Truncate username for long names */
  .user-info > div:first-child {
    /* This targets the div containing coin display and dropdown */
    display: flex;
    text-align: left;
    gap: 0.5rem;
    min-width: 0; /* Allow flex item to shrink below content size */
  }

  #userMenuBtn {
    max-width: 100px; /* Limit username button width */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
  }

  .coin-display {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
    flex-shrink: 0; /* Never shrink coin display */
  }

  .coin-icon {
    width: 16px;
    height: 16px;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: var(--dark-gray);
    flex-direction: column;
    gap: 0;
    padding: 80px 0 20px 0;
    z-index: 2000; /* Above overlay */
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  }

  .nav-menu a {
    display: block;
    padding: 1rem 1.5rem;
    width: 100%;
    border-radius: 0;
    transition: background 0.2s ease;
    cursor: pointer; /* Ensure pointer cursor */
    pointer-events: auto; /* Ensure clickable */
  }

  .nav-menu a:hover {
    background: rgba(99, 102, 241, 0.2);
  }

  /* User dropdown menu adjustments */
  #userDropdown {
    right: 0;
    left: auto;
    min-width: 180px;
  }
  
  /* ===== HOMEPAGE ===== */
  .hero-section {
    padding: 2rem 0;
  }
  
  .cover-art-container {
    max-width: 300px;
    margin-bottom: 1.5rem;
  }
  
  .novel-title {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }
  
  .synopsis {
    font-size: 1rem;
    padding: 0 1rem;
    margin-bottom: 1.5rem;
  }
  
  .genre-tags {
    gap: 0.75rem;
    padding: 0 1rem;
  }
  
  .genre-tag {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }
  
  /* ===== BUTTONS ===== */
  .btn {
    min-height: 44px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 100%;
  }
  
  /* ===== CARDS & CONTAINERS ===== */
  .card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  /* ===== CHAPTERS LIST ===== */
  .chapters-list {
    padding: 0;
  }
  
  .chapter-item {
    margin-bottom: 0.75rem;
  }
  
  .chapter-link {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    min-height: 44px;
  }
  
  .chapter-status {
    width: 100%;
    justify-content: flex-start;
  }
  
  .free-badge,
  .locked-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
  }
  
  /* ===== CHAPTER READING PAGE ===== */
  .chapter-content {
    padding: 1rem;
  }
  
  .chapter-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }
  
  .chapter-number {
    font-size: 0.75rem;
  }
  
  .chapter-title {
    font-size: 1.75rem;
    margin-top: 0.5rem;
  }
  
  .chapter-text {
    font-size: 1.125rem;
    line-height: 1.8;
  }
  
  .chapter-nav {
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
  }
  
  .chapter-nav .btn {
    width: 100%;
  }
  
  /* ===== AUTHOR NOTES ===== */
  .author-note-section {
    padding: 1.5rem;
    margin-top: 2rem;
  }
  
  .author-note-header {
    font-size: 1.25rem;
  }
  
  /* ===== COMMENTS SECTION ===== */
  .comments-section {
    padding: 1.5rem;
    margin-top: 2rem;
  }
  
  .comments-header {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
  }
  
  .comment-form {
    padding: 1rem;
  }
  
  .comment-input {
    min-height: 120px;
    font-size: 1rem;
  }
  
  .comment-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .comment,
  .comment-reply {
    padding: 1rem;
  }
  
  .comment-replies {
    margin-left: 1rem;
    padding-left: 0.75rem;
  }
  
  .comment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .comment-footer {
    flex-wrap: wrap;
  }
  
  .reply-btn,
  .delete-comment {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    min-height: 36px;
  }
  
  /* ===== MODALS ===== */
  .modal-content {
    width: 95%;
    max-width: 95%;
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .modal-header {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
  }
  
  .form-group {
    margin-bottom: 1.25rem;
  }
  
  .form-input {
    padding: 0.875rem;
    font-size: 1rem;
    min-height: 48px;
  }
  
  .form-label {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
  }
  
  /* ===== ART HUB & GALLERIES ===== */
  .art-hub,
  .shop-hub {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
  }
  
  .art-category,
  .shop-category {
    height: 300px;
    min-height: 44px;
  }

  .shop-category.coming-soon {
  opacity: 0.6;
  cursor: default;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(37, 99, 235, 0.05));
}

.shop-category.coming-soon:hover {
  transform: none; /* Disable hover animation */
  box-shadow: none; /* Disable hover shadow */
  opacity: 0.6; /* Keep same opacity on hover */
}

.shop-category.coming-soon .shop-description {
  color: var(--primary-purple);
  font-weight: bold;
  font-style: italic;
}
  
  .art-icon,
  .shop-icon {
    font-size: 4rem;
  }
  
  .art-category-label,
  .shop-category-label {
    font-size: 1.25rem;
  }
  
  .art-description,
  .shop-description {
    font-size: 0.875rem;
  }
  
  .art-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .art-item {
    border-radius: 0.75rem;
  }
  
  .art-item img {
    height: 250px;
  }
  
  /* ===== SHOP / COINS PAGE ===== */
  .coins-container {
    padding: 1rem;
  }
  
  .coin-packages {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .coin-package {
    padding: 1.5rem;
  }
  
  .coin-icon-large {
    font-size: 3rem;
  }
  
  .coin-amount {
    font-size: 2.5rem;
  }
  
  .coin-price {
    font-size: 1.75rem;
  }
  
  .coin-savings {
    font-size: 0.875rem;
  }
  
  .current-balance {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }
  
  .balance-amount {
    font-size: 1.75rem;
  }
  
  .purchase-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    min-height: 48px;
  }
  
  /* ===== NOTES PAGE ===== */
  .connect-section {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .author-bio {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .social-links {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .social-link {
    padding: 0.75rem 1rem;
    min-height: 44px;
    text-align: center;
  }
  
  .notes-section {
    margin-top: 2rem;
  }
  
  .notes-card {
    padding: 1.5rem;
    min-height: 300px;
  }
  
  .note-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }
  
  .note-title {
    font-size: 1.25rem;
  }
  
  .note-content {
    font-size: 1rem;
  }
  
  .note-navigation {
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }
  
  .note-navigation .btn {
    width: 100%;
  }
  
  /* ===== PREFERENCES PAGE ===== */
  .preferences-container {
    padding: 1rem;
  }
  
  .preferences-card {
    padding: 1.5rem;
  }
  
  .preferences-title {
    font-size: 1.5rem;
  }
  
  .preference-item {
    padding: 1.25rem;
  }
  
  .preference-row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .preference-info {
    margin-right: 0;
    margin-bottom: 1rem;
  }
  
  .preference-label {
    font-size: 1rem;
  }
  
  .preference-description {
    font-size: 0.875rem;
  }
  
  .toggle-switch {
    align-self: flex-end;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .action-buttons .btn {
    width: 100%;
  }
  
  .quick-actions {
    flex-direction: column;
  }
  
  .quick-action-btn {
    width: 100%;
    min-height: 44px;
  }
  
  /* ===== UNLOCK MODALS ===== */
  .unlock-content {
    padding: 1.5rem;
  }
  
  .unlock-icon {
    font-size: 3rem;
  }
  
  .coin-cost {
    font-size: 1.75rem;
  }
  
  .button-group {
    flex-direction: column;
    gap: 1rem;
  }
  
  .button-group .btn {
    width: 100%;
  }
  
  /* ===== LIGHTBOX (Art Galleries) ===== */
  .lightbox img {
    max-width: 95%;
    max-height: 85%;
  }
  
  .lightbox-close {
    top: 10px;
    right: 20px;
    font-size: 2.5rem;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* ===== LOADING & UTILITY ===== */
  .loading {
    width: 30px;
    height: 30px;
  }
  
  .infinite-scroll-trigger {
    height: 80px;
  }
  
  /* ===== ERROR/SUCCESS MESSAGES ===== */
  .error-message,
  .success-message {
    font-size: 0.875rem;
    padding: 0.75rem;
  }
  
  /* ===== SAVE INDICATOR ===== */
  .save-indicator {
    right: 10px;
    top: 80px;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
  }
}

/* ============================================
   SMALL PHONES (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
  
  .novel-title {
    font-size: 1.75rem;
  }
  
  .cover-art-container {
    max-width: 250px;
  }
  
  .synopsis {
    font-size: 0.9375rem;
  }
  
  .chapter-title {
    font-size: 1.5rem;
  }
  
  .chapter-text {
    font-size: 1rem;
  }
  
  .modal-content {
    padding: 1.25rem;
  }
  
  .coin-amount {
    font-size: 2rem;
  }
  
  .coin-price {
    font-size: 1.5rem;
  }
  
  .balance-amount {
    font-size: 1.5rem;
  }
}

/* ============================================
   LANDSCAPE ORIENTATION (Mobile)
   ============================================ */
@media (max-width: 768px) and (orientation: landscape) {
  
  .hero-section {
    padding: 1.5rem 0;
  }
  
  .cover-art-container {
    max-width: 200px;
  }
  
  .nav-menu {
    width: 240px;
  }
  
  .chapter-header {
    margin-bottom: 1.5rem;
  }
}