:root {
    --primary: #6366f1;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #4f46e5;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --text-light: #6b7280;
    --border-light: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  }

  * { box-sizing: border-box; }
  
  body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif; 
    background: var(--gray-50); 
    margin: 0; 
    padding: 0; 
    color: var(--gray-900);
    line-height: 1.6;
  }

  .hidden {
    display: none !important;
  }
  
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
  }

  /* Header */
  .header { 
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
  }
  
  .nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1rem 0;
  }
  
  .logo { 
    font-size: 1.75rem; 
    font-weight: 800; 
    background: linear-gradient(135deg, var(--primary), var(--secondary)); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .logo a {
    text-decoration: none;
    color: inherit;
  }

  .breadcrumb {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
    align-items: center;
  }

  .breadcrumb li {
    color: var(--text-light);
    font-size: 0.9rem;
  }

  .breadcrumb li:not(:last-child)::after {
    content: '>';
    margin-left: 0.5rem;
    color: var(--gray-300);
  }

  .breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .breadcrumb a:hover {
    color: var(--primary-dark);
  }

  /* Navigation Actions */
  .nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
  }

  /* 게스트 사용자용 버튼들 */
  .guest-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
  }

  /* 로그인된 사용자 정보 표시 */
  .user-info {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background 0.2s ease;
  }

  /* 알림 벨 스타일 */
  .notification-bell {
    position: relative;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
  }

  .notification-bell:hover {
    transform: scale(1.1);
  }

  .notification-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
    display: none;
  }

  .notification-dot.active {
    display: block;
  }

  /* user-info-inner 컨테이너 */
  .user-info-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background 0.2s ease;
  }

  .user-info-inner:hover {
    background: var(--gray-50);
  }

  .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
  }

  .user-name {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 14px;
  }

  .dropdown-icon {
    color: var(--gray-600);
    font-size: 12px;
    transition: transform 0.3s ease;
  }

  .user-info.active .dropdown-icon {
    transform: rotate(180deg);
  }

  .user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
  }

  .user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .dropdown-menu {
    list-style: none;
    padding: 0.25rem 0;    /* ✅ 8px → 4px (간격 축소) */
    margin: 0;
  }

  .dropdown-menu li a,
  .dropdown-menu li button {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;  /* ✅ 12px → 8px (상하 간격 축소) */
    text-align: left;
    color: var(--gray-700);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 14px;
  }

  .dropdown-menu li a:hover,
  .dropdown-menu li button:hover {
    background: var(--gray-50);
  }

  .dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0.25rem 0;     /* ✅ 8px → 4px (구분선 간격 축소) */
  }

  .logout {
    color: var(--danger);
  }

  .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    display: inline-block;
  }

  .btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
  }

  .btn-outline:hover {
    background: var(--primary);
    color: white;
  }

  .btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
  }

  .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }

  /* Modal Styles */
  .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .modal-content {
    background: white;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
    box-shadow: var(--shadow-xl);
  }

  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
  }

  .modal-title {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    color: var(--gray-900);
  }

  .modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
  }

  .modal-close:hover {
    background-color: var(--gray-100);
  }

  .form-group {
    margin-bottom: 16px;
  }

  .form-label {
    display: block;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
  }

  .form-input, .form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  }

  .form-button {
    width: 100%;
    background-color: var(--primary);
    color: white;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
  }

  .form-button:hover:not(:disabled) {
    background-color: var(--primary-dark);
  }

  .form-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }

  /* Hero Section */
  .hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
  }

  .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><g fill="white" opacity="0.1"><circle cx="20" cy="30" r="2"/><circle cx="80" cy="20" r="1.5"/><circle cx="60" cy="70" r="2.5"/><circle cx="30" cy="80" r="1"/><circle cx="90" cy="60" r="1.8"/></g></svg>');
    animation: networkFloat 30s infinite linear;
  }

  @keyframes networkFloat {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-100px) translateY(-50px); }
  }

  .hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.2;
  }

  .hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
  }

  .btn-hero {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 0.75rem;
  }

  .btn-hero.btn-white {
    background: white;
    color: var(--primary);
    border: none;
  }

  .btn-hero.btn-white:hover {
    background: var(--gray-100);
    transform: translateY(-3px);
  }

  .btn-hero.btn-outline-white {
    background: transparent;
    border: 2px solid white;
    color: white;
  }

  .btn-hero.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
  }

  /* Stats Section */
  .stats-section {
    background: white;
    padding: 4rem 0;
    margin-top: -2rem;
    position: relative;
    z-index: 2;
  }

  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
  }

  .stat-item {
    text-align: center;
    padding: 1rem;
  }

  .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
  }

  .stat-label {
    color: var(--text-light);
    font-weight: 600;
    margin-top: 0.5rem;
  }

  /* MBTI Section */
  .mbti-section {
    padding: 6rem 0;
    background: var(--gray-100);
  }

  .section-header {
    text-align: center;
    margin-bottom: 4rem;
  }

  .section-header h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: var(--gray-900);
    margin-bottom: 1rem;
  }

  .section-header p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
  }

  .mbti-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
  }

  .mbti-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-align: center;
  }

  .mbti-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
  }

  .mbti-type {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
  }

  .mbti-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
  }

  .mbti-traits {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
  }

  .mbti-traits li {
    padding: 0.5rem 0;
    color: var(--text-light);
    font-size: 0.95rem;
  }

  .mbti-traits li::before {
    content: '✓';
    color: var(--success);
    margin-right: 0.5rem;
    font-weight: bold;
  }

  .compatibility-score {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 0.5rem;
  }

  .compatibility-title {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
  }

  .compatibility-types {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
  }

  .compatibility-tag {
    padding: 0.25rem 0.5rem;
    background: var(--primary);
    color: white;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
  }

  /* Features Section */
  .features-section {
    padding: 6rem 0;
  }

  .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  }

  .feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
  }

  .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
  }

  .feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: white;
  }

  .feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
  }

  .feature-description {
    color: var(--text-light);
    line-height: 1.6;
  }

  /* Success Metrics */
  .success-metrics {
    background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
    color: white;
    padding: 6rem 0;
  }

  .metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
  }

  .metric-card {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
  }

  .metric-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
  }

  .metric-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
  }

  .metric-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
  }

  .metric-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
  }

  .metric-description {
    opacity: 0.8;
    font-size: 0.95rem;
    line-height: 1.5;
  }

  /* Testimonials */
  .testimonials {
    padding: 6rem 0;
  }

  .testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  }

  .testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
  }

  .testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
  }

  .testimonial-content {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    position: relative;
  }

  .testimonial-content::before {
    content: '"';
    font-size: 3rem;
    color: var(--primary);
    position: absolute;
    top: -1rem;
    left: -0.5rem;
    font-family: Georgia, serif;
  }

  .testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
  }

  .author-info h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--gray-900);
  }

  .author-info p {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--text-light);
  }

  .mbti-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--primary);
    color: white;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
  }

  /* CTA Section */
  .cta-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
  }

  .cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M20 30 L30 20 L40 30 L30 40 Z M60 50 L70 40 L80 50 L70 60 Z" fill="white" opacity="0.1"/></svg>');
    animation: networkFloat 25s infinite linear;
  }

  .cta-content {
    position: relative;
    z-index: 1;
  }

  .cta-content h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
  }

  .cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
  }

  /* Footer */
  .footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 2rem 0;
    text-align: center;
  }

  .footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
  }

  .footer-links a {
    color: var(--gray-300);
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .footer-links a:hover {
    color: white;
  }

  /* Responsive */
  @media (max-width: 768px) {
    .container {
      padding: 0 1rem;
    }

    .hero {
      padding: 3rem 0;
    }

    .hero-actions {
      flex-direction: column;
      align-items: center;
    }

    .btn-hero {
      width: 100%;
      max-width: 300px;
    }

    .nav {
      flex-direction: column;
      gap: 1rem;
      align-items: stretch;
    }

    .breadcrumb {
      order: -1;
      justify-content: center;
    }

    .user-name {
      display: none;
    }
  }