@media screen and (orientation: portrait) {
  /* Portrait/Mobile Styles for Home2 */

  /* CSS Variables for Theme Support */
  :root {
    /* Light Theme Colors */
    --primary-color: #2e68f6;
    --secondary-color: #83a9f4;
    --accent-color: #ffa726;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;

    --background-primary: #ffffff;
    --background-secondary: #f5f7fa;
    --background-tertiary: #e8ecf0;

    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --text-tertiary: #718096;

    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);

    --map-ocean: #e6f3ff;
    --map-land: #4caf50;
  }

  /* Dark Theme */
  .dark {
    --primary-color: #4c8bf5;
    --secondary-color: #9bb8ff;
    --accent-color: #ffb74d;
    --success-color: #66bb6a;
    --warning-color: #ffa726;
    --error-color: #ef5350;

    --background-primary: #121212;
    --background-secondary: #1e1e1e;
    --background-tertiary: #2d2d2d;

    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-tertiary: #808080;

    --border-color: #404040;
    --shadow-color: rgba(0, 0, 0, 0.3);

    --map-ocean: #1a237e;
    --map-land: #81c784;
  }

  /* Base Styles */
  .home2-container {
    background-color: var(--background-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-top: 50px;
  }

  /* Hero Section Mobile */
  .hero-section {
    min-height: calc(100vh - 50px);
    padding: 1rem;
    background: linear-gradient(
      135deg,
      var(--background-primary) 0%,
      var(--background-secondary) 100%
    );
  }

  .shape {
    position: absolute;
    animation: float 6s ease-in-out infinite;
    color: var(--primary-color);
  }

  .shape-1 {
    top: 20%;
    left: 10%;
    width: 200px;
    height: 200px;
    animation-delay: 0s;
  }

  .shape-2 {
    top: 60%;
    left: 5%;
    width: 150px;
    height: 150px;
    animation-delay: 2s;
  }

  .shape-3 {
    bottom: 20%;
    right: 5%;
    width: 180px;
    height: 180px;
    animation-delay: 4s;
  }

  .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
  }

  .hero-content {
    width: 100%;
    padding: 1rem;
  }

  .hero-title {
    width: 80%;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
  }

  .gradient-text {
    background: linear-gradient(
      135deg,
      var(--primary-color),
      var(--secondary-color)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
    color: var(--text-secondary);
  }

  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
    align-items: center;
  }

  .hero-buttons button {
    width: 200px;
  }

  .primary-button {
    background: linear-gradient(
      135deg,
      var(--primary-color),
      var(--secondary-color)
    ) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(46, 104, 246, 0.3);
  }

  .secondary-button {
    background: transparent !important;
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-around;
  }

  .stat-item {
    min-width: 80px;
    text-align: center;
  }

  .stat-item h3 {
    font-size: 1.75rem;
    margin: 0;
    color: var(--primary-color);
  }

  .stat-item p {
    font-size: 0.875rem;
    margin: 0;
    color: var(--text-secondary);
  }

  /* Hide or reduce floating shapes on mobile */
  .floating-shapes {
    opacity: 0.3;
  }

  .scroll-indicator {
    color: var(--text-tertiary);
  }

  /* Features Section Mobile */
  .features-section {
    padding: 3rem 1rem;
    background-color: var(--background-secondary);
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .section-title {
    font-size: 2rem;
    padding: 0 1rem;
    color: var(--text-primary);
  }

  .section-subtitle {
    font-size: 1rem;
    padding: 0 1rem;
    color: var(--text-secondary);
  }

  .features-grid {
    flex-direction: column;
    gap: 1.5rem;
  }

  .feature-card {
    width: 60%;
    margin: 0;
    padding: 2rem 1.5rem;
    background: var(--background-primary);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: all 0.3s ease;
  }

  .feature-card h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
  }

  .feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
  }

  .feature-list {
    font-size: 0.875rem;
    color: var(--text-secondary);
  }

  .feature-icon {
    color: var(--primary-color);
  }

  .feature-icon svg {
    width: 50px;
    height: 50px;
  }

  /* Competition Section Mobile */
  .competition-section {
    padding: 3rem 1rem;
    background: linear-gradient(
      135deg,
      var(--background-tertiary) 0%,
      var(--background-secondary) 100%
    );
  }

  .competition-showcase {
    flex-direction: column;
  }

  .competition-showcase1 {
    width: 60%;
    margin: 20px auto;
  }

  .competition-demo {
    padding: 1rem;
    background: var(--background-primary);
    border-radius: 16px;
    box-shadow: 0 8px 30px var(--shadow-color);
  }

  .demo-screen {
    padding: 1rem;
    background: var(--background-primary);
  }

  .demo-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .player-info {
    font-size: 0.875rem;
    color: var(--text-primary);
  }

  .player-info.player-2 {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .avatar {
    width: 20px;
    height: 20px;
    background: linear-gradient(
      135deg,
      var(--primary-color),
      var(--secondary-color)
    );
    border-radius: 50%;
  }

  .score {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 700;
    margin: 0px 5px;
  }

  .timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
  }

  .timer span {
    font-size: 0.8rem;
    color: var(--accent-color);
  }

  .demo-question {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .demo-question p {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
  }

  .demo-options {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .option {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
    background: var(--background-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px auto;
  }

  .option:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.02);
  }

  .competition-info {
    padding: 1.5rem;
    background: var(--background-primary);
  }

  .competition-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
  }

  .scoring-system {
    width: 100%;
  }

  .scoring-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .scoring-item div {
    padding: 0px 5px;
  }

  .score-badge {
    width: 60px;
    height: 60px;
    font-size: 0.9rem;
    color: white;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0px 10px;
  }

  .score-badge.first {
    background: linear-gradient(135deg, #ffd700, #ffa000);
  }

  .score-badge.second {
    background: linear-gradient(135deg, #c0c0c0, #808080);
  }

  .score-badge.third {
    background: linear-gradient(135deg, #cd7f32, #8b4513);
  }

  .scoring-item h4 {
    font-size: 1rem;
    color: var(--text-primary);
  }

  .scoring-item p {
    font-size: 0.75rem;
    color: var(--text-secondary);
  }

  .subject-categories h4 {
    font-size: 1.25rem;
    color: var(--text-primary);
  }

  .subject-grid div {
    margin: 5px auto;
  }

  .subject-badge {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    justify-content: center;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
  }

  .subject-badge.math {
    background: rgba(46, 104, 246, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(46, 104, 246, 0.3);
  }

  .subject-badge.physics {
    background: rgba(156, 39, 176, 0.1);
    color: #9c27b0;
    border: 1px solid rgba(156, 39, 176, 0.3);
  }

  .subject-badge.chemistry {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
  }

  .subject-badge.engineering {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
  }

  .subject-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  }

  .subject-badge svg {
    width: 20px;
    height: 20px;
  }

  /* Community Section Mobile */
  .community-section {
    padding: 3rem 1rem;
    background-color: var(--background-primary);
  }

  .community-showcase {
    /* flex-direction: column; */
    margin-top: 10px;
  }

  .world-map-container {
    padding: 1rem;
    margin-bottom: 2rem;
    position: relative;
    width: 60%;
  }

  .world-map {
    max-width: 100%;
    height: auto;
  }

  .continent {
    fill: var(--map-land);
    transition: fill 0.3s ease;
    cursor: pointer;
  }

  .continent:hover {
    filter: brightness(1.2);
  }

  .ocean {
    fill: var(--map-ocean);
  }

  .user-dot {
    fill: var(--accent-color);
    animation: pulse 2s ease-in-out infinite;
  }

  .map-stats {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }

  .stat-bubble {
    position: absolute;
    background: var(--background-primary);
    padding: 0.1rem 0.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px var(--shadow-color);
    font-size: 0.6rem;
    color: var(--text-primary);
  }

  .stat-bubble strong {
    font-size: 0.5rem;
    color: var(--primary-color);
  }

  .community-features {
    flex-direction: column;
    gap: 1.5rem;
  }

  .community-features1 {
    width: 100%;
    margin: 20px auto;
  }

  .community-card {
    padding: 1.5rem;
    background: var(--background-secondary);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow-color);
    width: 60%;
  }

  .community-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
  }

  .leaderboard-preview {
    font-size: 0.875rem;
    background: var(--background-primary);
    border-radius: 8px;
    padding: 1rem;
  }

  .leaderboard-item {
    padding: 0.5rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
  }

  .leaderboard-item:last-child {
    border-bottom: none;
  }

  .leaderboard-item.highlight {
    background: rgba(46, 104, 246, 0.1);
    border-radius: 4px;
  }

  .rank {
    width: 30px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-color);
  }

  .username {
    font-size: 0.875rem;
    color: var(--text-primary);
  }

  .points {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
  }

  .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .achievement {
    padding: 0.75rem;
    background: var(--background-primary);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .achievement:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px var(--shadow-color);
  }

  .achievement.locked {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .achievement svg {
    width: 30px;
    height: 30px;
    color: var(--accent-color);
  }

  .achievement span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.5rem;
  }

  .testimonial {
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--background-primary);
    border-radius: 8px;
  }

  .testimonial p {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    font-style: italic;
    color: var(--text-secondary);
  }

  .testimonial-author {
    gap: 0.75rem;
  }

  .author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(
      135deg,
      var(--primary-color),
      var(--secondary-color)
    );
  }

  .testimonial-author strong {
    font-size: 0.875rem;
    color: var(--text-primary);
    display: block;
  }

  .testimonial-author span {
    font-size: 0.75rem;
    color: var(--text-tertiary);
  }

  /* Getting Started Section Mobile */
  .getting-started-section {
    padding: 3rem 1rem;
    background: var(--background-secondary);
  }

  .steps-container {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: 3rem 0;
  }

  .step-card {
    max-width: 60%;
    padding: 2rem 1.5rem;
    background: var(--background-primary);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow-color);
    text-align: center;
    margin: 50px auto;
  }

  .step-number {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 1.5rem;
  }

  .step-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
  }

  .step-icon svg {
    width: 50px;
    height: 50px;
  }

  .step-card h3 {
    font-size: 1.25rem;
    margin: 1rem 0 0.5rem;
    color: var(--text-primary);
  }

  .step-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
  }

  /* Pricing Section Mobile */
  .pricing-comparison {
    flex-direction: column;
    gap: 2rem;
  }

  .pricing-comparison1 {
    width: 100%;
  }

  .pricing-card {
    padding: 2rem 1.5rem;
    width: 60%;
    margin: 20px auto;
    background: var(--background-primary);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow-color);
    position: relative;
    transition: all 0.3s ease;
  }

  .pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-color);
  }

  .pricing-card.premium {
    border: 2px solid var(--primary-color);
  }

  .pricing-card h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
  }

  .price {
    font-size: 2.5rem;
    margin: 1rem 0 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
  }

  .price span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
  }

  .pricing-card ul {
    padding: 0;
    margin: 0 0 2rem 0;
  }

  .pricing-card li {
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
  }

  .pricing-card li:last-child {
    border-bottom: none;
  }

  .pricing-button {
    width: 100%;
    padding: 0.875rem 1.5rem !important;
    font-size: 1rem !important;
    background: var(--background-secondary);
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 12px;
  }

  .pricing-button:hover {
    background: var(--primary-color);
    color: white !important;
  }

  .pricing-button.premium {
    background: var(--primary-color);
    color: white !important;
  }

  .pricing-button.premium:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color) !important;
  }

  .premium-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    top: -10px;
    position: absolute;
    right: 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-weight: 600;
  }

  /* Final CTA Section Mobile */
  .final-cta-section {
    padding: 3rem 1rem;
    background: linear-gradient(
      135deg,
      var(--primary-color) 0%,
      var(--secondary-color) 100%
    );
    color: white;
  }

  .cta-content {
    max-width: 100%;
  }

  .cta-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: white;
  }

  .cta-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    color: white;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .cta-buttons button {
    width: 100%;
    max-width: 280px;
    margin: 10px;
  }

  .final-cta-section .primary-button {
    background: white !important;
    color: var(--primary-color) !important;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
  }

  .final-cta-section .primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
  }

  .final-cta-section .secondary-button {
    background: transparent !important;
    color: white !important;
    border: 2px solid white !important;
  }

  .final-cta-section .secondary-button:hover {
    background: white !important;
    color: var(--primary-color) !important;
  }

  .cta-note {
    font-size: 0.8rem;
    margin-top: 1.5rem;
    opacity: 0.8;
    color: white;
  }

  /* Footer Mobile */
  .home2-footer {
    padding: 3rem 1rem 2rem;
    background: var(--background-tertiary);
    color: var(--text-secondary);
  }

  .home2-footer1 {
    width: 100%;
  }

  .footer-content {
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
  }

  .footer-content1 {
    width: 100%;
    text-align: center;
  }

  .footer-content1 h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
  }

  .footer-content1 ul {
    padding: 0;
    margin: 0;
  }

  .footer-content1 li {
    margin-bottom: 0.5rem;
  }

  .footer-content1 a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .footer-content1 a:hover {
    color: var(--primary-color);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
  }

  .footer-bottom p {
    font-size: 0.875rem;
    margin: 0;
    color: var(--text-tertiary);
  }

  .social-links {
    gap: 1rem;
  }

  .social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--background-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-secondary);
  }

  .social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
  }

  .social-links a:hover svg {
    color: white;
  }

  .social-links svg {
    width: 20px;
    height: 20px;
    color: currentColor;
  }

  /* Utility adjustments for mobile */
  .w3-container {
    padding: 0 1rem;
  }

  .w3-row-padding {
    padding: 0;
  }

  /* Hide scroll indicator on mobile */
  .scroll-indicator {
    display: none;
  }

  /* Disable parallax scrolling on mobile for performance */
  .hero-section {
    transform: none !important;
  }

  /* Touch-friendly button sizes */
  /* button,
  .w3-button {
    min-height: 44px;
  } */

  /* Reduce animations on mobile for performance */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }

    .floating-shapes {
      display: none;
    }
  }

  /* Authentication Components (Login2 & Register2) Mobile */
  .login2-container,
  .register2-container {
    min-height: 100vh;
    background: linear-gradient(
      135deg,
      var(--background-primary) 0%,
      var(--background-secondary) 100%
    );
    padding: 2rem;
    margin-top: 50px;
    position: relative;
    overflow: hidden;
  }

  .login2-wrapper,
  .register2-wrapper {
    width: 60%;
    flex-direction: column;
    gap: 2rem;
  }

  .login2-content,
  .register2-content {
    max-width: 100%;
    width: 100%;
    padding: 2rem 2rem;
    background: var(--background-primary);
    border-radius: 16px;
    box-shadow: 0 8px 30px var(--shadow-color);
  }

  .login2-header h1,
  .register2-header h1 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
  }

  .login2-header p,
  .register2-header p {
    font-size: 1rem;
    text-align: center;
    color: var(--text-secondary);
  }

  /* Hide decorative content on mobile */
  .login2-decoration {
    display: none;
  }

  /* Form elements mobile adjustments */
  .form-step h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
  }

  .step-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
  }

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

  .form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
  }

  .remember {
    margin-left: 5px;
  }

  .form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--background-primary);
    color: var(--text-primary);
  }

  .form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 104, 246, 0.1);
  }

  .form-input.error {
    border-color: var(--error-color);
  }

  .error-message {
    font-size: 0.75rem;
    color: var(--error-color);
  }

  /* Form row mobile */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Password Input */
  .password-input-wrapper {
    position: relative;
  }

  .password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-secondary);
    font-size: 1.2rem;
  }

  .password-strength {
    margin-top: 0.5rem;
  }

  .strength-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
  }

  .strength-fill {
    height: 100%;
    transition: width 0.3s ease;
  }

  .strength-text {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: inline-block;
  }

  /* Google auth button mobile */
  .google-auth-button {
    width: 100%;
    padding: 0.875rem !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #fff !important;
    color: #333 !important;
    border: 2px solid var(--border-color) !important;
    font-weight: 500;
  }

  .dark .google-auth-button {
    background: var(--background-secondary) !important;
    color: var(--text-primary) !important;
  }

  .subject-card {
    padding: 1.25rem;
    font-size: 0.9rem;
    background: var(--background-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
  }

  .subject-card.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
  }

  .subject-icon {
    font-size: 1.5rem;
  }

  /* Theme Selector */
  .theme-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .theme-option {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
  }

  .theme-option:hover {
    border-color: var(--primary-color);
  }

  .theme-option.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 104, 246, 0.1);
  }

  .theme-preview {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
    position: relative;
  }

  .light-preview {
    background: #fff;
    border: 1px solid #e0e0e0;
  }

  .dark-preview {
    background: #1a1a1a;
    border: 1px solid #333;
  }

  .preview-header {
    height: 20px;
    background: #f0f0f0;
  }

  .dark-preview .preview-header {
    background: #2a2a2a;
  }

  .preview-content {
    padding: 10px;
  }

  .preview-line {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 8px;
  }

  .preview-line.short {
    width: 60%;
  }

  .dark-preview .preview-line {
    background: #444;
  }

  /* Progress bar mobile */
  .registration-progress {
    margin-bottom: 2rem;
  }

  .progress-bar {
    height: 3px;
    background: var(--border-color);
    margin-bottom: 1.5rem;
  }

  .progress-fill {
    background: linear-gradient(
      90deg,
      var(--primary-color),
      var(--secondary-color)
    );
  }

  .progress-steps {
    display: flex;
    justify-content: space-between;
  }

  .progress-step {
    display: none;
  }

  .progress-step.current {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .step-circle {
    width: 28px;
    height: 28px;
    font-size: 0.875rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.25rem;
  }

  .step-label {
    font-size: 0.75rem;
    color: var(--text-primary);
  }

  /* Form actions mobile */
  .form-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .form-actions button {
    width: 100%;
    padding: 0.875rem !important;
    font-size: 0.9rem !important;
  }

  /* Auth footer mobile */
  .auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
  }

  .auth-footer p {
    color: var(--text-secondary);
  }

  .auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
  }

  /* Privacy notice mobile */
  .privacy-notice {
    padding: 0.75rem;
    font-size: 0.75rem;
    background: var(--background-secondary);
    border-radius: 10px;
    gap: 0.5rem;
  }

  .privacy-notice p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
  }

  .privacy-notice svg {
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
    flex-shrink: 0;
  }

  /* Error banner mobile */
  .error-banner {
    background: rgba(244, 67, 54, 0.1);
    color: var(--error-color);
    padding: 0.75rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .error-banner svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .error-banner button {
    background: none;
    border: none;
    color: var(--error-color);
    font-size: 1.25rem;
    padding: 0;
    margin-left: auto;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  /* Alert mobile */
  .alert {
    padding: 0.75rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
  }

  .alert-error {
    background: rgba(244, 67, 54, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(244, 67, 54, 0.2);
  }

  .alert-success {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(76, 175, 80, 0.2);
  }

  /* Password strength mobile */
  .password-strength {
    margin-top: 0.5rem;
  }

  .strength-bar {
    height: 3px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
  }

  .strength-fill {
    height: 100%;
    transition: width 0.3s ease;
  }

  .strength-text {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: inline-block;
  }

  /* Checkbox and radio mobile */
  .checkbox-group,
  .radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .checkbox-label,
  .radio-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
  }

  .checkbox-label input[type="checkbox"],
  .radio-label input[type="radio"] {
    margin-top: 0.125rem;
    cursor: pointer;
  }

  .radio-label span {
    display: flex;
    flex-direction: column;
  }

  .radio-label strong {
    color: var(--text-primary);
    font-weight: 600;
  }

  .radio-label small {
    font-size: 0.875rem;
    color: var(--text-tertiary);
  }

  /* Login specific mobile */
  .forgot-link {
    font-size: 0.75rem;
    color: var(--primary-color);
  }

  .login-help {
    margin-top: 1.5rem;
    padding: 0.75rem;
    background: var(--background-secondary);
    border-radius: 10px;
  }

  .login-help p {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
  }

  .login-help ul {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding-left: 1.25rem;
  }

  .security-notice {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 1rem;
  }

  /* Decoration shapes mobile - hide most, show minimal */
  .register2-decoration {
    display: none;
  }

  /* Field description mobile */
  .field-description {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: -0.25rem;
    margin-bottom: 0.5rem;
  }

  /* Divider */
  .divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
  }

  .divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
  }

  .divider span {
    background: var(--background-primary);
    padding: 0 1rem;
    position: relative;
    color: var(--text-tertiary);
    font-size: 0.875rem;
  }

  /* Password toggle mobile */
  .password-toggle {
    font-size: 1rem;
    color: var(--text-secondary);
    padding: 0.25rem;
  }

  /* Ensure touch-friendly sizes for mobile */
  .form-input,
  .google-auth-button,
  .form-actions button,
  .subject-card,
  .theme-option {
    min-height: 44px;
  }

  .registration2Button {
    margin: 10px auto;
  }

  @media screen and (max-width: 768px) {
    .community-card {
      width: 60%;
    }
  }

  /* Extra small devices (phones < 480px) */
  @media (max-width: 480px) {
    .hero-title {
      width: 80%;
      font-size: 1.5rem;
      font-weight: 800;
      line-height: 1.2;
      margin-bottom: 1rem;
    }

    .shape {
      transform: scale(0.5);
      color: var(--primary-color);
    }

    .feature-card {
      width: 100%;
      margin: 0;
      padding: 2rem 1.5rem;
      background: var(--background-primary);
      border-radius: 16px;
      box-shadow: 0 4px 20px var(--shadow-color);
      transition: all 0.3s ease;
    }

    .community-card {
      width: 100%;
    }

    .competition-showcase1 {
      width: 100%;
    }

    .step-card {
      max-width: 100%;
    }

    .pricing-card {
      width: 100%;
    }

    .world-map-container {
      width: 100%;
    }

    .hero-subtitle {
      font-size: 1rem;
    }

    .section-title {
      font-size: 1.75rem;
    }

    .stat-item h3 {
      font-size: 1.5rem;
    }

    .achievements-grid {
      grid-template-columns: 1fr;
    }

    .price {
      font-size: 2rem;
    }

    .cta-content h2 {
      font-size: 1.75rem;
    }

    .login2-wrapper,
    .register2-wrapper {
      width: 100%;
      flex-direction: column;
      gap: 2rem;
    }

    .login2-header h1,
    .register2-header h1 {
      font-size: 1.75rem;
    }
  }

  /* Small screen adjustments */
  @media (max-width: 360px) {
    .login2-content,
    .register2-content {
      padding: 1.5rem 1rem;
    }

    .login2-header h1,
    .register2-header h1 {
      font-size: 1.75rem;
    }

    .form-step h2 {
      font-size: 1.25rem;
    }

    .form-input {
      font-size: 16px; /* Prevent zoom on iOS */
    }

    .form-actions button {
      padding: 0.75rem !important;
      font-size: 0.875rem !important;
    }
  }

  /* ===================== Flashcard System Mobile Styles ===================== */
  
  /* Flashcard Hub Mobile */
  .flashcard-hub {
    padding: 1rem;
    margin-top: 50px;
  }

  .flashcard-hub-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .flashcard-hub-header h1 {
    font-size: 1.75rem;
  }

  .hub-stats {
    justify-content: center;
    gap: 1rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  /* Hub Navigation Mobile */
  .hub-navigation {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .hub-navigation::-webkit-scrollbar {
    display: none;
  }

  .nav-btn {
    white-space: nowrap;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  /* Decks Toolbar Mobile */
  .decks-toolbar {
    flex-direction: column;
    gap: 1rem;
  }

  .search-bar {
    max-width: 100%;
  }

  .filter-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .filter-select, .sort-select {
    flex: 1;
    min-width: 120px;
    font-size: 0.875rem;
  }

  /* Decks Grid Mobile */
  .decks-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .deck-card {
    padding: 1rem;
  }

  .deck-header h3 {
    font-size: 1.125rem;
  }

  .deck-meta {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .meta-item {
    font-size: 0.75rem;
  }

  /* Card Creator Mobile */
  .card-creator {
    padding: 1rem;
  }

  .creator-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .creator-header h2 {
    font-size: 1.5rem;
  }

  /* Editor Toolbar Mobile */
  .editor-toolbar {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .toolbar-group {
    padding: 0 0.25rem;
  }

  .toolbar-btn {
    padding: 0.375rem;
    font-size: 0.875rem;
  }

  .toolbar-btn.special {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
  }

  /* Content Editor Mobile */
  .content-editor {
    min-height: 150px;
    padding: 1rem;
    font-size: 0.875rem;
    position: relative;
  }

  .content-editor[data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: var(--text-tertiary);
    pointer-events: none;
    position: absolute;
  }

  /* Math Expression Styling */
  .math-expression {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--background-tertiary);
    border-radius: 4px;
    margin: 0 0.25rem;
    cursor: pointer;
    user-select: none;
  }

  .math-expression:hover {
    background: var(--primary-color);
    color: white;
  }

  /* Card Metadata Mobile */
  .card-metadata {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  /* Media Controls Mobile */
  .media-section {
    padding: 1rem;
  }

  .media-controls {
    flex-direction: column;
    width: 100%;
  }

  .media-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
  }

  /* Math Editor Mobile */
  .math-editor {
    width: 95%;
    max-height: 80vh;
  }

  .math-editor-body {
    padding: 1rem;
  }

  .template-categories {
    gap: 0.25rem;
  }

  .category-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }

  .template-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
  }

  .template-btn {
    padding: 0.75rem 0.5rem;
  }

  .template-preview {
    font-size: 1.25rem;
  }

  .template-label {
    font-size: 0.625rem;
  }

  .symbol-grid {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 0.25rem;
  }

  .symbol-btn {
    padding: 0.5rem;
    font-size: 1rem;
  }

  /* Deck Manager Mobile */
  .deck-manager {
    padding: 1rem;
  }

  .manager-header {
    flex-direction: column;
    gap: 1rem;
  }

  .header-info h2 {
    font-size: 1.5rem;
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
  }

  .header-actions button {
    width: 100%;
  }

  /* Manager Toolbar Mobile */
  .manager-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .bulk-actions {
    flex-wrap: wrap;
  }

  .bulk-btn {
    flex: 1;
    min-width: 45%;
    font-size: 0.75rem;
    padding: 0.5rem;
  }

  /* Import/Export Panel Mobile */
  .import-export-panel {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  /* Cards Grid Mobile */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .card-item {
    padding: 1rem;
  }

  .card-checkbox {
    top: 0.5rem;
    right: 0.5rem;
  }

  .card-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
  }

  .card-front,
  .card-back {
    font-size: 0.875rem;
    padding: 0.5rem 0;
  }

  /* Cards List Mobile */
  .cards-list {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cards-list table {
    min-width: 600px;
  }

  .cards-list th,
  .cards-list td {
    padding: 0.75rem 0.5rem;
    font-size: 0.75rem;
  }

  /* Study Interface Mobile */
  .study-interface {
    padding: 1rem;
  }

  .study-header h2 {
    font-size: 1.5rem;
  }

  .settings-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  /* Study Settings Mobile */
  .study-settings {
    padding: 1rem;
  }

  .settings-group select {
    font-size: 0.875rem;
    padding: 0.5rem;
  }

  /* Study Stats Preview Mobile */
  .study-stats-preview {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-card i {
    font-size: 1.5rem;
  }

  /* Study Modes Grid Mobile */
  .study-modes-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .study-mode-card {
    padding: 1.5rem;
  }

  .mode-icon {
    font-size: 2.5rem;
  }

  .study-mode-card h3 {
    font-size: 1.25rem;
  }

  .study-mode-card p {
    font-size: 0.875rem;
  }

  /* Keyboard Shortcuts Mobile */
  .keyboard-shortcuts {
    padding: 1rem;
  }

  .shortcuts-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .shortcut {
    font-size: 0.875rem;
  }

  /* Study Mode Common Mobile */
  .classic-mode,
  .quiz-mode,
  .write-mode,
  .match-mode {
    padding: 1rem;
  }

  .exit-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .progress-info {
    margin: 0 1rem;
  }

  .card-counter {
    font-size: 0.875rem;
  }

  .timer {
    font-size: 1rem;
  }

  /* Flashcard Mobile */
  .card-container {
    margin: 0 auto 1.5rem;
  }

  .flashcard {
    min-height: 300px;
  }

  .card-front,
  .card-back {
    min-height: 300px;
    padding: 2rem 1.5rem;
  }

  .card-content {
    font-size: 1rem;
  }

  .flip-button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    bottom: -2.5rem;
  }

  /* Rating Section Mobile */
  .rating-section {
    margin-top: 2rem;
  }

  .rating-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .rating-btn {
    width: 100%;
    padding: 1.25rem 1.5rem;
    flex-direction: row;
    justify-content: flex-start;
    gap: 1rem;
  }

  .rating-btn i {
    font-size: 1.5rem;
  }

  /* Navigation Controls Mobile */
  .navigation-controls {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nav-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .card-info {
    width: 100%;
    justify-content: center;
    order: -1;
    margin-bottom: 0.5rem;
  }

  /* Stats Summary Mobile */
  .stats-summary {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }

  .stat {
    justify-content: center;
  }

  /* Modal Mobile */
  .modal-content {
    width: 95%;
    padding: 1.5rem;
  }

  .modal-content h2 {
    font-size: 1.5rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* Prevent zoom on iOS */
  }

  /* Error Toast Mobile */
  .error-toast {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    font-size: 0.875rem;
  }

  /* Buttons Mobile */
  .btn-primary,
  .btn-secondary {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }

  /* Study Complete Mobile */
  .study-complete i {
    font-size: 4rem;
  }

  .study-complete h2 {
    font-size: 2rem;
  }

  .study-complete button {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
  }

  /* Quiz Mode Mobile Specific */
  .quiz-container {
    padding: 0;
  }

  .question-section h2 {
    font-size: 1.25rem;
  }

  .question-text {
    font-size: 1rem;
  }

  .answers-section {
    gap: 0.75rem;
  }

  .answer-option {
    padding: 1rem;
    font-size: 0.875rem;
  }

  .option-letter {
    font-size: 1rem;
    width: 30px;
    height: 30px;
  }

  .feedback-section {
    margin-top: 1rem;
  }

  .continue-btn {
    width: 100%;
    justify-content: center;
  }

  /* Touch-specific optimizations */
  @media (hover: none) and (pointer: coarse) {
    .toolbar-btn,
    .icon-btn,
    .nav-btn,
    .rating-btn,
    .bulk-btn {
      min-height: 44px;
      min-width: 44px;
    }

    .tag-remove {
      padding: 0.25rem;
    }

    .close-btn {
      padding: 0.75rem;
    }
  }
  /* Group Study Mobile Styles */
  .group-study-hub {
    padding: 1rem;
  }

  .hub-header h1 {
    font-size: 1.75rem;
  }

  .hub-header p {
    font-size: 1rem;
  }

  .hub-navigation {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .nav-btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    white-space: nowrap;
  }

  .rooms-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .room-card {
    padding: 1rem;
  }

  .room-header h3 {
    font-size: 1.1rem;
  }

  .room-badges {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .room-actions {
    flex-direction: column;
  }

  /* Study Room Mobile */
  .study-room {
    height: 100vh;
  }

  .room-content {
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  .video-panel,
  .activity-panel,
  .chat-panel {
    width: 100%;
    border-radius: 0;
    height: calc(100vh - 140px); /* Account for header and control bar */
  }

  .video-panel {
    display: none; /* Hide by default on mobile */
  }

  .chat-panel {
    display: none; /* Hide by default on mobile */
  }

  /* Mobile Panel Switching */
  .panel-tabs {
    display: flex;
    background: var(--background-secondary);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
  }

  .tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
  }

  .tab-btn i {
    font-size: 1.25rem;
  }

  /* Video Interface Mobile */
  .video-grid {
    padding: 0.25rem;
    gap: 0.25rem;
  }

  .video-grid.grid-2,
  .video-grid.grid-4 {
    grid-template-columns: 1fr 1fr;
  }

  .video-tile {
    aspect-ratio: 1;
  }

  .participant-name {
    font-size: 0.75rem;
  }

  .participant-overlay {
    padding: 0.25rem;
  }

  /* Control Bar Mobile */
  .control-bar {
    padding: 0.5rem;
    flex-wrap: wrap;
  }

  .control-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .media-controls,
  .room-controls {
    gap: 0.25rem;
  }

  .connection-status {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
  }

  /* Whiteboard Mobile */
  .whiteboard-toolbar {
    padding: 0.5rem;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .toolbar-section {
    flex-wrap: nowrap;
  }

  .tool-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .color-palette {
    display: flex;
    gap: 0.25rem;
  }

  .color-btn {
    width: 24px;
    height: 24px;
  }

  .stroke-slider {
    width: 80px;
  }

  .whiteboard-canvas {
    touch-action: none;
  }

  /* Chat Mobile */
  .chat-messages {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .message-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

  .message-bubble {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  .message-content-wrapper {
    max-width: 85%;
  }

  .chat-input-area {
    padding: 0.5rem;
  }

  .input-toolbar {
    margin-bottom: 0.5rem;
  }

  .toolbar-btn {
    padding: 0.5rem;
    font-size: 0.875rem;
  }

  .input-wrapper textarea {
    font-size: 0.875rem;
    padding: 0.5rem;
  }

  /* Modal Mobile */
  .modal-overlay {
    padding: 1rem;
  }

  .modal-content {
    max-height: 100vh;
    border-radius: 12px 12px 0 0;
    margin-top: auto;
  }

  .create-room-modal {
    max-width: 100%;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-header h2 {
    font-size: 1.25rem;
  }

  .modal-body {
    padding: 1rem;
  }

  .modal-footer {
    padding: 1rem;
    flex-direction: column-reverse;
  }

  .modal-footer button {
    width: 100%;
  }

  /* Form Mobile */
  .form-row {
    grid-template-columns: 1fr;
  }

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

  .form-group label {
    font-size: 0.875rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 0.75rem;
  }

  /* Screen Share Mobile */
  .share-type-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .share-type-btn {
    padding: 1rem;
  }

  .share-type-btn i {
    font-size: 1.5rem;
  }

  .share-type-btn span {
    font-size: 0.875rem;
  }

  .share-type-btn small {
    font-size: 0.75rem;
  }

  /* Recording Mobile */
  .recording-controls {
    flex-direction: column;
    gap: 1rem;
  }

  .recording-status {
    width: 100%;
    justify-content: center;
  }

  .control-buttons {
    width: 100%;
    justify-content: center;
  }

  .recordings-grid {
    grid-template-columns: 1fr;
  }

  .recording-card {
    flex-direction: column;
  }

  /* Scheduler Mobile */
  .scheduler-body {
    padding: 0;
  }

  .form-section {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
  }

  .form-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  .days-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }

  .day-btn {
    padding: 0.5rem;
    font-size: 0.75rem;
  }

  /* Filters Mobile */
  .filters-bar {
    flex-direction: column;
    gap: 0.75rem;
  }

  .filter-group {
    width: 100%;
  }

  .search-filter {
    order: -1; /* Move search to top */
  }

  .search-input {
    width: 100%;
  }

  /* Participants Mobile */
  .participants-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background-primary);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .participants-sidebar.active {
    transform: translateX(0);
  }

  .sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .participant-item {
    padding: 0.75rem 1rem;
  }

  /* Notifications Mobile */
  .notifications-container {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
  }

  .notification {
    min-width: auto;
    width: 100%;
  }

  /* Touch Optimizations */
  @media (hover: none) and (pointer: coarse) {
    .control-btn,
    .tool-btn,
    .nav-btn,
    .tab-btn,
    .room-card,
    .participant-item {
      -webkit-tap-highlight-color: transparent;
    }

    .btn-primary,
    .btn-secondary,
    .btn-danger {
      min-height: 44px;
    }

    .close-btn {
      width: 44px;
      height: 44px;
    }
  }

  /* Landscape Mobile Adjustments */
  @media screen and (max-height: 500px) {
    .room-header {
      padding: 0.5rem 1rem;
    }

    .control-bar {
      padding: 0.25rem 0.5rem;
    }

    .video-grid {
      grid-template-columns: repeat(4, 1fr);
    }

    .video-tile {
      aspect-ratio: 16/9;
    }
  }
} /**** End of portrait2.css ****/
