* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Inter',system-ui, -apple-system, BlinkMacSystemFont, 
    'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    color: #f0f0f0;
}
#message {
  transition: all 0.3s ease;
  font-weight: 500;
}
.btn-primary[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(125deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
}
.bg-animation::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 0, 150, 0.15) 0%, transparent 80%),
        radial-gradient(circle at 80% 80%, rgba(0, 150, 255, 0.15) 0%, transparent 80%),
        radial-gradient(circle at 40% 20%, rgba(150, 0, 255, 0.15) 0%, transparent 80%);
    animation: bgMove 20s ease infinite;
}

@keyframes bgMove {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(-5%, 5%) rotate(120deg);
    }

    66% {
        transform: translate(5%, -5%) rotate(240deg);
    }
}
.frames-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.frames-container img.extracted-frame {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.frames-container img.extracted-frame:hover {
    transform: scale(1.05);
}
.frame-thumbnail {
  width: 180px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}

.frame-thumbnail:hover {
  transform: scale(1.05);
}

/* Spinner inside button */
.button-loader {
    border: 3px solid #f3f3f3;       /* Light gray */
    border-top: 3px solid #fff;      /* White spinner */
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    animation: spin 1s linear infinite;
}
/* Align content inside button */
#transcribeBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    min-width: 150px;
}
/* Hide spinner animation keyframes */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loader {
    border: 4px solid #f3f3f3;        /* Light gray */
    border-top: 4px solid #007bff;    /* Blue color */
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}
@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}
.btn-download {
    display: inline-block;
    padding: 8px 12px;
    background: #007bff;
    color: white;
    border-radius: 6px;
    text-decoration: none;
}
.btn-download:hover {
    background: #0056b3;
}
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}
/* Header with Glow Effect */
.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 1s ease;
}
.header h1 {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-shadow: 0 0 80px rgba(102, 126, 234, 0.5);
    letter-spacing: -2px;
}
.header p {
    color: #a0a0a0;
    font-size: 1.3rem;
    font-weight: 300;
}
/* Glass Morphism Card */
.main-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease;
}
/* URL Input with Neon Effect */
.url-input-section {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    width: 100%;
    border: 1px solid rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}
.url-input-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    animation: shine 3s infinite;
}
@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}
.url-input-section input {
    flex: 1;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 15px;
    font-size: 1.1rem;
    color: #fff;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}
.url-input-section input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}
.url-input-section input::placeholder {
    color: #666;
    opacity: 1;
}
/* Animated Primary Button */
.btn-primary {
    padding: 1.5rem 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,transparent,rgba(255, 255, 255, 0.3),transparent);
    transition: left 0.5s;
}
.btn-primary:hover::before {
    left: 100%;
}
.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.6);
}
/* Video Player with Glow */
.video-player-section {
    margin-bottom: 3rem;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(102, 126, 234, 0.3);
    border: 2px solid rgba(102, 126, 234, 0.2);
    transition: all 0.4s ease;
}
.video-player-section:hover {
    box-shadow: 0 0 80px rgba(102, 126, 234, 0.5);
    transform: translateY(-5px);
}
#player {
    width: 100%;
    aspect-ratio: 16/9;
}
/* Animated gird */
.control-grid{
    display: grid !important;

    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
    gap: 2rem;
    margin-bottom: 3rem;
}

.controls-grid{
    display: grid !important;

    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
    gap: 2rem;
    margin-bottom: 3rem;
}
/* Control Cards with Hover Effects */
.control-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.control-card::before {
    content: '';
    position: absolute;
    top: 0%;
    left: 0%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,rgba(255, 255, 255, 0.1), rgba(102, 126, 234, 0.1) 100%);
    animation: shine 3s infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.control-card:hover::before {
    opacity: 1;
}
.control-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
}
.control-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}
.icon{
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.5));
}
/* Action Buttons with Pulse Effect */
.btn-action {
    width: 100%;
    padding: 1.2rem;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    overflow: hidden;
}
.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.btn-action::before {
    content: '';
    position: absolute;
    top: 50;
    left: 50%;
    width: 0%;
    height: 0%;
    border-radius: 50%;
    /* background: rgba(102, 126, 234, 0.3); */
    background: linear-gradient(90deg,transparent,rgba(255, 255, 255, 0.3),transparent);
    transform: translate(-50%, -50%) scale(0);
    transition:  width 0.6s , height 0.6s ;
}
.btn-action:hover::before {
    width: 300%;
    height: 300%;
    transform: translate(-50%, -50%) scale(1);
}
.btn-action:hover {
    background: #667eea;
    color: white;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
    transform: scale(1.05);
    animation: pulse 1.5s infinite;
}
/* Custom Toggle with Glow */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    position: relative;
    z-index: 1;
}
.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.4s ease;
    border: 1px solid rgba(102, 126, 234, 0.3);
}
.toggle-switch input {
    display: none;
}
.toggle-switch input:checked+.slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
}
.toggle-switch input:checked+.slider:before {
    transform: translateX(30px);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}
.slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}
.slider:before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: all 0.4s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.toggle-label {
    font-size: 1rem;
    color: #a0a0a0;
    font-weight: 500;
}
/* Results Section with Glow */
.results-section {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    min-height: 250px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.results-section h3 {
    margin-bottom: 1.5rem;
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
#transcriptionResult {
    background: rgba(0, 0, 0, 0.4);
    padding: 2rem;
    border-radius: 15px;
    line-height: 1.9;
    max-height: 600px;
    overflow-y: auto;
    color: #e0e0e0;
    border: 1px solid rgba(102, 126, 234, 0.2);
}
#transcriptionResult::-webkit-scrollbar {
    width: 8px;
}

#transcriptionResult::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

#transcriptionResult::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

#transcriptionResult:empty:before {
    content: 'Transcription will appear here...';
    color: #666;
    font-style: italic;
}
/* Loading Animation */
.loading {
    display: none;
    text-align: center;
    color: #667eea;
    font-weight: 600;
    padding: 3rem;
    font-size: 1.2rem;
}

.loading:before {
    content: '';
    display: block;
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.error-message {
    display: none;
    background: rgba(255, 50, 50, 0.1);
    color: #ff6b6b;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 50, 50, 0.3);
}
/* Quality Select */
.quality-select-container {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}
.quality-select-container select {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    width: 50%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}
.quality-select-container select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.quality-select-container select option {
    background: #1a1a2e;
    color: #fff;
}
/* video tags */

.tags-box {
  display: none;
  flex-direction: column;
  max-height: 150px;
  gap: 10px;
  translate: all 0.3s ease;
  padding: 10px;
  overflow-y: auto; /* Scroll instead of expand */
}
.tags-header {
  position: sticky;
  top: 0;
  text-align: right;
  z-index: 2;
}
.btn-copy {
  align-self: flex-end;
  padding: 6px 12px;
  background: #00796b;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}
btn-copy:hover {
  background: #005f56;
}
/* Fade-in animation only for this box */
@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}
/* Tags Display */
.tags-display { 
    padding: 1.5rem;
    margin-top: 1rem;
    min-height: 60px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}
.tag {
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    animation: tagAppear 0.5s ease;
    transition: all 0.3s ease;
}
.tag:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.5);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating Particles */
.particle {
    position: fixed;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.8), transparent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: float 20s infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5rem;
    }

    .main-card {
        padding: 2rem;
    }

    .url-input-section {
        flex-direction: column;
    }

    .controls-grid {
        grid-template-columns: 1fr;
    }

    .btn-primary {
        padding: 1.2rem 2rem;
    }
}



