/* Transcription page specific styles for YouTube2TXT */

/* Method selection cards */
.transcription-method {
    background: white;
    border-radius: 15px;
    padding: 2rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.transcription-method::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.05) 0%, rgba(102, 16, 242, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.transcription-method:hover {
    border-color: #0d6efd;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(13, 110, 253, 0.15);
}

.transcription-method:hover::before {
    opacity: 1;
}

.transcription-method.active {
    border-color: #0d6efd;
    background: rgba(13, 110, 253, 0.05);
}

.transcription-method .method-icon {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.transcription-method h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.transcription-method p {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.transcription-method .btn {
    position: relative;
    z-index: 1;
    border-radius: 20px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.transcription-method:hover .btn {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

/* YouTube form styles */
#youtubeForm,
#uploadForm {
    display: none;
    animation: slideInUp 0.4s ease-out;
}

#youtubeForm.active,
#uploadForm.active {
    display: block;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Video info preview */
#videoInfoPreview {
    animation: fadeInDown 0.3s ease-out;
    border-radius: 10px;
    overflow: hidden;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#videoInfoPreview .card {
    border: none;
    background: rgba(13, 110, 253, 0.03);
}

#videoThumbnail {
    border-radius: 8px;
    max-height: 90px;
    object-fit: cover;
}

#videoTitle {
    color: #495057;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

#videoDescription {
    max-height: 60px;
    overflow: hidden;
    line-height: 1.4;
}

/* URL input enhancements */
#youtubeUrl {
    border-radius: 8px 0 0 8px;
    border-right: none;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

#youtubeUrl:focus {
    box-shadow: none;
    border-color: #0d6efd;
}

#youtubeUrl.is-valid {
    border-color: #198754;
    background: rgba(25, 135, 84, 0.05);
}

#youtubeUrl.is-invalid {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.05);
}

.input-group .btn {
    border-radius: 0 8px 8px 0;
    z-index: 3;
}

/* Model selection styling */
.model-info {
    background: rgba(13, 110, 253, 0.05);
    border-radius: 8px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #495057;
}

.model-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.model-item {
    text-align: center;
    padding: 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
}

.model-speed {
    color: #198754;
    font-weight: 600;
}

.model-accuracy {
    color: #0d6efd;
    font-weight: 600;
}

/* File upload drop zone */
.drop-zone {
    border: 3px dashed #dee2e6;
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(248, 249, 250, 0.5);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.drop-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.05) 0%, rgba(23, 162, 184, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #0d6efd;
    background: rgba(13, 110, 253, 0.02);
}

.drop-zone:hover::before,
.drop-zone.drag-over::before {
    opacity: 1;
}

.drop-zone-content {
    position: relative;
    z-index: 1;
}

.drop-zone-content i {
    color: #6c757d;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.drop-zone:hover .drop-zone-content i,
.drop-zone.drag-over .drop-zone-content i {
    color: #0d6efd;
    transform: scale(1.1);
}

.drop-zone h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
}

.drop-zone.drag-over {
    border-color: #0d6efd;
    background: rgba(13, 110, 253, 0.1);
    transform: scale(1.02);
}

/* File info preview */
#fileInfo {
    animation: slideInUp 0.3s ease-out;
}

#fileInfo .card {
    border: none;
    background: rgba(23, 162, 184, 0.05);
    border-left: 4px solid #17a2b8;
}

.file-preview-icon {
    font-size: 2rem;
    color: #17a2b8;
    margin-right: 1rem;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #495057;
    word-break: break-word;
}

.file-metadata {
    color: #6c757d;
    font-size: 0.9rem;
}

.file-metadata span {
    margin-right: 1rem;
}

/* Advanced options accordion */
.accordion-button {
    background: rgba(13, 110, 253, 0.05);
    border: none;
    color: #495057;
    font-weight: 600;
    border-radius: 8px !important;
}

.accordion-button:not(.collapsed) {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: transparent;
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230d6efd'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-body {
    background: rgba(248, 249, 250, 0.5);
    border-radius: 0 0 8px 8px;
}

/* Temperature slider */
.temperature-container {
    position: relative;
    margin: 1rem 0;
}

.form-range {
    -webkit-appearance: none;
    background: linear-gradient(to right, #198754 0%, #ffc107 50%, #dc3545 100%);
    height: 8px;
    border-radius: 4px;
    outline: none;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #0d6efd;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.form-range::-webkit-slider-thumb:hover {
    background: #0b5ed7;
    transform: scale(1.1);
}

.form-range::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #0d6efd;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.temperature-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Processing estimation panel */
.estimation-panel {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.05) 0%, rgba(102, 16, 242, 0.05) 100%);
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 4px solid #0d6efd;
}

.estimation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(13, 110, 253, 0.1);
}

.estimation-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.estimation-label {
    color: #495057;
    font-weight: 500;
    font-size: 0.9rem;
}

.estimation-value {
    color: #0d6efd;
    font-weight: 600;
    font-size: 0.9rem;
}

.estimation-icon {
    width: 20px;
    text-align: center;
    color: #6c757d;
    margin-right: 0.5rem;
}

/* Recent transcriptions */
.recent-item {
    background: white;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.recent-item:hover {
    border-left-color: #0d6efd;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recent-item.success {
    border-left-color: #198754;
}

.recent-item.running {
    border-left-color: #17a2b8;
    background: rgba(23, 162, 184, 0.02);
}

.recent-item.failed {
    border-left-color: #dc3545;
}

.recent-title {
    font-weight: 600;
    color: #495057;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.recent-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #6c757d;
}

.recent-status {
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.7rem;
}

.recent-status.success {
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.recent-status.running {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.recent-status.failed {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Form validation enhancements */
.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.8-.77-.8-.77V4.2L1.52 5 2.3 5.8zm1.98-.77L3.5 7l-2-2 2-2 .78.77L3.05 5l1.23 1.23z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 2.4 2.4M8.2 4.6l-2.4 2.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Progress indicators */
.upload-progress {
    position: relative;
    margin-top: 1rem;
}

.progress {
    height: 8px;
    border-radius: 4px;
    background: rgba(13, 110, 253, 0.1);
    overflow: hidden;
}

.progress-bar {
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-bar.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position-x: 1rem;
    }
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

/* Submit button enhancements */
.btn-transcribe {
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-transcribe::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-transcribe:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.3);
}

.btn-transcribe:hover::before {
    left: 100%;
}

.btn-transcribe:disabled {
    background: #6c757d;
    transform: none;
    box-shadow: none;
}

.btn-transcribe:disabled::before {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .transcription-method {
        padding: 1.5rem 0.75rem;
        margin-bottom: 1rem;
    }
    
    .transcription-method .method-icon {
        margin-bottom: 1rem;
    }
    
    .drop-zone {
        padding: 2rem 1rem;
    }
    
    .drop-zone-content h5 {
        font-size: 1rem;
    }
    
    .drop-zone-content i {
        font-size: 2rem;
    }
    
    .estimation-panel {
        padding: 1rem;
    }
    
    .recent-item {
        padding: 0.5rem;
    }
    
    .btn-transcribe {
        width: 100%;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 576px) {
    .model-comparison {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.25rem;
    }
    
    .estimation-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .recent-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* Loading states specific to transcription */
.transcription-loading {
    position: relative;
}

.transcription-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    z-index: 10;
}

/* Success animations */
@keyframes successPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.4);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(25, 135, 84, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
    }
}

.success-pulse {
    animation: successPulse 1s ease-out;
}

/* Error shake animation */
@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

.error-shake {
    animation: errorShake 0.5s ease-out;
}