:root {
    /* Color Variables */
    --primary-color: #ff0000; /* YouTube red */
    --secondary-color: #3568ea;
    --background-color: #f9f9f9;
    --text-color: #333;
    --light-text: #777;
    --border-color: #ddd;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
  }
  
  /* Base Styles */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', Arial, sans-serif;
  }
  
  body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
  }
  
  /* Container */
  .container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  /* Header */
  h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2rem;
  }
  
  /* Input Section */
  .input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
  }
  
  #playlist-url {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
  }
  
  #playlist-url:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.1);
  }
  
  #calculate-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
  }
  
  #calculate-btn:hover {
    background-color: #cc0000;
    transform: translateY(-1px);
  }
  
  #calculate-btn:active {
    transform: translateY(0);
  }
  
  #calculate-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
  }
  
  /* Results Section */
  .result-section {
    margin-bottom: 30px;
    transition: all 0.3s ease;
  }
  
  .stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    gap: 10px;
    flex-wrap: wrap;
  }
  
  .stat {
    text-align: center;
    padding: 20px;
    background-color: var(--background-color);
    border-radius: 8px;
    flex: 1;
    min-width: 150px;
  }
  
  .stat-value {
    font-size: 2rem;
    font-weight: bold;
    display: block;
    color: var(--primary-color);
  }
  
  .stat-label {
    color: var(--light-text);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  
  /* Progress Bar */
  .progress-container {
    margin-top: 20px;
    background-color: var(--border-color);
    border-radius: 5px;
    height: 20px;
    position: relative;
    overflow: hidden;
  }
  
  .progress-bar {
    background-color: var(--primary-color);
    height: 100%;
    width: 0%;
    border-radius: 5px;
    transition: width 0.3s ease;
  }
  
  .progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  }
  
  /* Videos List */
  .videos-list-container {
    margin-top: 30px;
  }
  
  .videos-list-container h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
  }
  
  .videos-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 10px;
    margin-top: 10px;
    background-color: white;
  }
  
  .video-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
  }
  
  .video-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
  }
  
  .video-item:last-child {
    border-bottom: none;
  }
  
  .video-title {
    flex: 1;
    margin-right: 15px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
  }
  
  .video-title:hover {
    color: #cc0000;
    text-decoration: underline;
  }
  
  .video-duration {
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 0.9rem;
    min-width: 60px;
    text-align: right;
  }
  
  /* Download Button */
  .download-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  
  .download-btn:hover {
    background-color: #1a1a1a;
    transform: translateY(-1px);
  }
  
  .download-btn:active {
    transform: translateY(0);
  }
  
  /* Error Message */
  .error-message {
    color: var(--error-color);
    padding: 15px;
    border-radius: 5px;
    background-color: rgba(231, 76, 60, 0.1);
    margin-bottom: 20px;
    text-align: center;
    border-left: 4px solid var(--error-color);
  }
  
  /* Instructions */
  .instructions {
    background-color: var(--background-color);
    padding: 20px;
    border-radius: 8px;
  }
  
  .instructions h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
  }
  
  .instructions ol {
    padding-left: 20px;
    margin-bottom: 10px;
  }
  
  .instructions li {
    margin-bottom: 8px;
  }
  
  .note {
    font-size: 0.9rem;
    color: var(--light-text);
    font-style: italic;
  }
  
  /* Loading Spinner */
  .spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 3px solid var(--primary-color);
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* Utility Classes */
  .hidden {
    display: none !important;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .container {
      padding: 20px;
    }
    
    .input-section {
      flex-direction: column;
    }
    
    .stats {
      flex-direction: column;
    }
    
    .stat {
      width: 100%;
    }
    
    h1 {
      font-size: 1.8rem;
    }
  }
  
  /* Scrollbar Styling */
  ::-webkit-scrollbar {
    width: 8px;
  }
  
  ::-webkit-scrollbar-track {
    background: var(--background-color);
  }
  
  ::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: #aaa;
  }