@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css");

/* Reset and Base Styles */
  button,
  html input[type="button"],
  input[type="reset"],
  input[type="submit"] {
    padding: 0px;
  }

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

  .wrapper {
    font-family:
      "Inter",
      -apple-system,
      BlinkMacSystemFont,
      "Segoe UI",
      Roboto,
      Oxygen,
      Ubuntu,
      Cantarell,
      sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
  }

  .wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
      radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
      radial-gradient(circle at 40% 40%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    pointer-events: none;
  }

  .main-contain {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
  }

  /* Professional Instagram Tool Wrapper */
  .ig-tool-wrapper {
    width: 100%;
    margin: 20px auto;
    padding: 40px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(59, 130, 246, 0.2);
    color: #1e293b;
    text-align: center;
    box-shadow:
      0 25px 50px rgba(0, 0, 0, 0.15),
      0 0 0 1px rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
  }

  .ig-tool-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    pointer-events: none;
  }

  .ig-header h3 {
    font-size: 42px;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: -1px;
    text-shadow: none;
    position: relative;
    z-index: 2;
    display: inline-block;
  }

  .viewer-anonymous {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
  }

  .viewer-anonymous::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    border-radius: 2px;
    animation: underlineGlow 2s ease-in-out infinite alternate;
  }

  @keyframes underlineGlow {
    0% {
      opacity: 0.7;
      transform: scaleX(0.95);
    }
    100% {
      opacity: 1;
      transform: scaleX(1.05);
    }
  }

  .ig-header p {
    font-size: 18px;
    margin: 20px 0 30px;
    line-height: 1.7;
    font-weight: 400;
    color: #4a5568;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
  }

  /* Professional Input Area */
  .ig-input-area {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 30px 25px;
    border-radius: 20px;
    gap: 20px;
    margin: 0 auto;
    max-width: 100%;
    flex-wrap: wrap;
    box-shadow:
      0 15px 35px rgba(0, 0, 0, 0.1),
      0 0 0 2px rgba(59, 130, 246, 0.1);
    position: relative;
    border: 2px solid rgba(59, 130, 246, 0.2);
  }

  .ig-icon {
    font-size: 16px;
    color: #4a5568;
    font-weight: 600;
    width: 100%;
    text-align: left;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
  }

  .ig-input-area input {
    flex-grow: 1;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #3b82f6;
    outline: none;
    min-width: 200px;
    background: transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
    color: #1e293b;
    font-weight: 500;
    position: relative;
    z-index: 2;
  }

  .ig-input-area input:focus {
    background: rgba(59, 130, 246, 0.05);
    border-color: #1e40af;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
  }

  .error-container {
    margin-top: 25px;
    position: absolute;
    bottom: -60px;
    left: 20px;
    right: 20px;
  }

  #error-message {
    color: #e53935;
    margin-top: 25px;
    display: none;
    font-weight: 500;
  }

  .paste-btn,
  .view-btn {
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 16px 24px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
    text-transform: none;
    letter-spacing: 0.5px;
    background-clip: padding-box;
  }

  .paste-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    border: 2px solid #3b82f6;
  }

  .paste-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    border-color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
  }

  .view-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    border: 2px solid #8b5cf6;
  }

  .view-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    border-color: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
  }

  .view-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: #cbd5e1;
    border-color: #cbd5e1;
    box-shadow: none;
  }

  /* Ad Space */
  .ad-space {
    display: none;
    margin-top: 20px;
    text-align: center;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    padding: 6px;
    background: linear-gradient(135deg, #e53935, #1e88e5 35%, #8e24aa 70%, #ec407a);
    background-size: 300% 300%;
    animation: gradientBorder 6s ease infinite;
  }

  @keyframes gradientBorder {
    0% {
      background-position: 0% 50%;
    }

    50% {
      background-position: 100% 50%;
    }

    100% {
      background-position: 0% 50%;
    }
  }

  .ad-inner {
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    animation: floatAd 5s ease-in-out infinite;
  }

  @keyframes floatAd {
    0%,
    100% {
      transform: translateY(0px);
    }

    50% {
      transform: translateY(-5px);
    }
  }

  .ad-placeholder {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
  }

  .ad-placeholder::before {
    content: "Sponsored";
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #fff;
    color: #ec407a;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 5px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
    animation: pulseTag 2s infinite;
    z-index: 2;
  }

  @keyframes pulseTag {
    0% {
      transform: scale(1);
      opacity: 1;
    }

    50% {
      transform: scale(1.05);
      opacity: 0.85;
    }

    100% {
      transform: scale(1);
      opacity: 1;
    }
  }

  .ad-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
  }

  .ad-placeholder:hover .ad-image {
    animation: wiggle 0.4s ease;
    transform: scale(1.04);
  }

  @keyframes wiggle {
    0% {
      transform: rotate(0deg);
    }

    25% {
      transform: rotate(1.5deg);
    }

    50% {
      transform: rotate(-1.5deg);
    }

    75% {
      transform: rotate(1.5deg);
    }

    100% {
      transform: rotate(0deg);
    }
  }

  .note {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 15px;
    font-style: italic;
  }

  /* Result Section */
  .tools-result {
    width: 100%;
    margin-top: 60px;
  }

  .ig-result {
    margin-top: 30px;
    background: white;
    border-radius: 20px;
    padding: 30px;
    color: #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.5s ease-out;
  }

  /* Profile Header */
  .ig-profile-header {
    margin-bottom: 40px;
    position: relative;
    background: linear-gradient(to bottom, #f9fafb, #ffffff);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
  }

  .profile-header-content {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
  }

  .profile-image-container {
    position: relative;
    flex-shrink: 0;
  }

  .profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    background: linear-gradient(to bottom right, #1e88e5, #ec407a);
    padding: 3px;
    min-height: 150px;
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 60px;
  }

  .profile-image:hover {
    transform: scale(1.03);
  }

  .view-profile-img {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: #1e88e5;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(30, 136, 229, 0.3);
    z-index: 5;
  }

  .view-profile-img:hover {
    transform: scale(1.1) rotate(15deg);
    background-color: #1a75c6;
  }

  .profile-info {
    flex: 1;
    text-align: left;
    min-width: 250px;
  }

  .profile-info h3 {
    font-size: 24px;
    margin: 0 0 5px;
    font-weight: 700;
    color: #1e293b;
  }

  .profile-info h4 {
    font-size: 18px;
    margin: 0 0 15px;
    font-weight: 600;
    color: #475569;
  }

  .stats {
    display: flex;
    gap: 25px;
    margin: 15px 0;
  }

  .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
  }

  .stat-label {
    font-size: 14px;
    color: #64748b;
    margin-top: 3px;
  }

  .profile-bio {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    text-align: left;
    color: #475569;
    line-height: 1.6;
  }

  .profile-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1e88e5;
    text-decoration: none;
    font-weight: 500;
    margin-top: 10px;
    transition: all 0.3s;
  }

  .profile-link:hover {
    color: #1a75c6;
    text-decoration: underline;
  }

  /* Tabs */
  .ig-tabs {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    gap: 15px;
    flex-wrap: wrap;
  }

  .ig-tabs button {
    background: #f8fafc;
    color: #64748b;
    border: none;
    font-weight: 600;
    font-size: 15px;
    padding: 12px 24px;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }

  .ig-tabs button i {
    font-size: 16px;
  }

  .ig-tabs button.active {
    background: linear-gradient(135deg, #1e88e5, #ec407a);
    color: white;
    box-shadow: 0 5px 15px rgba(30, 136, 229, 0.3);
    transform: translateY(-2px);
  }

  .ig-tabs button:hover:not(.active) {
    background: #f1f5f9;
    color: #334155;
    transform: translateY(-2px);
  }

  /* Tab Content */
  .tab-content {
    padding: 20px;
    text-align: center;
    color: #666;
    display: none;
  }

  .tab-content.active {
    display: block;
  }

  .no-result {
    border: 1px dashed #cbd5e1;
    padding: 30px 20px;
    margin-top: 30px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    border-radius: 12px;
    color: #64748b;
    background: #f8fafc;
  }

  .no-result i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 15px;
    display: block;
  }

  /* Private Account Message */
  .private-account-message {
    background-color: rgba(229, 57, 53, 0.1);
    color: #e53935;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
    border: 1px solid rgba(229, 57, 53, 0.2);
    animation: fadeIn 0.5s ease-out;
  }

  .private-account-message i {
    margin-right: 8px;
    font-size: 18px;
  }

  /* Posts Grid */
  .posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 25px;
  }

  .post-card {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
    border: 1px solid #f1f5f9;
    animation: slideUp 0.5s ease-out;
    animation-fill-mode: both;
  }

  .post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  }

  .post-img-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
  }

  .post-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
  }

  .post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 3;
  }

  .post-img-container:hover .post-overlay {
    opacity: 1;
  }

  .post-img-container:hover .post-thumb {
    transform: scale(1.08);
  }

  .post-download-btn,
  .post-view-btn {
    background: white;
    color: #ec407a;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 16px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }

  .post-download-btn:hover,
  .post-view-btn:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 8px 20px rgba(30, 136, 229, 0.15);
  }

  .post-download-btn:hover {
    background: #1e88e5;
    color: white;
  }

  .post-view-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
  }

  .post-view-btn:hover {
    background: white;
    transform: scale(1.1);
  }

  .post-meta {
    padding: 20px;
  }

  .post-stats,
  .reel-stats {
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.15), rgba(236, 64, 122, 0.15));
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(30, 136, 229, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .post-stats span,
  .reel-stats span {
    color: #1e293b;
    font-weight: 600;
    font-size: 13px;
  }

  .post-stats span i,
  .reel-stats span i {
    color: #ec407a;
    margin-right: 4px;
  }

  .post-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
  }

  .post-stats span {
    font-size: 14px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .post-stats span i {
    color: #ec407a;
  }

  .post-meta .caption {
    font-size: 15px;
    color: #334155;
    margin-bottom: 10px;
    line-height: 1.5;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .post-meta .time {
    font-size: 13px;
    color: #94a3b8;
    display: block;
    font-weight: 400;
  }

  .post-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
  }

  /* Stories Container */
  .stories-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 25px;
  }

  .story-card {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    border: 1px solid #f1f5f9;
  }

  .story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  }

  .story-img-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 9 / 16;
  }

  .story-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
  }

  .story-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.3s;
    gap: 15px;
    flex-direction: column;
  }

  .story-img-container:hover .story-overlay {
    opacity: 1;
  }

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

  .story-download-btn,
  .story-view-btn {
    background: white;
    color: #1e293b;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 16px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 0px;
  }

  .story-download-btn:hover,
  .story-view-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  }

  .story-download-btn:hover {
    background: #8e24aa;
    color: white;
  }

  .story-view-btn:hover {
    background: #f8bbd0;
    color: #8e24aa;
  }

  .story-meta {
    padding: 12px;
    text-align: center;
  }

  .story-meta .time {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 400;
  }

  .story-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(236, 64, 122, 0.1), rgba(30, 136, 229, 0.1));
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(236, 64, 122, 0.2);
  }

  .story-stats-row .time {
    color: #64748b;
    font-weight: 500;
  }

  .story-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
  }

  /* Highlights Container */
  .highlights-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 25px;
  }

  .highlight-card {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    border: 1px solid #f1f5f9;
    cursor: pointer;
    padding: 15px 10px;
    text-align: center;
  }

  .highlight-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  }

  .highlight-img-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    margin: 0 auto 10px;
    border: 3px solid #e53935;
    background: linear-gradient(to bottom right, #1e88e5, #ec407a);
    padding: 3px;
  }

  .highlight-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
    border-radius: 50%;
  }

  .highlight-meta {
    padding: 5px;
    text-align: center;
  }

  .highlight-title {
    font-size: 14px;
    color: #334155;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .highlight-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .highlight-img-container:hover .highlight-overlay {
    opacity: 1;
  }

  .highlight-view-btn {
    background-color: white;
    color: #1e88e5;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
  }

  .highlight-view-btn:hover {
    transform: scale(1.1);
  }

  /* Reels Grid */
  .reels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 25px;
  }

  .reel-card {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
    border: 1px solid #f1f5f9;
  }

  .reel-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  }

  .reel-img-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 9 / 16;
  }

  .reel-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
  }

  .reel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.3s;
    gap: 15px;
    flex-direction: column;
  }

  .reel-img-container:hover .reel-overlay {
    opacity: 1;
  }

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

  .reel-download-btn,
  .reel-view-btn {
    background: white;
    color: #1e88e5;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 16px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }

  .reel-download-btn:hover {
    background: #1e88e5;
    color: white;
  }

  .reel-view-btn:hover {
    background: #ec407a;
    color: #fff;
  }

  .reel-meta {
    padding: 20px;
  }

  .reel-meta .caption {
    font-size: 15px;
    color: #334155;
    margin-bottom: 10px;
    line-height: 1.5;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .reel-stats,
  .post-stats {
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.15), rgba(236, 64, 122, 0.15));
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(30, 136, 229, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .reel-stats span,
  .post-stats span {
    color: #1e293b;
    font-weight: 600;
    font-size: 13px;
  }

  .reel-stats span i,
  .post-stats span i {
    color: #ec407a;
    margin-right: 4px;
  }

  .reel-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 8px;
  }

  .reel-stats span {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .reel-stats span i {
    color: #8e24aa;
  }

  .reel-meta .time {
    font-size: 13px;
    color: #94a3b8;
    display: block;
    font-weight: 400;
  }

  .reel-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
  }

  /* Video Elements */
  .post-video,
  .story-video,
  .reel-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
  }

  .post-fullscreen-btn,
  .story-fullscreen-btn,
  .reel-fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    z-index: 4;
  }

  .post-fullscreen-btn:hover,
  .story-fullscreen-btn:hover,
  .reel-fullscreen-btn:hover {
    background: white;
    transform: scale(1.1);
  }

  /* Media Type Indicators */
  .media-type-indicator {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: none;
  }

  .video-indicator {
    background-color: rgba(220, 53, 69, 0.9);
  }

  .image-indicator {
    background-color: rgba(13, 110, 253, 0.9);
  }

  /* Modal Styles */
  .ipgv-profile-img-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .ipgv-profile-img-modal.active {
    opacity: 1;
    visibility: visible;
  }

  .ipgv-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    cursor: pointer;
  }

  .ipgv-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    z-index: 10001;
  }

  .ipgv-profile-img-modal.active .ipgv-modal-content {
    transform: scale(1);
  }

  .ipgv-modal-img {
    display: block;
    width: 100%;
    max-width: 500px;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
  }

  .ipgv-modal-actions {
    display: flex;
    justify-content: center;
    padding: 20px;
    background-color: #f8f9fa;
  }

  .ipgv-modal-download-btn {
    background-color: #1e88e5;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .ipgv-modal-download-btn:hover {
    background-color: #1a75c6;
    transform: translateY(-1px);
  }

  .ipgv-close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10002;
  }

  .ipgv-close-modal:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
  }

  body.ipgv-modal-open {
    overflow: hidden;
  }

  /* abc */

  /* Fixed Reel Controls - Always Visible Play and Fullscreen */
  .reel-img-container .reel-overlay {
    opacity: 1;
  }

  .reel-img-container .reel-view-btn {
    opacity: 1;
    visibility: visible;
  }

  .reel-img-container .reel-fullscreen-btn {
    opacity: 1;
    visibility: visible;
    display: flex;
  }

  .reel-img-container:hover .reel-overlay {
    opacity: 1;
  }

  .reel-video.playing {
    display: block;
  }

  .reel-thumb.hidden {
    display: none;
  }

  /* abc */

  /* Skeleton Loaders */
  @keyframes shimmer {
    0% {
      background-position: -1000px 0;
    }

    100% {
      background-position: 1000px 0;
    }
  }

  .skeleton-profile {
    width: 100%;
    animation: fadeIn 0.5s ease-out;
  }

  .skeleton-profile-header {
    display: flex;
    gap: 30px;
    padding: 30px;
    background: #f9fafb;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid #f1f5f9;
  }

  .skeleton-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    flex-shrink: 0;
    border: 4px solid white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  }

  .skeleton-profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  .skeleton-username {
    height: 28px;
    width: 180px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 6px;
  }

  .skeleton-fullname {
    height: 20px;
    width: 140px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 6px;
  }

  .skeleton-stats {
    display: flex;
    gap: 25px;
    margin-top: 10px;
  }

  .skeleton-stat {
    height: 40px;
    width: 60px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 6px;
  }

  .skeleton-bio {
    height: 60px;
    width: 100%;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 6px;
    margin-bottom: 30px;
  }

  .skeleton-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
  }

  .skeleton-tab {
    height: 40px;
    width: 100px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 50px;
  }

  /* Posts Skeleton */
  .skeleton-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
  }

  .skeleton-post {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
  }

  .skeleton-post-img {
    aspect-ratio: 1 / 1;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
  }

  .skeleton-post-meta {
    padding: 20px;
  }

  .skeleton-post-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
  }

  .skeleton-post-stat {
    height: 16px;
    width: 60px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
  }

  .skeleton-post-caption {
    height: 16px;
    width: 100%;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
    margin-bottom: 8px;
  }

  .skeleton-post-caption-short {
    height: 16px;
    width: 70%;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
    margin-bottom: 10px;
  }

  .skeleton-post-time {
    height: 14px;
    width: 80px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
  }

  /* Stories Skeleton */
  .skeleton-stories-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }

  .skeleton-story {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
  }

  .skeleton-story-img {
    aspect-ratio: 9 / 16;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
  }

  .skeleton-story-meta {
    padding: 12px;
    text-align: center;
  }

  .skeleton-story-time {
    height: 14px;
    width: 80px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
    margin: 0 auto;
  }

  /* Highlights Skeleton */
  .skeleton-highlights-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
  }

  .skeleton-highlight {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    padding: 15px 10px;
    text-align: center;
  }

  .skeleton-highlight-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    margin: 0 auto 10px;
    border: 3px solid #e53935;
  }

  .skeleton-highlight-title {
    height: 16px;
    width: 80px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
    margin: 0 auto;
  }

  /* Reels Skeleton */
  .skeleton-reels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
  }

  .skeleton-reel {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
  }

  .skeleton-reel-img {
    aspect-ratio: 9 / 16;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
  }

  .skeleton-reel-meta {
    padding: 20px;
  }

  .skeleton-reel-caption {
    height: 16px;
    width: 100%;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
    margin-bottom: 8px;
  }

  .skeleton-reel-caption-short {
    height: 16px;
    width: 70%;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
    margin-bottom: 10px;
  }

  .skeleton-reel-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 8px;
  }

  .skeleton-reel-stat {
    height: 16px;
    width: 60px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
  }

  .skeleton-reel-time {
    height: 14px;
    width: 80px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
  }

  /* Animations */
  @keyframes fadeIn {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  @keyframes slideUp {
    from {
      transform: translateY(20px);
      opacity: 0;
    }

    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  @keyframes spin {
    0% {
      transform: rotate(0deg);
    }

    100% {
      transform: rotate(360deg);
    }
  }

  /* Professional Responsive Design */
  @media (max-width: 768px) {
    .wrapper {
      padding: 10px;
    }

    .main-contain {
      padding: 10px;
    }

    .ig-tool-wrapper {
      padding: 25px 20px;
      margin: 10px auto;
      border-radius: 20px;
    }

    .ig-header h1 {
      font-size: 28px;
      margin-bottom: 15px;
      background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .viewer-anonymous {
      background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .ig-header p {
      font-size: 16px;
      margin: 15px 0 25px;
    }

    .ig-input-area {
      padding: 20px 15px;
      flex-direction: column;
      gap: 15px;
      border-radius: 16px;
    }

    .ig-icon {
      width: 100%;
      text-align: left;
      margin-left: 0;
      margin-bottom: 10px;
    }

    .ig-input-area input {
      margin: 0 0 15px 0;
      width: 100%;
      min-width: 100%;
      padding: 14px 16px;
    }

    .paste-btn {
      display: none;
    }

    .view-btn {
      width: 100%;
      justify-content: center;
      padding: 14px 20px;
    }

    .profile-header-content {
      flex-direction: column;
      align-items: center;
      text-align: center;
    }

    .profile-info {
      text-align: center;
    }

    .ig-profile-header {
      margin-bottom: 40px;
      position: relative;
      background: linear-gradient(to bottom, #f9fafb, #ffffff);
      border-radius: 16px;
      padding: 30px;
      box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
      border: 1px solid #f1f5f9;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
    }

    .stats {
      justify-content: center;
    }

    .posts-grid {
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 15px;
    }

    .stories-container {
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .highlights-container {
      grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .reels-grid {
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .post-meta .caption,
    .reel-meta .caption {
      font-size: 14px;
    }

    .ig-tabs button {
      padding: 10px 16px;
      font-size: 14px;
    }

    .ipgv-modal-content {
      max-width: 95vw;
      max-height: 85vh;
      margin: 20px;
    }

    .ipgv-modal-img {
      max-height: 60vh;
    }

    .ipgvmodal-actions {
      padding: 15px;
    }

    .ipgv-modal-download-btn {
      padding: 10px 20px;
      font-size: 13px;
    }

    .skeleton-profile-header {
      flex-direction: column;
      align-items: center;
    }

    .skeleton-avatar {
      margin-bottom: 20px;
    }

    .skeleton-username,
    .skeleton-fullname {
      margin: 0 auto;
    }

    .skeleton-stats {
      justify-content: center;
    }

    .skeleton-posts-grid {
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .skeleton-stories-container {
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .skeleton-highlights-container {
      grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .skeleton-reels-grid {
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
  }

  .ipgv-media-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .ipgv-media-modal.active {
    opacity: 1;
    visibility: visible;
  }

  .ipgv-modal-media {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
  }

  /* Medium Device Responsive Design */
  @media (max-width: 1024px) and (min-width: 769px) {
    .wrapper {
      padding: 15px;
    }

    .main-contain {
      padding: 15px;
    }

    .ig-tool-wrapper {
      padding: 35px 30px;
      margin: 15px auto;
    }

    .ig-header h1 {
      font-size: 36px;
      background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .viewer-anonymous {
      background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .ig-header p {
      font-size: 17px;
    }

    .ig-input-area {
      padding: 25px 20px;
      gap: 18px;
    }

    .ig-input-area input {
      padding: 15px 18px;
    }

    .paste-btn,
    .view-btn {
      padding: 15px 22px;
    }
  }

  /* Responsive Design for Small and Medium Devices */

  /* Max-width 992px */
  @media (max-width: 992px) {
    .wrapper {
      padding: 15px;
    }

    .main-contain {
      padding: 15px;
    }

    .ig-tool-wrapper {
      padding: 30px;
      margin: 15px auto;
      border-radius: 20px;
    }

    .ig-header h3 {
      font-size: 38px;
      margin-bottom: 18px;
    }

    .ig-header p {
      font-size: 17px;
      margin: 18px 0 28px;
    }

    .ig-input-area {
      padding: 25px;
      gap: 15px;
      border-radius: 16px;
      flex-wrap: wrap;
    }

    .ig-icon {
      width: 100%;
      text-align: left;
      margin-bottom: 10px;
    }

    .ig-input-area input {
      flex-grow: 1;
      width: calc(100% - 150px); /* Adjust based on button width */
      min-width: unset;
      padding: 15px 18px;
    }

    .paste-btn,
    .view-btn {
      padding: 14px 20px;
      font-size: 14px;
      margin-bottom: 0;
    }

    .paste-btn {
      flex-basis: auto;
    }

    .view-btn {
      flex-basis: auto;
    }

    .profile-header-content {
      flex-direction: column;
      align-items: center;
      text-align: center;
    }

    .profile-info {
      text-align: center;
    }

    .profile-image-container {
      margin-bottom: 20px;
    }

    .stats {
      justify-content: center;
      flex-wrap: wrap;
      gap: 20px;
    }

    .profile-bio {
      margin-top: 20px;
      padding-top: 15px;
      font-size: 15px;
    }

    .ig-tabs {
      gap: 10px;
      margin: 25px 0;
    }

    .ig-tabs button {
      padding: 10px 20px;
      font-size: 14px;
      gap: 6px;
    }

    .posts-grid {
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      gap: 20px;
    }

    .stories-container {
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 15px;
    }

    .highlights-container {
      grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
      gap: 15px;
    }

    .reel-card {
      max-width: unset;
    }

    .reels-grid {
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 20px;
    }

    .post-meta .caption,
    .reel-meta .caption {
      font-size: 14px;
    }

    .post-stats span,
    .reel-stats span {
      font-size: 12px;
    }

    .ipgv-modal-content {
      max-width: 90vw;
      max-height: 85vh;
    }
  }

  /* Max-width 768px */
  @media (max-width: 768px) {
    .wrapper {
      padding: 10px;
    }

    .main-contain {
      padding: 10px;
    }

    .ig-tool-wrapper {
      padding: 25px 20px;
      margin: 10px auto;
      border-radius: 20px;
    }

    .ig-header h1 {
      font-size: 32px;
      margin-bottom: 15px;
    }

    .ig-header p {
      font-size: 16px;
      margin: 15px 0 25px;
    }

    .ig-input-area {
      padding: 20px 15px;
      flex-direction: column;
      gap: 15px;
      border-radius: 16px;
    }

    .ig-icon {
      width: 100%;
      text-align: left;
      margin-left: 0;
      margin-bottom: 10px;
    }

    .ig-input-area input {
      width: 100%;
      min-width: 100%;
      padding: 14px 16px;
      margin-bottom: 0; /* No margin bottom for the input */
    }

    .paste-btn {
      display: none; /* Hide paste button on smaller screens */
    }

    .view-btn {
      width: 100%;
      justify-content: center;
      padding: 14px 20px;
    }

    .profile-image {
      width: 120px;
      height: 120px;
      min-width: 120px;
      min-height: 120px;
      font-size: 50px;
    }

    .view-profile-img {
      width: 30px;
      height: 30px;
      font-size: 14px;
    }

    .profile-info h3 {
      font-size: 22px;
    }

    .profile-info h4 {
      font-size: 16px;
    }

    .stat-value {
      font-size: 18px;
    }

    .stat-label {
      font-size: 13px;
    }

    .profile-bio {
      font-size: 14px;
    }

    .ig-tabs button {
      padding: 9px 15px;
      font-size: 13px;
      gap: 5px;
    }

    .posts-grid {
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 15px;
    }

    .stories-container {
      grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
      gap: 10px;
    }

    .highlights-container {
      grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
      gap: 10px;
    }

    .highlight-img-container {
      width: 90px;
      height: 90px;
      border: 2px solid #e53935;
      padding: 2px;
    }

    .highlight-title {
      font-size: 13px;
    }

    .reels-grid {
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 15px;
    }

    .post-download-btn,
    .post-view-btn,
    .reel-download-btn,
    .reel-view-btn {
      width: 40px;
      height: 40px;
      font-size: 14px;
    }

    .reel-view-btn {
      width: 45px;
      height: 45px;
      font-size: 18px;
    }

    .story-download-btn,
    .story-view-btn {
      width: 36px;
      height: 36px;
      font-size: 14px;
    }

    .ipgv-modal-content {
      max-width: 95vw;
      max-height: 80vh;
      margin: 15px;
    }

    .ipgv-modal-img {
      max-height: 55vh;
    }

    .ipgv-modal-actions {
      padding: 15px;
    }

    .ipgv-modal-download-btn {
      padding: 10px 20px;
      font-size: 13px;
    }

    .ipgv-close-modal {
      width: 30px;
      height: 30px;
      font-size: 14px;
      top: 10px;
      right: 10px;
    }

    /* Skeleton Loaders Responsive */
    .skeleton-profile-header {
      flex-direction: column;
      align-items: center;
      padding: 25px;
    }

    .skeleton-avatar {
      width: 120px;
      height: 120px;
      margin-bottom: 15px;
    }

    .skeleton-username {
      width: 150px;
      height: 25px;
    }

    .skeleton-fullname {
      width: 120px;
      height: 18px;
    }

    .skeleton-stats {
      justify-content: center;
      gap: 20px;
    }

    .skeleton-stat {
      width: 50px;
      height: 35px;
    }

    .skeleton-bio {
      height: 50px;
      margin-bottom: 25px;
    }

    .skeleton-tabs {
      gap: 10px;
    }

    .skeleton-tab {
      width: 90px;
      height: 38px;
    }

    .skeleton-posts-grid {
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .skeleton-post-img {
      aspect-ratio: 1 / 1;
    }

    .skeleton-stories-container {
      grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .skeleton-story-img {
      aspect-ratio: 9 / 16;
    }

    .skeleton-highlights-container {
      grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .skeleton-highlight-img {
      width: 90px;
      height: 90px;
    }

    .skeleton-reels-grid {
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .skeleton-reel-img {
      aspect-ratio: 9 / 16;
    }
  }

  /* Max-width 600px */
  @media (max-width: 600px) {
    .ig-tool-wrapper {
      padding: 20px 15px;
      margin: 10px auto;
      border-radius: 16px;
    }

    .ig-header h1 {
      font-size: 28px;
      margin-bottom: 12px;
    }

    .ig-header p {
      font-size: 15px;
      margin: 12px 0 20px;
    }

    .ig-input-area {
      padding: 15px 10px;
      gap: 10px;
      border-radius: 12px;
    }

    .ig-input-area input {
      padding: 12px 14px;
      font-size: 14px;
    }

    .view-btn {
      padding: 12px 18px;
      font-size: 14px;
    }

    .profile-image {
      width: 100px;
      height: 100px;
      min-width: 100px;
      min-height: 100px;
      font-size: 40px;
    }

    .profile-info h3 {
      font-size: 20px;
    }

    .profile-info h4 {
      font-size: 15px;
    }

    .stat-value {
      font-size: 16px;
    }

    .stat-label {
      font-size: 12px;
    }

    .profile-bio {
      font-size: 13px;
    }

    .ig-tabs button {
      padding: 8px 12px;
      font-size: 12px;
      gap: 4px;
    }

    .posts-grid {
      grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
      gap: 10px;
    }

    .stories-container {
      grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
      gap: 8px;
    }

    .highlights-container {
      grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
      gap: 8px;
    }

    .highlight-img-container {
      width: 70px;
      height: 70px;
      border: 2px solid #e53935;
      padding: 1px;
    }

    .highlight-title {
      font-size: 12px;
    }

    .reels-grid {
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
      gap: 10px;
    }

    .post-meta .caption,
    .reel-meta .caption {
      font-size: 13px;
      -webkit-line-clamp: 1; /* Shorter captions on small screens */
    }

    .post-stats span,
    .reel-stats span {
      font-size: 11px;
    }

    .post-download-btn,
    .post-view-btn,
    .reel-download-btn,
    .reel-view-btn {
      width: 35px;
      height: 35px;
      font-size: 13px;
    }

    .reel-view-btn {
      width: 40px;
      height: 40px;
      font-size: 16px;
    }

    .story-download-btn,
    .story-view-btn {
      width: 32px;
      height: 32px;
      font-size: 13px;
    }

    .ipgv-modal-download-btn {
      padding: 8px 16px;
      font-size: 12px;
    }

    /* Skeleton Loaders Responsive */
    .skeleton-avatar {
      width: 100px;
      height: 100px;
    }

    .skeleton-username {
      width: 120px;
      height: 22px;
    }

    .skeleton-fullname {
      width: 100px;
      height: 16px;
    }

    .skeleton-stat {
      width: 45px;
      height: 30px;
    }

    .skeleton-bio {
      height: 40px;
    }

    .skeleton-tab {
      width: 70px;
      height: 35px;
    }

    .skeleton-posts-grid {
      grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .skeleton-stories-container {
      grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .skeleton-highlights-container {
      grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .skeleton-highlight-img {
      width: 70px;
      height: 70px;
    }

    .skeleton-reels-grid {
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
  }

  /* Max-width 400px */
  @media (max-width: 400px) {
    .ig-tool-wrapper {
      padding: 15px 10px;
    }

    .ig-header h1 {
      font-size: 24px;
    }

    .ig-header p {
      font-size: 14px;
      margin: 10px 0 15px;
    }

    .ig-input-area {
      padding: 10px;
    }

    .ig-input-area input {
      padding: 10px 12px;
      font-size: 13px;
    }

    .view-btn {
      padding: 10px 15px;
      font-size: 13px;
    }

    .profile-image {
      width: 80px;
      height: 80px;
      min-width: 80px;
      min-height: 80px;
      font-size: 30px;
    }

    .profile-info h3 {
      font-size: 18px;
    }

    .profile-info h4 {
      font-size: 14px;
    }

    .stat-value {
      font-size: 14px;
    }

    .stat-label {
      font-size: 11px;
    }

    .ig-tabs button {
      padding: 7px 10px;
      font-size: 11px;
    }

    .posts-grid {
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 8px;
    }

    .stories-container {
      grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
      gap: 6px;
    }

    .highlights-container {
      grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
      gap: 6px;
    }

    .highlight-img-container {
      width: 60px;
      height: 60px;
    }

    .highlight-title {
      font-size: 11px;
    }

    .reels-grid {
      grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
      gap: 8px;
    }

    .post-meta .caption,
    .reel-meta .caption {
      font-size: 12px;
    }

    .post-stats span,
    .reel-stats span {
      font-size: 10px;
    }

    .post-download-btn,
    .post-view-btn,
    .reel-download-btn,
    .reel-view-btn {
      width: 30px;
      height: 30px;
      font-size: 12px;
    }

    .reel-view-btn {
      width: 35px;
      height: 35px;
      font-size: 14px;
    }

    .story-download-btn,
    .story-view-btn {
      width: 28px;
      height: 28px;
      font-size: 12px;
    }

    /* Skeleton Loaders Responsive */
    .skeleton-avatar {
      width: 80px;
      height: 80px;
    }

    .skeleton-username {
      width: 100px;
      height: 20px;
    }

    .skeleton-fullname {
      width: 80px;
      height: 14px;
    }

    .skeleton-stat {
      width: 40px;
      height: 25px;
    }

    .skeleton-bio {
      height: 35px;
    }

    .skeleton-tab {
      width: 60px;
      height: 30px;
    }

    .skeleton-posts-grid {
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .skeleton-stories-container {
      grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    .skeleton-highlights-container {
      grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }

    .skeleton-highlight-img {
      width: 60px;
      height: 60px;
    }

    .skeleton-reels-grid {
      grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
  }

  /* Max-width 375px (iPhone SE/older smaller phones) */
  @media (max-width: 375px) {
    .ig-tool-wrapper {
      padding: 12px 8px;
    }

    .ig-header h1 {
      font-size: 22px;
    }

    .ig-header p {
      font-size: 13px;
      margin: 8px 0 12px;
    }

    .ig-input-area input {
      padding: 9px 10px;
      font-size: 12px;
    }

    .view-btn {
      padding: 9px 12px;
      font-size: 12px;
    }

    .profile-image {
      width: 70px;
      height: 70px;
      min-width: 70px;
      min-height: 70px;
      font-size: 26px;
    }

    .profile-info h3 {
      font-size: 16px;
    }

    .profile-info h4 {
      font-size: 13px;
    }

    .stat-value {
      font-size: 13px;
    }

    .stat-label {
      font-size: 10px;
    }

    .ig-tabs button {
      padding: 6px 8px;
      font-size: 10px;
    }

    .posts-grid {
      grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
      gap: 6px;
    }

    .stories-container {
      grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
      gap: 5px;
    }

    .highlights-container {
      grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
      gap: 5px;
    }

    .highlight-img-container {
      width: 50px;
      height: 50px;
    }

    .highlight-title {
      font-size: 10px;
    }

    .reels-grid {
      grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
      gap: 6px;
    }

    .post-meta .caption,
    .reel-meta .caption {
      font-size: 11px;
    }

    .post-stats span,
    .reel-stats span {
      font-size: 9px;
    }

    .post-download-btn,
    .post-view-btn,
    .reel-download-btn,
    .reel-view-btn {
      width: 28px;
      height: 28px;
      font-size: 11px;
    }

    .reel-view-btn {
      width: 32px;
      height: 32px;
      font-size: 12px;
    }

    .story-download-btn,
    .story-view-btn {
      width: 26px;
      height: 26px;
      font-size: 11px;
    }

    /* Skeleton Loaders Responsive */
    .skeleton-avatar {
      width: 70px;
      height: 70px;
    }

    .skeleton-username {
      width: 90px;
      height: 18px;
    }

    .skeleton-fullname {
      width: 70px;
      height: 12px;
    }

    .skeleton-stat {
      width: 35px;
      height: 22px;
    }

    .skeleton-bio {
      height: 30px;
    }

    .skeleton-tab {
      width: 50px;
      height: 28px;
    }

    .skeleton-posts-grid {
      grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .skeleton-stories-container {
      grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .skeleton-highlights-container {
      grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }

    .skeleton-highlight-img {
      width: 50px;
      height: 50px;
    }

    .skeleton-reels-grid {
      grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
  }

  /* Enhanced Video Controls */

' +
              "@keyframes slideInRight {" +
              "from { transform: translateX(100%); opacity: 0; }" +
              "to { transform: translateX(0); opacity: 1; }" +
              "}" +
              "@keyframes slideOutRight {" +
              "from { transform: translateX(0); opacity: 1; }" +
              "to { transform: translateX(100%); opacity: 0; }" +
              "}" +
              "@keyframes shimmer {" +
              "0% { transform: translateX(-100%); }" +
              "100% { transform: translateX(100%); }" +
              "}" +
              ".cancel-download:hover {" +
              "background: #dc2626 !important;" +
              "transform: scale(1.05);" +
              "}" +
              ".download-toast.success {" +
              "border-left-color: #10b981 !important;" +
              "}" +
              ".download-toast.error {" +
              "border-left-color: #ef4444 !important;" +
              "}" +
              "

/* --- Codex CSS updates --- */
/* Reset and Base Styles */
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
  padding: 0;
}

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

.wrapper {
  --ig-bg-1: #0f172a;
  --ig-bg-2: #312e81;
  --ig-bg-3: #be185d;
  --ig-primary: #4f46e5;
  --ig-primary-dark: #3730a3;
  --ig-secondary: #ec4899;
  --ig-accent: #06b6d4;
  --ig-success: #10b981;
  --ig-error: #ef4444;
  --ig-warning: #f59e0b;
  --ig-text: #111827;
  --ig-muted: #64748b;
  --ig-soft: #f8fafc;
  --ig-border: rgba(148, 163, 184, 0.28);
  --ig-card: rgba(255, 255, 255, 0.96);
  --ig-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
  --ig-shadow-soft: 0 12px 32px rgba(15, 23, 42, 0.1);
  --ig-radius: 20px;

  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background:
    radial-gradient(circle at 12% 12%, rgba(236, 72, 153, 0.22), transparent 34%),
    radial-gradient(circle at 86% 18%, rgba(6, 182, 212, 0.2), transparent 30%),
    linear-gradient(135deg, var(--ig-bg-1) 0%, var(--ig-bg-2) 52%, #831843 100%);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  color: var(--ig-text);
}

.wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 78%);
  pointer-events: none;
}

.main-contain {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.offcontents {
  overflow-x: hidden;
}

.ig-tool-wrapper {
  width: 100%;
  margin: 18px auto;
  padding: 34px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: var(--ig-text);
  text-align: center;
  box-shadow: var(--ig-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  position: relative;
  overflow: hidden;
}

.ig-tool-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(79, 70, 229, 0.18), rgba(236, 72, 153, 0.16), rgba(6, 182, 212, 0.14)) top / 100% 5px no-repeat,
    radial-gradient(circle at 20% 0%, rgba(79, 70, 229, 0.08), transparent 36%),
    radial-gradient(circle at 82% 8%, rgba(236, 72, 153, 0.08), transparent 34%);
  pointer-events: none;
}

.ig-header {
  position: relative;
  z-index: 2;
}

.ig-header h1,
.ig-header h3 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.18;
  font-weight: 800;
  color: transparent;
  background: linear-gradient(135deg, var(--ig-primary) 0%, var(--ig-secondary) 52%, var(--ig-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 auto 16px;
  letter-spacing: 0;
  text-transform: capitalize !important;
  max-width: 920px;
}

.viewer-anonymous {
  color: transparent;
  background: linear-gradient(135deg, var(--ig-primary), var(--ig-secondary), var(--ig-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  display: inline-block;
  text-transform: capitalize !important;
}

.viewer-anonymous::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(135deg, var(--ig-primary), var(--ig-secondary), var(--ig-accent));
  border-radius: 999px;
  animation: underlineGlow 2.4s ease-in-out infinite alternate;
}

@keyframes underlineGlow {
  0% {
    opacity: 0.72;
    transform: scaleX(0.96);
  }

  100% {
    opacity: 1;
    transform: scaleX(1.02);
  }
}

.ig-header p {
  font-size: 16px;
  margin: 0 auto 26px;
  line-height: 1.7;
  font-weight: 500;
  color: #475569;
  max-width: 720px;
  position: relative;
  z-index: 2;
}

.ig-input-area {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 22px;
  border-radius: 22px;
  gap: 14px;
  margin: 0 auto;
  max-width: 940px;
  width: 100%;
  flex-wrap: wrap;
  box-shadow: var(--ig-shadow-soft);
  position: relative;
  border: 1px solid var(--ig-border);
}

.ig-icon {
  font-size: 14px;
  color: #334155;
  font-weight: 700;
  width: 100%;
  text-align: left;
  margin-bottom: 2px;
  position: relative;
  z-index: 2;
  text-transform: capitalize !important;
}

.ig-input-area input {
  flex: 1 1 360px;
  width: 100%;
  max-width: 560px;
  min-width: 220px;
  height: 54px;
  min-height: 54px;
  max-height: 54px;
  padding: 0 18px;
  font-size: 16px;
  line-height: 54px;
  border: 1px solid rgba(79, 70, 229, 0.34);
  outline: none;
  background: #ffffff;
  border-radius: 14px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, background 0.25s ease;
  color: var(--ig-text);
  font-weight: 600;
  position: relative;
  z-index: 2;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.04);
}

.ig-input-area input:focus {
  background: #ffffff;
  border-color: var(--ig-primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14), 0 12px 26px rgba(79, 70, 229, 0.12);
  transform: translateY(-1px);
}

.ig-input-area input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.error-container {
  margin-top: 18px;
  position: absolute;
  bottom: -54px;
  left: 20px;
  right: 20px;
}

#error-message {
  color: var(--ig-error);
  margin-top: 18px;
  display: none;
  font-weight: 700;
}

.paste-btn,
.view-btn,
.download-btn,
.ipgv-modal-download-btn {
  border: 1px solid transparent;
  border-radius: 14px;
  min-height: 52px;
  padding: 0 22px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease, background 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 15px;
  line-height: 1;
  margin-bottom: 0;
  position: relative;
  z-index: 2;
  text-transform: capitalize !important;
  letter-spacing: 0;
  white-space: nowrap;
  user-select: none;
}

.paste-btn {
  background: linear-gradient(135deg, var(--ig-primary), #7c3aed);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.28);
}

.paste-btn:hover,
.paste-btn:focus-visible {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(79, 70, 229, 0.34);
}

.view-btn,
.download-btn {
  background: linear-gradient(135deg, var(--ig-secondary), #f97316);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(236, 72, 153, 0.28);
}

.view-btn:hover,
.view-btn:focus-visible,
.download-btn:hover,
.download-btn:focus-visible {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(236, 72, 153, 0.34);
}

.view-btn:active,
.paste-btn:active,
.download-btn:active {
  transform: translateY(0);
}

.view-btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
  background: #cbd5e1;
  box-shadow: none;
}

.ad-space {
  display: none;
  margin-top: 22px;
  text-align: center;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  padding: 5px;
  background: linear-gradient(135deg, var(--ig-secondary), var(--ig-primary) 42%, var(--ig-accent) 100%);
  background-size: 240% 240%;
  animation: gradientBorder 7s ease infinite;
}

@keyframes gradientBorder {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.ad-inner {
  border-radius: 14px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  transition: transform 0.3s ease;
  animation: floatAd 5s ease-in-out infinite;
}

@keyframes floatAd {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

.ad-placeholder {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.ad-placeholder::before {
  content: "Sponsored";
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: #ffffff;
  color: var(--ig-secondary);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
  animation: pulseTag 2.2s infinite;
  z-index: 2;
}

@keyframes pulseTag {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.04);
    opacity: 0.88;
  }
}

.ad-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.ad-placeholder:hover .ad-image {
  animation: wiggle 0.4s ease;
  transform: scale(1.035);
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(1.2deg);
  }

  50% {
    transform: rotate(-1.2deg);
  }

  75% {
    transform: rotate(1.2deg);
  }
}

.note {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.86);
  margin-top: 14px;
  font-style: italic;
}

.tools-result {
  width: 100%;
  margin-top: 34px;
}

.ig-result {
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 24px;
  padding: 28px;
  color: var(--ig-text);
  box-shadow: var(--ig-shadow);
  animation: fadeIn 0.45s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.68);
}

.ig-profile-header {
  margin-bottom: 30px;
  position: relative;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, rgba(79, 70, 229, 0.35), rgba(236, 72, 153, 0.28), rgba(6, 182, 212, 0.26)) border-box;
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--ig-shadow-soft);
  border: 1px solid transparent;
}

.profile-header-content {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.profile-image-container {
  position: relative;
  flex-shrink: 0;
}

.profile-image,
.profile-img-modal {
  width: 138px;
  height: 138px;
  min-width: 138px;
  min-height: 138px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(135deg, var(--ig-primary), var(--ig-secondary), var(--ig-accent));
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 56px;
}

.profile-image:hover {
  transform: scale(1.035);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.2);
}

.view-profile-img {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: linear-gradient(135deg, var(--ig-primary), var(--ig-secondary));
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.3);
  z-index: 5;
}

.view-profile-img:hover {
  transform: scale(1.08) rotate(10deg);
  box-shadow: 0 14px 30px rgba(236, 72, 153, 0.32);
}

.profile-info {
  flex: 1;
  text-align: left;
  min-width: 240px;
}

.profile-info h3,
.username-text {
  font-size: 24px;
  margin: 0 0 4px;
  font-weight: 800;
  color: var(--ig-text);
}

.profile-info h4,
.fullname-text {
  font-size: 17px;
  margin: 0 0 14px;
  font-weight: 700;
  color: #475569;
}

.stats {
  display: flex;
  gap: 18px;
  margin: 14px 0;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 88px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--ig-text);
}

.stat-label {
  font-size: 13px;
  color: var(--ig-muted);
  margin-top: 2px;
  text-transform: capitalize !important;
}

.profile-bio {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
  text-align: left;
  color: #475569;
  line-height: 1.65;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ig-primary);
  text-decoration: none;
  font-weight: 700;
  margin-top: 10px;
  transition: color 0.25s ease;
}

.profile-link:hover {
  color: var(--ig-secondary);
  text-decoration: underline;
}

.ig-tabs {
  display: flex;
  justify-content: center;
  margin: 28px 0;
  gap: 10px;
  flex-wrap: wrap;
}

.ig-tabs button,
.tab-btn {
  background: #ffffff;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-weight: 800;
  font-size: 14px;
  min-height: 44px;
  padding: 0 18px;
  cursor: pointer;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  text-transform: capitalize !important;
}

.ig-tabs button i {
  font-size: 15px;
}

.ig-tabs button.active,
.tab-btn.active {
  background: linear-gradient(135deg, var(--ig-primary), var(--ig-secondary));
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.26);
  transform: translateY(-2px);
  border-color: transparent;
}

.ig-tabs button:hover:not(.active),
.tab-btn:hover:not(.active) {
  background: #f8fafc;
  color: var(--ig-text);
  transform: translateY(-2px);
}

.tab-content,
.ig-tab-content {
  padding: 18px;
  text-align: center;
  color: #475569;
  display: none;
}

.tab-content.active,
.ig-tab-content.active {
  display: block;
}

.no-result {
  border: 1px dashed #cbd5e1;
  padding: 28px 20px;
  margin-top: 24px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  border-radius: 18px;
  color: #64748b;
  background: linear-gradient(145deg, #ffffff, #f8fafc);
}

.no-result i {
  font-size: 48px;
  color: #cbd5e1;
  margin-bottom: 14px;
  display: block;
}

.private-account-message {
  background-color: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  padding: 18px;
  border-radius: 14px;
  margin-top: 20px;
  text-align: center;
  font-weight: 700;
  border: 1px solid rgba(239, 68, 68, 0.2);
  animation: fadeIn 0.45s ease-out;
}

.private-account-message i {
  margin-right: 8px;
  font-size: 18px;
}

.posts-grid,
.skeleton-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.post-card,
.story-card,
.highlight-card,
.reel-card,
.skeleton-post,
.skeleton-story,
.skeleton-highlight,
.skeleton-reel,
.highlight-item {
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  border: 1px solid #e2e8f0;
  animation: slideUp 0.45s ease-out;
  animation-fill-mode: both;
}

.post-card:hover,
.story-card:hover,
.highlight-card:hover,
.reel-card:hover,
.highlight-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  border-color: rgba(79, 70, 229, 0.24);
}

.post-img-container,
.story-img-container,
.reel-img-container,
.highlight-img-container {
  position: relative;
  overflow: hidden;
}

.post-img-container {
  aspect-ratio: 1 / 1;
}

.story-img-container,
.reel-img-container {
  aspect-ratio: 9 / 16;
}

.post-thumb,
.story-thumb,
.reel-thumb,
.highlight-thumb,
.modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.post-overlay,
.story-overlay,
.reel-overlay,
.highlight-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.02) 35%, rgba(15, 23, 42, 0.74) 100%);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  gap: 14px;
  z-index: 3;
}

.story-overlay,
.reel-overlay {
  flex-direction: column;
}

.post-img-container:hover .post-overlay,
.story-img-container:hover .story-overlay,
.reel-img-container:hover .reel-overlay,
.highlight-img-container:hover .highlight-overlay {
  opacity: 1;
}

.post-img-container:hover .post-thumb,
.story-img-container:hover .story-thumb,
.reel-img-container:hover .reel-thumb,
.highlight-img-container:hover .highlight-thumb {
  transform: scale(1.055);
}

.post-download-btn,
.post-view-btn,
.story-download-btn,
.story-view-btn,
.reel-download-btn,
.reel-view-btn,
.highlight-view-btn,
.post-fullscreen-btn,
.story-fullscreen-btn,
.reel-fullscreen-btn {
  background: rgba(255, 255, 255, 0.94);
  color: var(--ig-primary);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
  border: none;
  font-size: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  padding: 0;
}

.post-download-btn:hover,
.post-view-btn:hover,
.story-download-btn:hover,
.story-view-btn:hover,
.reel-download-btn:hover,
.reel-view-btn:hover,
.highlight-view-btn:hover,
.post-fullscreen-btn:hover,
.story-fullscreen-btn:hover,
.reel-fullscreen-btn:hover {
  transform: scale(1.08) translateY(-2px);
  background: linear-gradient(135deg, var(--ig-primary), var(--ig-secondary));
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.28);
}

.post-meta,
.reel-meta {
  padding: 18px;
}

.story-meta,
.highlight-meta {
  padding: 12px;
  text-align: center;
}

.post-stats,
.reel-stats,
.story-stats-row {
  display: flex;
  gap: 12px;
  align-items: center;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(236, 72, 153, 0.1));
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(79, 70, 229, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-bottom: 8px;
}

.post-stats span,
.reel-stats span {
  color: #475569;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-stats span i,
.reel-stats span i {
  color: var(--ig-secondary);
  margin-right: 4px;
}

.post-meta .caption,
.reel-meta .caption {
  font-size: 15px;
  color: #334155;
  margin-bottom: 10px;
  line-height: 1.5;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta .time,
.story-meta .time,
.reel-meta .time,
.story-stats-row .time {
  font-size: 13px;
  color: #94a3b8;
  display: block;
  font-weight: 600;
}

.post-stats-row,
.story-stats-row,
.reel-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.stories-container,
.skeleton-stories-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.highlights-container,
.skeleton-highlights-container,
.highlight-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.highlight-card {
  cursor: pointer;
  padding: 14px 10px;
  text-align: center;
}

.highlight-img-container {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  width: 112px;
  height: 112px;
  margin: 0 auto 10px;
  border: 3px solid transparent;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, var(--ig-secondary), var(--ig-primary), var(--ig-accent)) border-box;
  padding: 3px;
}

.highlight-title,
.highlight-username {
  font-size: 14px;
  color: #334155;
  font-weight: 800;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.highlight-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--ig-primary);
  font-size: 12px;
  font-weight: 800;
  margin-top: 6px;
}

.reels-grid,
.skeleton-reels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.post-video,
.story-video,
.reel-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

.post-fullscreen-btn,
.story-fullscreen-btn,
.reel-fullscreen-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  font-size: 15px;
}

.media-type-indicator {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: rgba(15, 23, 42, 0.84);
  color: #ffffff;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}

.video-indicator {
  background-color: rgba(220, 38, 38, 0.92);
}

.image-indicator {
  background-color: rgba(37, 99, 235, 0.92);
}

.ipgv-profile-img-modal,
.ipgv-media-modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 18px;
}

.ipgv-profile-img-modal.active,
.ipgv-media-modal.active {
  opacity: 1;
  visibility: visible;
}

.ipgv-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(2, 6, 23, 0.86);
  cursor: pointer;
}

.ipgv-modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background-color: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  transform: scale(0.92);
  transition: transform 0.3s ease;
  z-index: 10001;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.ipgv-profile-img-modal.active .ipgv-modal-content,
.ipgv-media-modal.active .ipgv-modal-content {
  transform: scale(1);
}

.ipgv-modal-img {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
}

.ipgv-modal-media {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  max-height: 78vh;
  object-fit: contain;
}

.ipgv-modal-actions,
.ipgvmodal-actions {
  display: flex;
  justify-content: center;
  padding: 18px;
  background-color: #f8fafc;
}

.ipgv-modal-download-btn {
  background: linear-gradient(135deg, var(--ig-primary), var(--ig-secondary));
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.28);
}

.ipgv-modal-download-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.ipgv-close-modal {
  position: absolute;
  top: 14px;
  right: 14px;
  background-color: rgba(15, 23, 42, 0.76);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10002;
}

.ipgv-close-modal:hover {
  background-color: rgba(15, 23, 42, 0.92);
  transform: scale(1.08);
}

body.ipgv-modal-open {
  overflow: hidden;
}

.reel-img-container .reel-overlay {
  opacity: 1;
}

.reel-img-container .reel-view-btn,
.reel-img-container .reel-fullscreen-btn {
  opacity: 1;
  visibility: visible;
}

.reel-img-container .reel-fullscreen-btn {
  display: flex;
}

.reel-video.playing {
  display: block;
}

.reel-thumb.hidden {
  display: none;
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

.skeleton-profile {
  width: 100%;
  animation: fadeIn 0.45s ease-out;
}

.skeleton-profile-header {
  display: flex;
  gap: 28px;
  padding: 28px;
  background: #f8fafc;
  border-radius: 18px;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
}

.skeleton-avatar {
  width: 138px;
  height: 138px;
  border-radius: 50%;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
  flex-shrink: 0;
  border: 4px solid #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.skeleton-profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skeleton-username,
.skeleton-fullname,
.skeleton-stat,
.skeleton-bio,
.skeleton-tab,
.skeleton-post-stat,
.skeleton-post-caption,
.skeleton-post-caption-short,
.skeleton-post-time,
.skeleton-story-time,
.skeleton-highlight-title,
.skeleton-reel-caption,
.skeleton-reel-caption-short,
.skeleton-reel-stat,
.skeleton-reel-time,
.skeleton-post-img,
.skeleton-story-img,
.skeleton-highlight-img,
.skeleton-reel-img {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
}

.skeleton-username {
  height: 28px;
  width: 180px;
  border-radius: 8px;
}

.skeleton-fullname {
  height: 20px;
  width: 140px;
  border-radius: 8px;
}

.skeleton-stats {
  display: flex;
  gap: 18px;
  margin-top: 10px;
}

.skeleton-stat {
  height: 42px;
  width: 70px;
  border-radius: 10px;
}

.skeleton-bio {
  height: 58px;
  width: 100%;
  border-radius: 10px;
  margin-bottom: 28px;
}

.skeleton-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.skeleton-tab {
  height: 42px;
  width: 100px;
  border-radius: 999px;
}

.skeleton-post-img {
  aspect-ratio: 1 / 1;
}

.skeleton-post-meta,
.skeleton-reel-meta {
  padding: 18px;
}

.skeleton-post-stats,
.skeleton-reel-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.skeleton-post-stat,
.skeleton-reel-stat,
.skeleton-post-caption,
.skeleton-post-caption-short,
.skeleton-post-time,
.skeleton-reel-caption,
.skeleton-reel-caption-short,
.skeleton-reel-time,
.skeleton-story-time,
.skeleton-highlight-title {
  border-radius: 6px;
}

.skeleton-post-stat,
.skeleton-reel-stat {
  height: 16px;
  width: 60px;
}

.skeleton-post-caption,
.skeleton-reel-caption {
  height: 16px;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-post-caption-short,
.skeleton-reel-caption-short {
  height: 16px;
  width: 70%;
  margin-bottom: 10px;
}

.skeleton-post-time,
.skeleton-reel-time {
  height: 14px;
  width: 80px;
}

.skeleton-story-img,
.skeleton-reel-img {
  aspect-ratio: 9 / 16;
}

.skeleton-story-meta {
  padding: 12px;
  text-align: center;
}

.skeleton-story-time {
  height: 14px;
  width: 80px;
  margin: 0 auto;
}

.skeleton-highlight {
  padding: 14px 10px;
  text-align: center;
}

.skeleton-highlight-img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 10px;
  border: 3px solid var(--ig-secondary);
}

.skeleton-highlight-title {
  height: 16px;
  width: 80px;
  margin: 0 auto;
}

.download-status {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10020;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.download-toast {
  background: rgba(255, 255, 255, 0.96);
  border-left: 4px solid var(--ig-primary);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
  color: var(--ig-text);
  padding: 14px;
  margin-top: 10px;
  animation: slideInRight 0.28s ease;
  pointer-events: auto;
}

.download-toast.success {
  border-left-color: var(--ig-success) !important;
}

.download-toast.error {
  border-left-color: var(--ig-error) !important;
}

.download-percentage {
  font-size: 13px;
  font-weight: 800;
  color: var(--ig-primary);
}

.progress-container {
  width: 100%;
  height: 9px;
  overflow: hidden;
  background: #e2e8f0;
  border-radius: 999px;
  margin-top: 8px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--ig-primary), var(--ig-secondary), var(--ig-accent));
  border-radius: inherit;
  transition: width 0.25s ease;
  position: relative;
}

.progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: progressShine 1.2s linear infinite;
}

.cancel-download:hover {
  background: #dc2626 !important;
  transform: scale(1.05);
}

@keyframes progressShine {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(18px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Font Awesome icon safety */
.fa-solid,
.fa-badge-check,
.fa-bookmark,
.fa-circle,
.fa-circle-play,
.fa-clapperboard,
.fa-comment,
.fa-download,
.fa-expand,
.fa-eye,
.fa-film,
.fa-grid-2,
.fa-heart,
.fa-image,
.fa-images,
.fa-link,
.fa-lock,
.fa-paste,
.fa-pause,
.fa-photo-film,
.fa-play,
.fa-star,
.fa-unlock,
.fa-user,
.fa-video,
.fa-xmark,
.fa-\$\{isVideo,
.\? {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-style: normal;
}

.fa-solid {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}

.fa-grid-2::before {
  content: "\f00a";
}

.fa-badge-check::before {
  content: "\f058";
}

.fa-photo-film::before {
  content: "\f87c";
}

@media (max-width: 1024px) {
  .main-contain {
    padding: 18px;
  }

  .ig-tool-wrapper {
    padding: 30px 24px;
  }

  .ig-input-area {
    max-width: 780px;
  }

  .profile-header-content {
    flex-direction: column;
    text-align: center;
  }

  .profile-info,
  .profile-bio {
    text-align: center;
  }

  .stats {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .wrapper {
    padding: 0;
  }

  .main-contain {
    padding: 12px;
  }

  .ig-tool-wrapper {
    padding: 24px 16px;
    margin: 10px auto;
    border-radius: 22px;
  }

  .ig-header h1,
  .ig-header h3 {
    font-size: clamp(24px, 7vw, 30px);
    margin-bottom: 12px;
    line-height: 1.22;
  }

  .ig-header p {
    font-size: 15px;
    margin: 0 auto 20px;
  }

  .ig-header p br {
    display: none;
  }

  .ig-input-area {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    max-width: 560px;
  }

  .ig-icon {
    margin-bottom: 0;
  }

  .ig-input-area input {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    line-height: 52px;
    padding: 0 16px;
    margin: 0;
    resize: none;
  }

  .paste-btn,
  .view-btn,
  .download-btn {
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
  }

  .profile-image,
  .profile-img-modal {
    width: 116px;
    height: 116px;
    min-width: 116px;
    min-height: 116px;
    font-size: 46px;
  }

  .view-profile-img {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .ig-profile-header {
    padding: 22px;
  }

  .profile-info {
    min-width: 0;
    width: 100%;
  }

  .profile-info h3,
  .username-text {
    font-size: 21px;
  }

  .profile-info h4,
  .fullname-text {
    font-size: 15px;
  }

  .stats {
    gap: 10px;
  }

  .stat-item {
    flex: 1 1 90px;
    min-width: 88px;
  }

  .ig-tabs {
    justify-content: stretch;
  }

  .ig-tabs button,
  .tab-btn {
    flex: 1 1 calc(50% - 8px);
    min-width: 130px;
    min-height: 44px;
    padding: 0 12px;
    font-size: 13px;
  }

  .posts-grid,
  .stories-container,
  .highlights-container,
  .reels-grid,
  .skeleton-posts-grid,
  .skeleton-stories-container,
  .skeleton-highlights-container,
  .skeleton-reels-grid,
  .highlight-items {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .story-card,
  .reel-card,
  .skeleton-story,
  .skeleton-reel {
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
  }

  .highlight-img-container {
    width: 92px;
    height: 92px;
  }

  .ipgv-modal-content {
    max-width: 95vw;
    max-height: 84vh;
  }

  .ipgv-modal-img {
    max-height: 58vh;
  }

  .skeleton-profile-header {
    flex-direction: column;
    align-items: center;
    padding: 22px;
  }

  .skeleton-avatar {
    width: 116px;
    height: 116px;
  }

  .skeleton-profile-info {
    align-items: center;
    width: 100%;
  }

  .skeleton-stats {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .main-contain {
    padding: 10px;
  }

  .ig-tool-wrapper {
    padding: 20px 12px;
    border-radius: 18px;
  }

  .ig-result {
    padding: 16px;
    border-radius: 18px;
  }

  .ig-header h1,
  .ig-header h3 {
    font-size: 24px;
  }

  .ig-header p {
    font-size: 14px;
  }

  .ig-input-area {
    padding: 14px;
  }

  .ig-input-area input {
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    line-height: 50px;
    font-size: 15px;
  }

  .paste-btn,
  .view-btn,
  .download-btn {
    min-height: 48px;
    font-size: 14px;
  }

  .ig-tabs button,
  .tab-btn {
    flex-basis: 100%;
    width: 100%;
  }

  .profile-image,
  .profile-img-modal {
    width: 96px;
    height: 96px;
    min-width: 96px;
    min-height: 96px;
    font-size: 38px;
  }

  .post-meta,
  .reel-meta {
    padding: 14px;
  }

  .download-status {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }
}

@media (max-width: 375px) {
  .ig-tool-wrapper {
    padding: 18px 10px;
  }

  .ig-header h1,
  .ig-header h3 {
    font-size: 22px;
  }

  .ig-input-area input {
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    line-height: 48px;
    font-size: 14px;
  }

  .paste-btn,
  .view-btn,
  .download-btn {
    min-height: 46px;
    font-size: 13px;
  }

  .stat-item {
    min-width: 78px;
    padding: 9px 10px;
  }

  .stat-value {
    font-size: 16px;
  }

  .stat-label {
    font-size: 12px;
  }
}