    :root {
      --primary-color: #4285f4;
      --danger-color: #ea4335;
      --success-color: #34a853;
      --warning-color: #fbbc05;
      --dark-color: #202124;
    }
    
    body {
      background-color: #f8f9fa;
      font-family: 'Noto Sans KR', sans-serif;
    }
    
    .navbar-brand {
      font-weight: 700;
      color: var(--danger-color) !important;
    }
    
    .card {
      border-radius: 10px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
      margin-bottom: 20px;
      border: none;
    }
    
    .card-header {
      background-color: var(--primary-color);
      color: white;
      border-radius: 10px 10px 0 0 !important;
      font-weight: 600;
    }
    
    .btn-google {
      background-color: var(--primary-color);
      color: white;
    }
    
    .btn-kakao {
      background-color: #fee500;
      color: #3c1e1e;
    }
    
    .search-box {
      max-width: 800px;
      margin: 0 auto;
    }
    
    /* 검색 로그 스타일 */
    #recentSearches {
        margin-top: 5px;
    }


/* 검색 중인 키워드 스타일 (글자 짤림 방지) */
.keyword-badge.searching {
    background-color: #fff3cd !important;
    color: #856404 !important;
    border: 1px solid #ffeeba;
    max-width: none !important; /* 최대 너비 제한 해제 */
    white-space: nowrap !important; /* 줄바꿈 방지 */
    overflow: visible !important; /* 넘치는 내용 표시 */
    text-overflow: clip !important; /* 텍스트 잘림 방지 */
    position: relative; /* z-index 적용을 위해 */
    z-index: 1; /* 다른 요소 위에 표시 */
}

/* 모바일에서도 검색 중인 키워드는 짤리지 않도록 */
@media (max-width: 768px) {
    .keyword-badge {
        max-width: 80px;
    }
    .keyword-badge.searching {
        max-width: none !important;
    }
}

    .keyword-badge {
        cursor: pointer;
        transition: all 0.2s;
        margin-right: 5px;
        margin-bottom: 5px;
        display: inline-block;
        max-width: 120px;
       /*white-space: nowrap;*/
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .keyword-badge:hover {
        background-color: #e9ecef !important;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

/* 광고 팝업 스타일 */
.ad-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-popup-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.ad-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.ad-popup-body {
    padding: 10px 0;
}

/* 광고 컨테이너 애니메이션 */
.ad-container {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
    
    .log-item {
      border-left: 4px solid var(--primary-color);
      padding-left: 15px;
      margin-bottom: 10px;
    }
    
    .log-item.success {
      border-left-color: var(--success-color);
    }
    
    .log-item.warning {
      border-left-color: var(--warning-color);
    }
    
    .log-item.danger {
      border-left-color: var(--danger-color);
    }
    
    .rank-badge {
      font-size: 16px;
      padding: 5px 10px;
      border-radius: 20px;
    }
    
    .rank-1 {
      background-color: gold;
    }
    
    .rank-2 {
      background-color: silver;
    }
    
    .rank-3 {
      background-color: #cd7f32;
    }
    
    .rank-other {
      background-color: #e9ecef;
    }
    
    .video-thumbnail {
      width: 120px;
      height: 90px;
      object-fit: cover;
      border-radius: 5px;
    }
    
    .user-greeting {
      font-weight: 600;
      color: var(--primary-color);
    }

    /* 모바일 전용 스타일 */
    @media (max-width: 768px) {
      .mobile-order-1 {
        order: 1;
      }
      .mobile-order-2 {
        order: 2;
      }
      .mobile-order-3 {
        order: 3;
      }
      .keyword-badge {
        max-width: 80px;
      }
      .video-title-truncate {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
      }
    }

    /* 검색 로그 패널 스타일 - 개선된 버전 */
    #progressLogs {
        background-color: #1e1e1e;
        color: #e0e0e0;
        padding: 15px;
        border-radius: 8px;
        font-family: 'Courier New', monospace;
        font-size: 14px;
        line-height: 1.6;
        white-space: pre-wrap;
        box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    }

    #progressLogs div {
        margin-bottom: 6px;
        padding-bottom: 6px;
        border-bottom: 1px solid #2a2a2a;
        opacity: 0;
        animation: fadeIn 0.5s ease-out forwards;
        animation-delay: calc(var(--order) * 0.1s);
    }

    #progressLogs div:last-child {
        border-bottom: none;
    }

/* 검색 진행 로그 스타일 추가 */
#progressLogs .log-progress {
    color: #17a2b8; /* 정보성 색상 (파란계열) */
    font-weight: bold;
}

#progressLogs .log-processing {
    color: #6c757d; /* 중간 단계 색상 (회색계열) */
}

#progressLogs .log-warning {
    color: #ffc107; /* 경고 색상 (노란계열) */
}

#progressLogs .log-error {
    color: #dc3545; /* 오류 색상 (빨간계열) */
}

#progressLogs .log-success {
    color: #28a745; /* 성공 색상 (초록계열) */
}

    #progressLogs .log-final-rank {
        background-color: rgba(76, 175, 80, 0.2);
        padding: 8px;
        border-radius: 4px;
        border-left: 4px solid #4CAF50;
        margin: 10px 0;
        font-weight: bold;
        color: #4CAF50;
        display: flex;
        align-items: center;
    }

    #progressLogs .log-final-rank i {
        margin-right: 8px;
        font-size: 18px;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(5px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* 검색 진행 바 애니메이션 */
    .progress-bar-animated {
        animation: progress-bar-stripes 1s linear infinite;
    }

    @keyframes progress-bar-stripes {
        from { background-position: 1rem 0; }
        to { background-position: 0 0; }
    }

    /* 접기/펼치기 버튼 스타일 */
    .toggle-history-btn {
      cursor: pointer;
      transition: all 0.3s;
      background-color: var(--primary-color);
      color: white;
      border: none;
      padding: 5px 10px;
      border-radius: 4px;
    }
    .toggle-history-btn:hover {
      background-color: #2a6fd6;
    }
    .history-item {
      transition: all 0.3s ease;
    }
    .history-item.collapsed {
      display: none;
    }
    
    /* PC 레이아웃 조정 */
    @media (min-width: 992px) {
      .system-info-col {
        order: 2;
      }
      .search-box-col {
        order: 1;
      }
    }
  </style>