/* ==========================================================
   TikTok Profile Tools – Combined Profile & Videos Style
   ========================================================== */

/* ----------- GLOBAL RESET ----------- */
.tpct-widget * {
  box-sizing: border-box;
  font-family: 'Poppins', 'Segoe UI', Roboto, sans-serif;
}

.tpct-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 20px;
}

/* ----------- INPUT SECTION ----------- */
.tpct-widget input {
  padding: 12px 16px;
  border: 2px solid var(--tpct-border);
  border-radius: 10px;
  width: 80%;
  max-width: 320px;
  margin: 8px auto;
  display: block;
  font-size: 15px;
  outline: none;
  background-color: var(--tpct-input-bg);
  color: var(--tpct-text);
  transition: all 0.3s ease;
}

.tpct-widget input:focus {
  border-color: var(--tpct-accent);
  box-shadow: 0 0 0 3px rgba(255, 0, 80, 0.15);
  transform: translateY(-1px);
}

.tpct-widget button {
  background: var(--tpct-accent);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
  margin: 8px auto;
  display: block;
  width: 80%;
  max-width: 320px;
}

.tpct-widget button:hover {
  background: var(--tpct-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 0, 80, 0.3);
}

.tpct-widget button:active {
  transform: scale(0.98);
}

/* ----------- COMBINED CARD LAYOUT ----------- */
.tpct-combined-card {
  width: 100%;
  max-width: 600px;
  margin-top: 20px;
}

.tpct-card {
  background-color: var(--tpct-card-bg);
  color: var(--tpct-text);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  width: 100%;
  margin-bottom: 20px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tpct-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

/* ----------- HEADER SECTION ----------- */
.tpct-header {
  background: linear-gradient(135deg, #ff0050, #ff7a00);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.tpct-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #fff;
  object-fit: cover;
  background-color: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tpct-info {
  flex: 1;
  min-width: 0;
}

.tpct-username {
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

.tpct-bio {
  font-size: 0.95rem;
  color: #fff;
  opacity: 0.95;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* ----------- STAT GRID ----------- */
.tpct-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  padding: 24px 10px;
  background-color: var(--tpct-card-bg);
  gap: 10px;
}

.tpct-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
}

.tpct-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--tpct-accent);
}

.tpct-label {
  font-size: 0.9rem;
  color: var(--tpct-subtext);
  font-weight: 500;
}

/* ----------- VIDEOS SECTION ----------- */
.tpct-videos-section {
  background-color: var(--tpct-card-bg);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  overflow: hidden;
}

.tpct-videos-header {
  background: linear-gradient(135deg, #00b2ff, #0066ff);
  padding: 20px;
  text-align: center;
}

.tpct-videos-header h3 {
  margin: 0;
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
}

/* ----------- VIDEO GRID ----------- */
.tpct-video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 20px;
}

.tpct-thumb {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--tpct-border);
  transition: all 0.3s ease;
  aspect-ratio: 9/16;
  background: #f0f0f0;
}

.tpct-thumb:hover {
  transform: translateY(-3px);
  border-color: var(--tpct-accent);
  box-shadow: 0 8px 20px rgba(255, 0, 80, 0.2);
}

.tpct-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.tpct-thumb:hover img {
  transform: scale(1.05);
}

/* ----------- RESPONSIVE DESIGN ----------- */
@media (max-width: 768px) {
  .tpct-widget {
    padding: 15px;
  }
  
  .tpct-header {
    flex-direction: column;
    text-align: center;
    padding: 20px;
    gap: 12px;
  }

  .tpct-avatar {
    width: 70px;
    height: 70px;
  }

  .tpct-stats {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px 10px;
  }
  
  .tpct-video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .tpct-video-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }
  
  .tpct-widget input,
  .tpct-widget button {
    width: 90%;
  }
}

/* ----------- THEME VARIABLES ----------- */
:root {
  --tpct-accent: #ff0050;
  --tpct-accent-hover: #e60046;
  --tpct-card-bg: #ffffff;
  --tpct-panel: #f8f9fa;
  --tpct-border: #e1e5e9;
  --tpct-text: #2c2c2c;
  --tpct-text-strong: #111;
  --tpct-subtext: #666;
  --tpct-input-bg: #fff;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --tpct-card-bg: #1e1e1e;
    --tpct-panel: #2a2a2a;
    --tpct-border: #333;
    --tpct-text: #e9e9e9;
    --tpct-text-strong: #fff;
    --tpct-subtext: #aaa;
    --tpct-input-bg: #2a2a2a;
  }

  .tpct-card, .tpct-videos-section {
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  }

  .tpct-widget input {
    border: 2px solid #444;
    color: #e9e9e9;
  }
}

/* ----------- ANIMATIONS ----------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.tpct-combined-card {
  animation: fadeIn 0.5s ease-out;
}