/* ========================================================
 * welcome.css - 환영 화면 및 위젯 스타일
 * ======================================================== */

/* 위젯은 head_style_0018.css에서 이동 예정 (Phase 2.2c) */

/* ========================================================
 * 위젯 스타일 (head_style_0018.css에서 이동, 2025-10-02)
 * 원본: head_style_0018.css 라인 165-972 (808 라인)
 * ======================================================== */

    /* 실시간 검색어 위젯 */
    .trending-widget {
      background: rgba(255, 255, 255, 0.8);
      border: 1px solid #e2e8f0;
      border-radius: 12px;
      padding: 15px;
      margin-top: 0;
      max-width: 900px;  /* ★ 수정: PC에서 더 넓게 (650px → 900px) */
      width: 100%;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
      overflow: hidden;
      box-sizing: border-box;
      flex: 1;
      max-height: 400px;
    }
    
    .trending-header {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 8px;
      padding-bottom: 6px;
      border-bottom: 1px solid #e2e8f0;
    }
    
    .trending-icon {
      font-size: 14px;
    }
    
    .trending-title {
      font-weight: bold;
      color: #1e293b;
      font-size: 14px;
    }
    
    .trending-time {
      margin-left: auto;
      font-size: 10px;
      color: #64748b;
    }
    
    .trending-list {
      display: grid;
      grid-template-columns: 1fr;
      gap: 6px;
      max-height: 320px;
      overflow-y: auto;
    }
    
    .trending-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.2s ease;
      font-size: 12px;
      min-width: 0;
      max-width: 100%;
      overflow: hidden;
      border: 1px solid transparent;
      background: rgba(255, 255, 255, 0.6);
      box-sizing: border-box;
      width: 100%;
    }
    
    .trending-item:hover {
      background: rgba(255, 255, 255, 0.9);
      border-color: #8b5cf6;
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
    }
    
    .trending-rank {
      background: linear-gradient(135deg, #8b5cf6, #ec4899);
      color: white;
      font-weight: bold;
      min-width: 20px;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      flex-shrink: 0;
      font-size: 10px;
    }
    
    .trending-keyword {
      flex: 1;
      color: #374151;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    
    /* 실시간 이슈용 스타일 */
    .trending-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 1px;
      min-width: 0;
      max-width: calc(100% - 40px);
      overflow: hidden;
    }
    
    .trending-content .trending-title {
      color: #1e293b;
      font-weight: 600;
      font-size: 11px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
      width: 100%;
      line-height: 1.3;
      margin-bottom: 1px;
      box-sizing: border-box;
    }
    
    .trending-desc {
      color: #64748b;
      font-size: 10px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
      width: 100%;
      line-height: 1.2;
      box-sizing: border-box;
    }
    
    .trending-new {
      font-size: 14px;
      color: #10b981;
      flex-shrink: 0;
      width: 16px;
      text-align: center;
    }
    
    /* 실시간 환율 위젯 */
    .exchange-widget {
      background: rgba(255, 255, 255, 0.8);
      border: 1px solid #e2e8f0;
      border-radius: 12px;
      padding: 12px;
      margin-top: 0;
      max-width: 850px;  /* ★ 수정: PC에서 더 넓게 (520px → 850px) */
      width: 100%;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
      overflow: hidden;
      box-sizing: border-box;
      flex: 1;
      max-height: 380px;
    }
    
    .exchange-header {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 8px;
      padding-bottom: 6px;
      border-bottom: 1px solid #e2e8f0;
    }
    
    .exchange-icon {
      font-size: 14px;
    }
    
    .exchange-title {
      font-weight: bold;
      color: #1e293b;
      font-size: 14px;
    }
    
    .exchange-time {
      margin-left: auto;
      font-size: 10px;
      color: #64748b;
    }
    
    .exchange-list {
      display: grid;
      grid-template-columns: 1fr;
      gap: 4px;
      max-height: 320px;
      overflow-y: auto;
    }
    
    .exchange-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 4px 8px;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.2s ease;
      font-size: 11px;
      background: rgba(255, 255, 255, 0.6);
      border: 1px solid transparent;
    }
    
    .exchange-item:hover {
      background: rgba(255, 255, 255, 0.9);
      border-color: #8b5cf6;
      transform: translateY(-1px);
    }
    
    .exchange-currency {
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 1;
    }
    
    .exchange-flag {
      font-size: 16px;
      width: 20px;
      height: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      font-family: "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", sans-serif;
      line-height: 1;
    }
    
    .exchange-code {
      font-weight: 600;
      color: #1e293b;
      min-width: 35px;
    }
    
    .exchange-name {
      color: #64748b;
      font-size: 10px;
    }
    
    .exchange-rate {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 1px;
    }
    
    .exchange-value {
      font-weight: 600;
      color: #1e293b;
      font-size: 11px;
    }
    
    .exchange-change {
      font-size: 9px;
      display: flex;
      align-items: center;
      gap: 2px;
    }
    
    .exchange-change.up {
      color: #10b981;
    }
    
    .exchange-change.down {
      color: #ef4444;
    }
    
    .exchange-loading {
      text-align: center;
      color: #64748b;
      font-size: 12px;
      padding: 20px;
    }
    
    /* ★ 추가: 주식 시세 위젯 스타일 */
    .stock-widget {
      background: rgba(255, 255, 255, 0.8);
      border: 1px solid #e2e8f0;
      border-radius: 12px;
      padding: 12px;
      margin-top: 0;
      max-width: 850px;  /* ★ 수정: PC에서 더 넓게 (520px → 850px) */
      width: 100%;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
      overflow: hidden;
      box-sizing: border-box;
      flex: 1;
      max-height: 380px;
    }
    
    .stock-header {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 8px;
      padding-bottom: 6px;
      border-bottom: 1px solid #e2e8f0;
    }
    
    .stock-icon {
      font-size: 14px;
    }
    
    .stock-title {
      font-weight: bold;
      color: #1e293b;
      font-size: 14px;
    }
    
    .stock-time {
      margin-left: auto;
      font-size: 10px;
      color: #64748b;
    }
    
    .stock-list {
      display: grid;
      grid-template-columns: 1fr;
      gap: 4px;
      max-height: 320px;
      overflow-y: auto;
    }
    
    .stock-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 4px 8px;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.2s ease;
      font-size: 11px;
      background: rgba(255, 255, 255, 0.6);
      border: 1px solid transparent;
    }
    
    .stock-item:hover {
      background: rgba(255, 255, 255, 0.9);
      border-color: #3b82f6;
      transform: translateY(-1px);
    }
    
    .stock-info {
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 1;
    }
    
    .stock-symbol {
      font-weight: 600;
      color: #1e293b;
      min-width: 45px;
    }
    
    .stock-name {
      color: #64748b;
      font-size: 10px;
    }
    
    .stock-price-info {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 1px;
    }
    
    .stock-price {
      font-weight: 600;
      color: #1e293b;
      font-size: 11px;
    }
    
    .stock-change {
      font-size: 9px;
      display: flex;
      align-items: center;
      gap: 2px;
    }
    
    .stock-change.up {
      color: #ef4444;
    }
    
    .stock-change.down {
      color: #3b82f6;
    }
    
    .stock-loading {
      text-align: center;
      color: #64748b;
      font-size: 12px;
      padding: 20px;
    }
    
    /* ★ 추가: 코인 시세 위젯 스타일 */
    .crypto-widget {
      background: rgba(255, 255, 255, 0.8);
      border: 1px solid #e2e8f0;
      border-radius: 12px;
      padding: 12px;
      margin-top: 0;
      max-width: 850px;  /* ★ 수정: PC에서 더 넓게 (520px → 850px) */
      width: 100%;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
      overflow: hidden;
      box-sizing: border-box;
      flex: 1;
      max-height: 380px;
    }
    
    .crypto-header {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 8px;
      padding-bottom: 6px;
      border-bottom: 1px solid #e2e8f0;
    }
    
    .crypto-icon {
      font-size: 14px;
    }
    
    .crypto-title {
      font-weight: bold;
      color: #1e293b;
      font-size: 14px;
    }
    
    .crypto-time {
      margin-left: auto;
      font-size: 10px;
      color: #64748b;
    }
    
    .crypto-list {
      display: grid;
      grid-template-columns: 1fr;
      gap: 4px;
      max-height: 320px;
      overflow-y: auto;
    }
    
    .crypto-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 4px 8px;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.2s ease;
      font-size: 11px;
      background: rgba(255, 255, 255, 0.6);
      border: 1px solid transparent;
    }
    
    .crypto-item:hover {
      background: rgba(255, 255, 255, 0.9);
      border-color: #f59e0b;
      transform: translateY(-1px);
    }
    
    .crypto-info {
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 1;
    }
    
    .crypto-logo {
      font-size: 16px;
      width: 20px;
      height: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      font-family: monospace;
      line-height: 1;
    }
    
    .crypto-symbol {
      font-weight: 600;
      color: #1e293b;
      min-width: 40px;
    }
    
    .crypto-name {
      color: #64748b;
      font-size: 10px;
    }
    
    .crypto-price-info {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 1px;
    }
    
    .crypto-price {
      font-weight: 600;
      color: #1e293b;
      font-size: 11px;
    }
    
    .crypto-change {
      font-size: 9px;
      display: flex;
      align-items: center;
      gap: 2px;
    }
    
    .crypto-change.up {
      color: #10b981;
    }
    
    .crypto-change.down {
      color: #ef4444;
    }
    
    .crypto-change.even {
      color: #64748b;
    }
    
    .crypto-volume {
      font-size: 8px;
      color: #94a3b8;
    }
    
    .crypto-loading {
      text-align: center;
      color: #64748b;
      font-size: 12px;
      padding: 20px;
    }     
    .trending-change {
      font-size: 12px;
    }
    
    .trending-change.up { color: #ef4444; }
    .trending-change.down { color: #3b82f6; }
    .trending-change.new { color: #10b981; }
    .trending-change.same { color: #6b7280; }
    
    .trending-loading {
      grid-column: 1 / -1;
      text-align: center;
      color: #64748b;
      font-size: 14px;
      padding: 20px;
    }
    
    /* 새 기능 안내 스타일 */
    .feature-notice {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      border-radius: 12px;
      margin: 0;
      max-width: 900px;  /* ★ 수정: PC에서 더 넓게 (650px → 900px) */
      width: 100%;
      color: white;
      box-shadow: 0 6px 24px rgba(102, 126, 234, 0.2);
      animation: slideInUp 0.6s ease-out;
      position: relative;
      overflow: visible; /* hidden에서 visible로 변경하여 내용이 잘리지 않도록 */
      flex: 1;
      max-height: 400px;
    }
    
    .feature-notice::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
      background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
      animation: shimmer 3s infinite;
    }
    
    @keyframes shimmer {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(100%); }
    }
    
    @keyframes slideInUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    @keyframes slideOutDown {
      from {
        opacity: 1;
        transform: translateY(0);
      }
      to {
        opacity: 0;
        transform: translateY(30px);
      }
    }
    
    .notice-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 15px 6px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .notice-icon {
      font-size: 16px;
      margin-right: 8px;
    }
    
    .notice-title {
      font-size: 14px;
      font-weight: bold;
      flex: 1;
    }
    
    .notice-close {
      background: rgba(255, 255, 255, 0.2);
      border: none;
      color: white;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      cursor: pointer;
      font-size: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s ease;
    }
    
    .notice-close:hover {
      background: rgba(255, 255, 255, 0.3);
      transform: scale(1.1);
    }
    
    .notice-content {
      padding: 0 15px 15px;
    }
    
    .notice-content p {
      margin: 6px 0;
      line-height: 1.4;
      font-size: 12px;
    }
    
    .globe-icon {
      background: rgba(255, 255, 255, 0.2);
      padding: 4px 8px;
      border-radius: 8px;
      font-size: 16px;
    }
    
    .notice-examples {
      background: rgba(255, 255, 255, 0.1);
      border-radius: 6px;
      padding: 8px;
      margin: 8px 0;
    }
    
    .example-item {
      background: rgba(255, 255, 255, 0.15);
      border-radius: 4px;
      padding: 4px 8px;
      margin: 2px 0;
      font-style: italic;
      border-left: 2px solid #4ecdc4;
      font-size: 11px;
    }
    
    .notice-tip {
      background: rgba(255, 255, 255, 0.1);
      border-radius: 4px;
      padding: 6px;
      margin-top: 8px !important;
      border-left: 2px solid #45b7d1;
      font-size: 11px;
    }
    
/* ========== 메시지 스타일 → css/components/messages.css로 이동 (2025-10-02) ========== */
    /* .message, .message-avatar, .message-bubble, .message-text, */
    /* .message-actions, .action-btn, .response-time - 205 라인 */
    
    
    /* 파일 업로드 버튼 스타일링 */
    .file-upload-btn, .latest-info-btn, .voice-chat-btn {
      width: 36px;
      height: 36px;
      border: none;
      border-radius: 18px;
      background: var(--bg-secondary);
      color: var(--text-secondary);
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      flex-shrink: 0;
      justify-content: center;
      font-size: 16px;
      margin-right: 8px;
      position: relative;
    }
    
    .file-upload-btn:hover, .latest-info-btn:hover, .voice-chat-btn:hover {
      background: var(--primary-color);
      color: white;
      transform: translateY(-1px);
    }
    
    /* 모델 선택기 스타일 */
    .model-selector-container {
      position: relative;
      margin-right: 8px;
    }
    
    .model-selector-btn {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 6px 12px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      border-radius: 18px;
      color: var(--text-primary);
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
      white-space: nowrap;
    }
    
    .model-selector-btn:hover {
      background: var(--primary-color);
      color: white;
      border-color: var(--primary-color);
    }
    
    .model-selector-btn #model-selector-icon {
      font-size: 14px;
    }
    
    .model-dropdown {
      position: absolute;
      bottom: calc(100% + 8px);
      left: 0;
      background: var(--bg-primary);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
      padding: 8px;
      min-width: 200px;
      z-index: 1000;
    }
    
    .model-option {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 12px;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .model-option:hover {
      background: var(--bg-secondary);
    }
    
    .model-option.active {
      background: rgba(59, 130, 246, 0.1);
      color: var(--primary-color);
    }
    
    .model-option i {
      font-size: 16px;
      width: 20px;
      text-align: center;
      flex-shrink: 0;
    }
    
    .model-option-info {
      flex: 1;
    }
    
    .model-option-name {
      font-weight: 600;
      font-size: 14px;
      margin-bottom: 2px;
    }
    
    .model-option-desc {
      font-size: 11px;
      color: var(--text-secondary);
      line-height: 1.3;
    }
    
/* ========================================================
 * 환영 화면 추가 스타일 (head_style_0018.css에서 이동, 2025-10-02)
 * Phase 2.2f: 환영 화면 나머지 분리
 * 원본 위치: head_style_0018.css 라인 20-114 (95 라인)
 * ======================================================== */

    .welcome-screen {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: calc(100vh - 200px);
      text-align: center;
      gap: 8px;
      padding: 20px;
      max-width: 800px;
      width: 100%;
      margin: 0 auto;
    }
    
    .welcome-content {
      display: flex;
      flex-direction: row;
      gap: 12px;
      width: 100%;
      max-width: 1400px;
      margin-top: 10px;
      justify-content: center;
      align-items: flex-start;
    }
    
    /* 1920x1080 해상도 최적화 */
/* @media 블록 → css/mobile.css로 이동 (라인 83-92) */
    
    /* ★ 추가: 2K 해상도 최적화 (2560px) */
/* @media 블록 → css/mobile.css로 이동 (라인 95-111) */
    
    /* ★ 추가: 4K 해상도 최적화 (3840px) */
/* @media 블록 → css/mobile.css로 이동 (라인 114-130) */
    
    /* 중간 해상도 대응 */
/* @media 블록 → css/mobile.css로 이동 (라인 133-142) */
    
    .welcome-logo {
      font-size: 48px;
      background: var(--gradient-primary);
      background-clip: text;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }
    
    .welcome-title {
      font-size: 20px;
      font-weight: 700;
      margin-bottom: 4px;
      color: var(--text-primary) !important; /* 가독성 향상 */
    }

    .welcome-greeting .user-name {
      font-size: clamp(2.2rem, 3vw, 2.8rem);
      font-weight: 800;
      color: var(--primary-color);
      display: inline-block; /* 균일한 줄높이 확보 */
    }

    .welcome-subtitle {
      font-size: 14px;
      color: var(--text) !important; /* 더 진한 색상으로 변경 (var(--text-secondary) → var(--text)) */
      max-width: 850px;  /* ★ 수정: PC에서 더 넓게 (520px → 850px) */
      margin-bottom: 8px;
    }
    
/* ========================================================
 * 위젯 스타일 → css/welcome.css로 이동 (2025-10-02, Phase 2.2c)
 * 원본 위치: 라인 165-972 (808 라인)
 * 새 위치: css/welcome.css
 * ======================================================== */
    /* 최신 정보 버튼 활성 상태 */
    .latest-info-btn.active {
      background: var(--success-color) !important;
      color: white !important;
      box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
    }
    
    .latest-info-btn.active i {
      animation: pulse 2s infinite;
    }
    
    /* 최신 정보 툴팁 */
    .latest-info-tooltip {
      position: absolute;
      bottom: 120%;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(0, 0, 0, 0.8);
      color: white;
      padding: 8px 12px;
      border-radius: 6px;
      font-size: 12px;
      white-space: nowrap;
      opacity: 0;
      transition: opacity 0.3s;
      pointer-events: none;
      z-index: 1000;
    }
    
    .latest-info-btn:hover .latest-info-tooltip {
      opacity: 1;
    }
