/* Mobile-First Responsive Design for Blog */

/* Base Mobile Styles (320px and up) */
@media (max-width: 480px) {
  /* Header Navigation */
  .header-content {
    padding: 1rem 1rem;
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-menu {
    display: none;
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 2rem 1rem;
    gap: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease;
    transform: translateY(-100%);
  }
  
  .nav-menu.active {
    display: flex;
    transform: translateY(0);
  }
  
  .nav-menu a {
    font-size: 1.1rem;
    padding: 0.5rem 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .nav-menu a:last-child {
    border-bottom: none;
  }
  
  /* Mobile Menu Toggle */
  .mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
  }
  
  /* Logo adjustments */
  .logo {
    font-size: 1.8rem !important;
    text-align: center;
  }
  
  /* Hero Section */
  .hero-banner {
    padding: 2rem 1rem;
    margin-bottom: 2rem;
    border-radius: 15px;
  }
  
  .hero-banner h1 {
    font-size: 2rem !important;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  .hero-banner p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  /* Main Content */
  main {
    padding: 1rem 1rem;
    padding-top: 8rem; /* Account for fixed header */
  }
  
  /* Blog Grid */
  .modern-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
  }
  
  .modern-card {
    padding: 1.5rem;
    border-radius: 12px;
  }
  
  .modern-card h3 {
    font-size: 1.3rem;
    line-height: 1.3;
  }
  
  /* Blog Actions */
  .blog-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
  }
  
  .blog-action {
    font-size: 0.8rem;
    padding: 0.5rem;
    min-width: 80px;
    justify-content: center;
  }
  
  /* Category Filter */
  .category-filter {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .modern-select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
  }
  
  /* Section Titles */
  .section-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1.5rem;
  }
  
  /* Floating Action Button */
  .floating-action {
    bottom: 1rem;
    right: 1rem;
    width: 56px;
    height: 56px;
    font-size: 1.2rem;
  }
  
  /* Random Chat Button */
  .random-chat-button {
    position: fixed !important;
    bottom: 5rem;
    right: 1rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 0;
    z-index: 999;
  }
  
  .chat-text {
    display: none;
  }
  
  .chat-icon {
    font-size: 1.5rem;
  }
  
  /* Chat Modal */
  .random-chat-modal {
    padding: 0.5rem;
  }
  
  .chat-modal-content {
    width: 100%;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    max-width: none;
  }
  
  .chat-header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }
  
  .chat-controls {
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .chat-controls button {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    min-width: 60px;
  }
  
  .preferences-section {
    padding: 1rem;
  }
  
  .topic-tags {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }
  
  .topic-tag {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 20px;
  }
  
  /* Blog Detail Page */
  .blog-hero {
    padding: 2rem 1rem;
    border-radius: 15px;
  }
  
  .blog-hero h1 {
    font-size: 1.5rem;
    line-height: 1.3;
  }
  
  .author-info {
    padding: 1rem;
    border-radius: 12px;
    margin: 1rem 0;
  }
  
  .author-info h3 {
    font-size: 1.1rem;
  }
  
  .interaction-stats {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .interaction-stats > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  /* Comments Section */
  .comments-section {
    padding: 1rem;
  }
  
  .comment-form {
    flex-direction: column;
    gap: 1rem;
  }
  
  .comment-form input,
  .comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
  }
  
  .comment-item {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
  }
  
  /* Floating Actions */
  .floating-action {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 998;
  }
  
  .action-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .action-btn:hover {
    transform: scale(1.1);
  }
  
  /* Form Styles */
  .modern-form {
    padding: 1.5rem;
    border-radius: 15px;
  }
  
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  .form-group label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 1rem;
  }
  
  .form-group textarea {
    min-height: 120px;
    resize: vertical;
  }
  
  /* Buttons */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 8px;
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
  }
  
  /* Contact Form */
  .contact-form {
    padding: 1.5rem;
    border-radius: 15px;
  }
  
  .contact-hero {
    padding: 2rem 1rem;
    border-radius: 15px;
    text-align: center;
  }
  
  .contact-hero h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }
  
  /* About Page */
  .about-hero {
    padding: 2rem 1rem;
    border-radius: 15px;
    text-align: center;
  }
  
  .about-hero h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }
  
  .about-content {
    padding: 1rem;
  }
  
  .about-content h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }
  
  /* Stats Dashboard */
  .stats-widget {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 12px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .stat-card {
    padding: 1rem;
    text-align: center;
  }
  
  /* Reading Progress */
  .reading-progress {
    height: 3px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
  }
  
  /* Toast Notifications */
  .toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
    z-index: 1001;
  }
  
  /* Utility Classes */
  .hide-on-mobile {
    display: none !important;
  }
  
  .show-on-mobile {
    display: block !important;
  }
  
  /* Text adjustments */
  .text-4xl {
    font-size: 2rem !important;
  }
  
  .text-6xl {
    font-size: 3rem !important;
  }
  
  .text-2xl {
    font-size: 1.3rem !important;
  }
  
  .text-xl {
    font-size: 1.1rem !important;
  }
  
  /* Spacing adjustments */
  .py-12 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .px-6 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .mb-12 {
    margin-bottom: 2rem !important;
  }
  
  .mb-8 {
    margin-bottom: 1.5rem !important;
  }
  
  /* Cursor effects - disable on mobile */
  .cursor,
  .cursor-follower {
    display: none !important;
  }
  
  body {
    cursor: auto !important;
  }
  
  a, button {
    cursor: pointer !important;
  }
}

/* Tablet Styles (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .header-content {
    padding: 1rem 2rem;
  }
  
  .nav-menu {
    gap: 1.5rem;
  }
  
  .hero-banner {
    padding: 2.5rem 2rem;
  }
  
  .hero-banner h1 {
    font-size: 2.5rem !important;
  }
  
  .modern-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .modern-card {
    padding: 1.5rem;
  }
  
  .random-chat-button {
    position: relative !important;
    bottom: auto;
    right: auto;
    width: auto;
    height: auto;
    border-radius: 8px;
    padding: 0.5rem 1rem;
  }
  
  .chat-text {
    display: inline;
  }
  
  .chat-modal-content {
    width: 90%;
    height: 85vh;
    margin: 7.5vh auto;
    border-radius: 15px;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  main {
    padding: 2rem;
    padding-top: 6rem;
  }
}

/* Desktop Styles (769px and up) */
@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none;
  }
  
  .nav-menu {
    display: flex !important;
    position: static;
    background: none;
    flex-direction: row;
    padding: 0;
    gap: 2rem;
    border: none;
    transform: none;
  }
  
  .random-chat-button {
    position: relative;
    bottom: auto;
    right: auto;
    width: auto;
    height: auto;
    border-radius: 8px;
    padding: 0.5rem 1rem;
  }
  
  .chat-text {
    display: inline;
  }
  
  .hide-on-desktop {
    display: none !important;
  }
  
  .show-on-desktop {
    display: block !important;
  }
}

/* High-resolution screens */
@media (min-width: 1200px) {
  .modern-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .hero-banner h1 {
    font-size: 3.5rem !important;
  }
  
  .section-title {
    font-size: 2.5rem;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .modern-card:hover {
    transform: none;
  }
  
  .blog-action:hover {
    transform: none;
  }
  
  .floating-action:hover {
    transform: none;
  }
  
  .action-btn:hover {
    transform: none;
  }
  
  /* Increase touch target sizes */
  .blog-action {
    padding: 0.75rem;
    min-height: 44px;
  }
  
  .nav-menu a {
    padding: 0.75rem 1rem;
    min-height: 44px;
  }
  
  .btn {
    min-height: 44px;
  }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .hero-banner {
    padding: 1.5rem 1rem;
  }
  
  .hero-banner h1 {
    font-size: 1.8rem !important;
  }
  
  .chat-modal-content {
    height: 95vh;
    margin: 2.5vh auto;
  }
  
  main {
    padding-top: 5rem;
  }
}
