/* CSS Variables for easy theme adjustments */
:root {
    --primary-color: #1a73e8; /* Google Blue */
    --primary-hover: #1562cf;
    --background-color: #f8f9fa; /* Light grey background */
    --card-background: #ffffff; /* White card */
    --text-color: #3c4043; /* Dark grey text */
    --border-color: #dadce0;
    --success-color: #34a853;
    --loader-color: #4285f4; /* A slightly lighter blue for loader */
}

/* General Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 40px 20px; /* Base padding for desktop/tablet */
}

.container {
    width: 100%;
    max-width: 800px;
    margin: auto;
}

/* Header and Title */
/* Navigation */
.app-header {
    padding: 10px 10px 40px 15px;
}

.app-nav .nav-list {
  list-style: none;
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: #4a4f57;
  font-size: 1.05rem;
  font-weight: 500;
  padding: 8px 4px;
  position: relative;
  transition: color 0.25s ease;
}

/* Underline hover animation */
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: #4b7bec;
  border-radius: 4px;
  transition: width 0.25s ease;
}

.nav-link:hover {
  color: #1e272e;
}

.nav-link:hover::after {
  width: 100%;
}

/* Active link */
.nav-link-active {
  color: #4b7bec;
  font-weight: 600;
}

.nav-link-active::after {
  width: 100%;
  background: #4b7bec;
}


.header {
    text-align: center;
    margin-bottom: 40px;
}

/* about */
.about-wrapper {
  display: flex;
  justify-content: center;
  padding: 80px 20px;
  background: #f5f7fa;
}

/* Main Card */
.about-card {
  display: flex;
  background: #ffffff;
  max-width: 1050px;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 35px rgba(0,0,0,0.08);
}

/* Left Side */
.about-left {
  background: linear-gradient(135deg, #4b7bec, #3867d6);
  width: 40%;
  min-height: 420px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-avatar {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid #ffffff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

/* Right Side */
.about-right {
  padding: 40px 45px;
  width: 60%;
}

.about-title {
  font-size: 2.2rem;
  color: #1d1d1d;
  margin-bottom: 15px;
}

.about-description {
  font-size: 1.05rem;
  color: #494949;
  line-height: 1.7;
  margin-bottom: 25px;
}

/* Tags / Skills */
.about-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin-top: 10px;
}

.about-tags li {
  background: #f0f2f5;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
}

/* Social Buttons */
.about-socials {
  margin-top: 30px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.social-btn {
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
  transition: opacity 0.25s ease;
}

.social-btn.github {
  background: #24292e;
}

.social-btn.linkedin {
  background: #0a66c2;
}

.social-btn.twitter {
  background: #1da1f2;
}

.social-btn.website {
  background: #f0f2f5;
  color: black;
  border: 1px solid;
}
.social-btn.website{
  border-color: rgba(0, 0, 0, 0.05);
}

.social-btn:hover {
  opacity: 0.85;
}
/* MOBILE VIEW */
@media (max-width: 900px) {

  .about-wrapper {
    padding: 50px 20px;
  }

  .about-card {
    flex-direction: column;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    overflow: hidden;
  }

  /* LEFT SIDE (PHOTO AREA) */
  .about-left {
    width: 100%;
    padding: 50px 0;
    min-height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .about-avatar {
    width: 160px;
    height: 160px;
    border-width: 5px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.2);
  }

  /* RIGHT SIDE (CONTENT AREA) */
  .about-right {
    width: 100%;
    padding: 35px 25px;
    text-align: center;
  }

  .about-title {
    font-size: 1.9rem;
    margin-bottom: 18px;
  }

  .about-description {
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 22px;
    color: #555;
  }

  /* SKILLS */
  .about-tags {
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
  }

  .about-tags li {
    padding: 10px 16px;
    font-size: 0.9rem;
    border-radius: 10px;
  }

  /* SOCIAL BUTTONS */
  .about-socials {
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
  }

  .social-btn {
    width: 100%;
    max-width: 280px;
    padding: 12px 0;
    font-size: 1rem;
    border-radius: 10px;
  }
}

/* EXTRA SMALL DEVICES */
@media (max-width: 480px) {

  .about-wrapper {
    padding: 40px 15px;
  }

  .about-avatar {
    width: 135px;
    height: 135px;
  }

  .about-right {
    padding: 30px 20px;
  }

  .about-title {
    font-size: 1.7rem;
  }

  .about-tags li {
    font-size: 0.85rem;
    padding: 8px 14px;
  }

  .social-btn {
    max-width: 260px;
    font-size: 0.95rem;
  }
}

/* about */

/* Logo Styling */
.logo-container {
    margin-bottom: 20px;
}

.logo-container img {
    display: inline-block;
    height: 60px;
    color: var(--primary-color);
}


.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.header p {
    font-size: 1.1rem;
    color: #5f6368;
}

/* Input Card Design */
.input-card {
    background: var(--card-background);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.input-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

.url-input {
    flex-grow: 1;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 250px; /* Ensure input is usable on mobile */
}

.url-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2); /* Focus ring */
}

.download-button {
    position: relative;
    padding: 14px 30px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    flex-shrink: 0; /* Prevents button from shrinking */
    min-width: 150px; /* To prevent size change when text is replaced by loader */
    overflow: hidden;
}

.download-button:hover {
    background-color: var(--primary-hover);
}

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

/* Button Spinner Styles */
.spinner {
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    vertical-align: middle;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    animation: spin 0.75s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Loader Container Styling */
.loader-container {
    text-align: center;
    padding: 30px;
    border-radius: 16px;
    margin-top: 20px;
    background-color: var(--card-background);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: none; /* Initially hidden by JS */
    flex-direction: column;
    align-items: center;
}

.loader-text {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 500;
    margin-top: 15px;
}

/* SVG Dot Loader Animation */
.dot-loader svg {
    width: 80px;
    height: 20px;
}

.dot {
    fill: var(--loader-color);
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
.dot:nth-child(3) { animation-delay: 0s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

/* Results/Video Display Section */
.results-section {
    background: var(--card-background);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    display: none; /* Initially hidden */
    opacity: 0;
    transition: opacity 0.5s;
    margin-top: 40px;
}

.results-section.visible {
    display: block;
    opacity: 1;
}

.results-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

.results-header svg,
.results-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--success-color);
  margin-left: 10px;
}
.results-header svg {
  margin-left: 0;
}

/* Icon for success simulation */
.check-icon {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--success-color);
    position: relative;
}

.check-icon::after {
    content: '';
    position: absolute;
    left: 9px;
    top: 6px;
    width: 8px;
    height: 14px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}


.video-container img{
    width: 100%;
    height: auto;    
}

.video-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 15px 0;
}

.detail-item {
    padding: 10px 15px;
    border-left: 4px solid var(--primary-color);
    background-color: #f1f3f4;
    border-radius: 4px;
}

.detail-item strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
}

.detail-item span {
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
}

/* Simulation of Scrollability/Long Content for clear visibility */
.long-content-placeholder {
    height: 200px;
    margin-top: 30px;
    padding: 20px;
    background-color: #e8f0fe;
    border: 1px dashed var(--primary-color);
    border-radius: 8px;
    text-align: center;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
}


/* Responsive Adjustments */
@media (max-width: 600px) {
    /* Optimized body padding for better mobile space usage */
    body {
        padding: 20px 10px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .header p {
        font-size: 1rem;
    }

    .input-card {
        /* Reduced padding from 20px to 15px to maximize content width */
        padding: 15px; 
    }

    .input-group {
        flex-direction: column;
        gap: 10px;
    }

    .download-button {
        width: 100%; /* Full width button on mobile */
    }

    .results-section {
        /* Reduced padding from 20px to 15px to maximize content width */
        padding: 15px; 
    }

    .video-details {
        grid-template-columns: 1fr;
    }
}