/* Custom CSS for OkView - Pink Modern Design */

:root {
    --primary-pink: #ff6b9d;
    --secondary-pink: #ff8fab;
    --light-pink: #ffe0e7;
    --dark-pink: #e91e63;
    --gradient-pink: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
    --gradient-pink-light: linear-gradient(135deg, #ffe0e7 0%, #ffcdd8 100%);
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --text-dark: #2c3e50;
    --shadow: 0 10px 30px rgba(255, 107, 157, 0.2);
    --shadow-hover: 0 15px 40px rgba(255, 107, 157, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #fff5f8 0%, #ffe8f1 100%);
    min-height: 100vh;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Navigation Styles */
.bg-gradient-pink {
    background: var(--gradient-pink) !important;
    box-shadow: 0 2px 20px rgba(255, 107, 157, 0.3);
}

.navbar-light .navbar-brand {
    color: white !important;
}

.brand-text {
    background: linear-gradient(45deg, #fff, #ffb3d1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-outline-white {
    border-color: white;
    color: white;
    transition: all 0.3s ease;
    border-radius: 50px;
    padding: 8px 20px;
}

.btn-outline-white:hover {
    background-color: white;
    color: var(--primary-pink);
    transform: translateY(-2px);
    border-color: white;
}

.btn-white {
    background-color: white;
    color: var(--primary-pink);
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 50px;
    padding: 8px 20px;
}

.btn-white:hover {
    background-color: var(--light-pink);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: var(--primary-pink);
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: white !important;
    transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, rgba(255, 235, 248, 0.3) 0%, rgba(255, 205, 216, 0.3) 100%);
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient-pink);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-pink);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
    margin-top: 0.5rem;
}

.hero-image {
    position: relative;
    height: 400px;
}

.floating-card {
    position: absolute;
    background: white;
    border-radius: 20px;
    padding: 20px 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-weight: 600;
    animation: floatCard 6s ease-in-out infinite;
    min-width: 150px;
}

.floating-card i {
    font-size: 2rem;
    color: var(--primary-pink);
    margin-bottom: 0.5rem;
}

.floating-card h5 {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-dark);
}

.floating-card:nth-child(1) {
    top: 20%;
    right: 20%;
    animation-delay: 0s;
}

.floating-card.delay-1 {
    top: 50%;
    right: 10%;
    animation-delay: 2s;
}

.floating-card.delay-2 {
    top: 70%;
    right: 30%;
    animation-delay: 4s;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

/* Search Section */
.search-section {
    padding: 80px 0;
}

/* Sticky Navbar */
.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020;
}

.search-card {
    background: white;
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 40px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.search-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-pink);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.form-label {
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-select, .form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-select:focus, .form-control:focus {
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 157, 0.25);
    transform: translateY(-1px);
}

.search-buttons {
    margin-top: 2rem;
}

.btn-primary {
    background: var(--gradient-pink);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 50px;
    padding: 12px 30px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 100%);
}

.btn-gradient {
    background: var(--gradient-pink);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 50px;
    padding: 12px 30px;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 100%);
    color: white;
}

.btn-outline-secondary, .btn-outline-primary {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover, .btn-outline-primary:hover {
    transform: translateY(-2px);
}

/* Results Section */
.results-section {
    padding: 40px 0 80px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.video-card {
    background: white;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 107, 157, 0.15);
}

.video-thumbnail-container {
    position: relative;
    overflow: hidden;
}

.video-thumbnail {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.video-card:hover .video-thumbnail {
    transform: scale(1.05);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--gradient-pink);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.duration-badge {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.country-flag {
    font-size: 20px;
}

.video-info {
    padding: 20px;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.video-channel {
    color: var(--primary-pink);
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.video-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6c757d;
}

.stat-item i {
    width: 14px;
}

.video-tags {
    display: flex;
    flex-wrap: wrap;
    row-gap: 10px; /* ✅ 줄 간 여백 추가 */
    gap: 6px;
    margin-top: 12px;
}

.tag-pill {
    background: var(--gradient-pink-light);
    color: var(--dark-pink);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 6px; /* ✅ 아래쪽 여백 추가 */
}

.tag-pill:hover {
    background: var(--gradient-pink);
    color: white;
    transform: translateY(-1px);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-content {
    text-align: center;
}

.loading-content p {
    margin-top: 1rem;
    color: var(--text-dark);
    font-weight: 500;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
}

.modal-header {
    background: var(--gradient-pink);
    color: white;
    border-bottom: none;
}

.modal-title {
    font-weight: 600;
}

.btn-close {
    filter: brightness(0) invert(1);
}

/* Trending Keywords */
.trending-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.keyword-tag {
    background: var(--gradient-pink-light);
    color: var(--dark-pink);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--light-pink);
    transition: all 0.3s ease;
    cursor: pointer;
}

.keyword-tag:hover {
    background: var(--gradient-pink);
    color: white;
    transform: translateY(-2px);
}

.keyword-rank {
    background: var(--primary-pink);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    margin-right: 8px;
}

/* Keyword Ranking Table */
.ranking-table {
    width: 100%;
    margin-top: 1rem;
}

.ranking-table th {
    background: var(--gradient-pink-light);
    color: var(--dark-pink);
    font-weight: 600;
    border: none;
}

.ranking-table td {
    padding: 12px;
    vertical-align: middle;
    border-color: #f8f9fa;
}

.ranking-table tr:hover {
    background: rgba(255, 107, 157, 0.05);
}

.bg-pink {
    background: var(--primary-pink) !important;
}

.trend-up {
    color: #28a745;
}

.trend-down {
    color: #dc3545;
}

.trend-stable {
    color: #6c757d;
}

/* Profile Page Styles */
.profile-card {
    background: white;
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 40px;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--gradient-pink);
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.3);
}

.avatar-decoration {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--gradient-pink);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}

.profile-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.profile-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
}

.profile-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

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

.info-item i {
    color: var(--primary-pink);
    width: 20px;
}

.info-label {
    font-weight: 500;
    margin-right: 8px;
    min-width: 80px;
}

.info-value {
    color: var(--text-dark);
}

.family-member-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--gradient-pink-light);
    border-radius: 16px;
    border-left: 4px solid var(--primary-pink);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.family-member-card:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.15);
}

.member-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-pink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.member-info h6 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 8px;
}

.section-title {
    color: var(--text-dark);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--light-pink);
}

.skills-container {
    margin-top: 16px;
}

.skill-item {
    margin-bottom: 20px;
}

.skill-name {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.skill-bar {
    background-color: #f8f9fa;
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-pink);
    border-radius: 10px;
    transition: width 2s ease-in-out;
    position: relative;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.stat-card {
    background: var(--gradient-pink-light);
    padding: 2rem 1rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-pink);
    box-shadow: 0 15px 30px rgba(255, 107, 157, 0.2);
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    color: #6c757d;
    font-weight: 500;
    font-size: 14px;
}

.feature-card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    height: 100%;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-pink);
    box-shadow: 0 20px 40px rgba(255, 107, 157, 0.15);
}

.feature-card i {
    color: var(--primary-pink);
    margin-bottom: 1rem;
}

.feature-card h6 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer h5 {
    color: white;
    margin-bottom: 1rem;
}

.footer .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .search-card {
        padding: 20px;
    }
    
    .profile-image {
        width: 150px;
        height: 150px;
    }
    
    .profile-name {
        font-size: 2rem;
    }
}
.video-tags-container {
  position: relative;
  margin-top: 10px;
}

.video-tags {
  max-height: 2.4em; /* 한 줄 높이 정도 */
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.video-tags.expanded {
  max-height: 500px; /* 충분히 큰 값 */
}

.toggle-tags-btn {
  margin-top: 5px;
  display: block;
}

.video-tags-container.collapsed {
  max-height: 1.4em;
  overflow: hidden;
}

.video-tags-container.expanded {
  max-height: none;
}
.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 12px;
  margin-right: 4px;
  color: white;
}

.view-icon {
  background-color: #007bff; /* 파랑 */
}
.like-icon {
  background-color: #28a745; /* 초록 */
}
.comment-icon {
  background-color: #ffc107; /* 노랑 */
  color: #333; /* 검정 텍스트로 변경 */
}
.date-icon {
  background-color: #17c9e4; /* 하늘 */
}
.flag-badge {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 18px;
    background: rgba(255,255,255,0.9);
    border-radius: 10px;
    padding: 1px 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
/* 입력 요소 전체 줄이기 */
.form-control,
.form-select {
    padding: 0.25rem 0.5rem;
    height: 36px;
    font-size: 0.9rem;
}

/* 라벨 간격 줄이기 */
.form-label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

/* 버튼 줄이기 */
.btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.95rem;
}
/* 행 간격 줄이기 */
.row.g-3 {
    --bs-gutter-y: 0.5rem;
    --bs-gutter-x: 0.5rem;
}

/* 전체 폼 여백 축소 */
form {
    margin-bottom: 1rem;
}


@media (max-width: 576px) {
  #keywordRanking table th:nth-child(3),  /* 트렌드 점수 헤더 */
  #keywordRanking table td:nth-child(3),   /* 트렌드 점수 데이터 */
  #keywordRanking table th:nth-child(4),  /* 트렌드 점수 헤더 */
  #keywordRanking table td:nth-child(4),   /* 트렌드 점수 데이터 */
  #keywordRanking table th:nth-child(5),  /* 트렌드 점수 헤더 */
  #keywordRanking table td:nth-child(5)   /* 트렌드 점수 데이터 */
  {
    display: none;
  }
}
@media (max-width: 576px) {
  .form-row-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }

  .form-row-mobile .form-group {
    flex: 1 1 calc(50% - 6px);
  }

  .form-row-mobile .form-group.full-width {
    flex: 1 1 100%;
  }

  .form-group select,
  .form-group input {
    width: 100%;
  }
}
.form-row-responsive {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.form-row-responsive .form-group {
  flex: 1 1 25%; /* PC에서는 4등분 */
}

@media (max-width: 576px) {
  .form-row-responsive .form-group {
    flex: 1 1 calc(50% - 6px); /* 모바일은 2등분 */
  }

  .form-row-responsive .form-group.full-width-on-mobile {
    flex: 1 1 100%;
  }
}
.video-info {
    padding: 12px 16px 10px 16px;
}

.video-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.video-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1.4;
    color: #222;
}

.video-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

.channel-info-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.channel-thumb-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.channel-name {
    font-weight: 600;
    color: #333;
}

.channel-subs {
    font-size: 0.85rem;
    color: #777;
    display: flex;
    align-items: center;
}

.video-label-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
}

.video-label-time .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
}


