/* Crisis Support App - Medical/Calming Design */

:root {
    /* Główne kolory - spokojne, medyczne */
    --primary: #4A90A4;        /* Spokojny niebieski */
    --secondary: #7FB069;      /* Łagodny zielony */
    --accent: #F4E4BC;         /* Ciepły beż */
    
    /* Tła */
    --background: #FAFAFA;     /* Bardzo jasny szary */
    --surface: #FFFFFF;        /* Białe karty */
    --surface-soft: #F8F9FA;   /* Delikatnie szare tło */
    
    /* Teksty */
    --text-primary: #2C3E50;   /* Ciemny szaro-niebieski */
    --text-secondary: #5D6D7E; /* Średni szary */
    --text-muted: #85929E;     /* Jasny szary */
    
    /* Stany */
    --success: #27AE60;        /* Zielony sukces */
    --warning: #F39C12;        /* Pomarańczowy */
    --error: #E74C3C;          /* Czerwony błąd */
    --emergency: #C0392B;      /* Ciemny czerwony dla emergency */
    
    /* Shadows */
    --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 8px 30px rgba(0, 0, 0, 0.15);
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
  }
  
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  /* Navigation */
  .navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(74, 144, 164, 0.1);
  }
  
  .nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .logo i {
    color: var(--secondary);
  }
  
  .nav-buttons {
    display: flex;
    gap: 1rem;
  }
  
  /* Disclaimer Banner */
  .disclaimer-banner {
    background: linear-gradient(135deg, var(--warning), #E67E22);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-soft);
  }
  
  .disclaimer-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .disclaimer-content i {
    font-size: 1.2rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
  }
  
  /* Hero Section */
  .hero-section {
    padding: 4rem 0 6rem;
    text-align: center;
  }
  
  .hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--text-primary);
  }
  
  .gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
  }
  
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
  }
  
  .btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-soft);
  }
  
  .btn-primary:hover {
    background: #3A7A8C;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
  }
  
  .btn-secondary {
    background: var(--surface);
    color: var(--primary);
    border: 2px solid var(--primary);
  }
  
  .btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
  }
  
  .hero-features {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
  }
  
  .feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    background: var(--surface);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    box-shadow: var(--shadow-soft);
    color: var(--text-secondary);
  }
  
  .feature-item i {
    color: var(--secondary);
  }
  
  /* Demo Section */
  .demo-section {
    background: var(--surface);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-soft);
    margin: 2rem 0;
  }
  
  .demo-section h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--text-primary);
  }
  
  .chat-demo-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-medium);
    max-width: 500px;
    margin: 0 auto;
    color: var(--text-primary);
    overflow: hidden;
    border: 1px solid rgba(74, 144, 164, 0.1);
  }
  
  .demo-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface-soft);
  }
  
  .demo-dots {
    display: flex;
    gap: 0.5rem;
  }
  
  .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
  }
  
  .dot-red { background: #ef4444; }
  .dot-yellow { background: #f59e0b; }
  .dot-green { background: #10b981; }
  
  .demo-title {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
  }
  
  .demo-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--success);
  }
  
  .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
  }
  
  @keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
  }
  
  .demo-content {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
  }
  
  .message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    align-items: flex-start;
  }
  
  .user-message {
    justify-content: flex-end;
  }
  
  .user-message i {
    order: 2;
    margin-left: 0.5rem;
    color: var(--primary);
    margin-top: 0.25rem;
  }
  
  .user-message > div {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 18px 18px 4px 18px;
    max-width: 75%;
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  .ai-message > div {
    background: var(--surface-soft);
    padding: 0.75rem 1rem;
    border-radius: 18px 18px 18px 4px;
    max-width: 75%;
    font-size: 0.9rem;
    line-height: 1.4;
    border: 1px solid rgba(74, 144, 164, 0.1);
  }
  
  .ai-message i {
    color: var(--secondary);
    margin-top: 0.25rem;
  }
  
  .typing-indicator {
    display: flex;
    justify-content: flex-start;
    margin: 1rem 0;
    padding-left: 2rem;
  }
  
  .typing-dots {
    display: flex;
    gap: 0.25rem;
    background: var(--surface-soft);
    padding: 0.75rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(74, 144, 164, 0.1);
  }
  
  .typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typing 1.5s infinite ease-in-out;
  }
  
  .typing-dots span:nth-child(2) { animation-delay: 0.2s; }
  .typing-dots span:nth-child(3) { animation-delay: 0.4s; }
  
  @keyframes typing {
    0%, 60%, 100% {
      transform: translateY(0);
      opacity: 0.5;
    }
    30% {
      transform: translateY(-10px);
      opacity: 1;
    }
  }
  
  /* Features Grid */
  .features-section {
    padding: 4rem 0;
    background: var(--surface);
    border-radius: 20px;
    margin: 3rem 0;
    box-shadow: var(--shadow-soft);
  }
  
  .section-header {
    text-align: center;
    margin-bottom: 3rem;
  }
  
  .section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
  }
  
  .section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
  }
  
  .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
  }
  
  .feature-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(74, 144, 164, 0.1);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
  }
  
  .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary);
  }
  
  .feature-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
  }
  
  .feature-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
  }
  
  .feature-list {
    list-style: none;
  }
  
  .feature-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
  }
  
  .feature-list i {
    color: var(--success);
    font-size: 0.8rem;
  }
  
  /* Pricing Section */
  .pricing-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--surface-soft), var(--surface));
  }
  
  .pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
  }
  
  .pricing-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
  }
  
  .pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
  }
  
  .pricing-card.featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-medium);
  }
  
  .featured-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
  }
  
  .plan-header {
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .plan-header h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
  }
  
  .price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
  }
  
  .price .amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
  }
  
  .price .currency {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
  }
  
  .price .period {
    font-size: 0.9rem;
    color: var(--text-muted);
  }
  
  .plan-header p {
    color: var(--text-secondary);
  }
  
  .plan-features {
    list-style: none;
    margin-bottom: 2rem;
  }
  
  .plan-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
  }
  
  .plan-features i {
    font-size: 0.9rem;
  }
  
  .plan-features .fa-check {
    color: var(--success);
  }
  
  .plan-features .fa-times {
    color: var(--text-muted);
  }
  
  .plan-features .text-muted {
    color: var(--text-muted);
  }
  
  .plan-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid;
  }
  
  .btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
  }
  
  .btn-outline:hover {
    background: var(--primary);
    color: white;
  }
  
  /* Emergency Section */
  .emergency-section {
    background: linear-gradient(135deg, var(--emergency), #A93226);
    color: white;
    padding: 4rem 0;
    margin: 4rem 0;
    border-radius: 20px;
    text-align: center;
  }
  
  .emergency-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
  }
  
  .emergency-content p {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    opacity: 0.95;
  }
  
  .emergency-contacts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
  }
  
  .emergency-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .emergency-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }
  
  .emergency-phone {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
  }
  
  .emergency-phone:hover {
    transform: scale(1.05);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  }
  
  .emergency-card p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
  }
  
  /* Auth Modal */
  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    align-items: center;
    justify-content: center;
    z-index: 2100;
    background: none;
    box-shadow: none;
  }
  
  .modal.show {
    display: flex;
  }
  
  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
  }
  
  .modal-overlay.show {
    display: flex;
  }
  
  .modal-content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
    position: relative;
    color: var(--text-primary);
    z-index: 2200;
  }
  
  .modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .modal-header h3 {
    color: var(--primary);
    font-size: 1.2rem;
  }
  
  .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
  }
  
  .modal-close:hover {
    color: var(--text-primary);
  }
  
  .auth-tabs {
    display: flex;
    background: var(--surface-soft);
    margin: 1rem 1.5rem 0;
    border-radius: 8px;
    padding: 0.25rem;
  }
  
  .auth-tab {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    color: var(--text-secondary);
  }
  
  .auth-tab.active {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    color: var(--primary);
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  .form-group {
    margin-bottom: 1rem;
  }
  
  .form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
  }
  
  .form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    font-family: inherit;
  }
  
  .form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 164, 0.1);
  }
  
  .privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: var(--surface-soft);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-left: 3px solid var(--warning);
  }
  
  .privacy-note i {
    color: var(--warning);
    margin-top: 0.1rem;
    flex-shrink: 0;
  }
  
  .error-message {
    background: #fee;
    color: var(--error);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
    border-left: 3px solid var(--error);
  }
  
  .success-message {
    background: #f0fff4;
    color: var(--success);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
    border-left: 3px solid var(--success);
  }
  
  .hidden {
    display: none !important;
  }
  
  .modal-submit-btn {
    width: 100% !important;
    padding: 15px 20px !important;
    background: var(--primary) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    margin-top: 20px !important;
    transition: all 0.3s ease !important;
    font-family: inherit !important;
  }
  
  .modal-submit-btn:hover {
    background: #3A7A8C !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-medium) !important;
  }
  
  /* Responsive */
  @media (max-width: 768px) {
    .hero-title {
      font-size: 2.5rem;
    }
    
    .hero-buttons {
      flex-direction: column;
      align-items: center;
    }
    
    .hero-features {
      flex-direction: column;
      align-items: center;
    }
    
    .features-grid {
      grid-template-columns: 1fr;
    }
    
    .pricing-grid {
      grid-template-columns: 1fr;
    }
    
    .emergency-contacts {
      grid-template-columns: 1fr;
    }
    
    .disclaimer-content {
      flex-direction: column;
      gap: 0.5rem;
      text-align: center;
    }
    
    .emergency-content h2 {
      flex-direction: column;
      gap: 0.5rem;
    }
    
    .container {
      padding: 0 15px;
    }
  }
  
  @media (max-width: 480px) {
    .hero-title {
      font-size: 2rem;
    }
    
    .hero-subtitle {
      font-size: 1.1rem;
    }
    
    .section-header h2 {
      font-size: 2rem;
    }
    
    .demo-section {
      padding: 2rem 1rem;
    }
    
    .emergency-phone {
      font-size: 1.5rem;
    }
  }
  
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 340px;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 10;
    background: var(--surface);
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 16px 0 rgba(74,144,164,0.04);
  }
  .main-content {
    margin-left: 340px;
  }
  
  