/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1d1d1f;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f7 50%, #e8e8ed 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(248, 248, 248, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo {
    height: 96px;
    width: auto;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.logo:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.logo-text {
    font-size: 2rem;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.04em;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    background: linear-gradient(135deg, #007AFF, #5856D6, #AF52DE);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: logoTextShimmer 4s ease-in-out infinite, logoTextFloat 6s ease-in-out infinite 0.5s;
}

@keyframes logoTextShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes logoTextFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-2px); }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: #1d1d1f;
    font-weight: 400;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0.8;
}

.nav-link:hover {
    color: #007AFF;
    opacity: 1;
    transform: translateY(-1px);
}

.cta-button {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 25px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4);
    background: linear-gradient(135deg, #0056CC, #4C44CC);
}

/* Language Selector */
.language-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lang-btn.active {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
}

.lang-btn:hover:not(.active) {
    background: rgba(0, 122, 255, 0.1);
    color: #007AFF;
}

/* User Indicator */
.user-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 122, 255, 0.2);
    border-radius: 50px;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.15);
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.avatar-circle {
    color: white;
    font-size: 1.2rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1d1d1f;
    line-height: 1.2;
}

.user-status {
    font-size: 0.8rem;
    color: #30d158;
    font-weight: 500;
}

.user-menu-btn {
    background: none;
    border: none;
    color: #86868b;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin-left: 0.25rem;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1001;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    color: #1d1d1f;
    text-decoration: none;
    font-size: 0.9rem;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: #007AFF;
}

.dropdown-item.logout {
    color: #ff3b30;
}

.dropdown-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 0.5rem 0;
}

/* Main Content */
.transcript-main {
    padding-top: 120px;
    min-height: 100vh;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #007AFF, #5856D6, #AF52DE);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.page-header p {
    font-size: 1.125rem;
    color: #86868b;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.auth-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff3b30;
    animation: pulse 2s infinite;
}

.status-dot.authenticated {
    background: #30d158;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Auth Required Section */
.auth-required {
    background: white;
    border-radius: 24px;
    padding: 4rem 3rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 3rem;
}

.auth-message {
    max-width: 500px;
    margin: 0 auto;
}

.auth-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.auth-message h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 1rem;
}

.auth-message p {
    color: #86868b;
    font-size: 1.125rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.auth-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.primary-button,
.secondary-button {
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.primary-button {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    border: none;
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.3);
}

.primary-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 122, 255, 0.4);
    background: linear-gradient(135deg, #0056CC, #4C44CC);
}

.secondary-button {
    background: rgba(255, 255, 255, 0.8);
    color: #1d1d1f;
    border: 2px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #007AFF;
    color: #007AFF;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Transcript Interface */
.transcript-interface {
    display: grid;
    gap: 2rem;
}

/* URL Section */
.url-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.url-container h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 1.5rem;
    text-align: center;
}

.url-input-group {
    max-width: 600px;
    margin: 0 auto;
}

.url-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 0.75rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.url-input-wrapper:focus-within {
    border-color: #007AFF;
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.url-icon {
    color: #007AFF;
    flex-shrink: 0;
}

.url-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    color: #1d1d1f;
    font-family: inherit;
}

.url-input-wrapper input::placeholder {
    color: #86868b;
}

.extract-button {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.extract-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.4);
}

.extract-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button-loader {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.loader-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.url-help {
    text-align: center;
}

.url-help p {
    font-size: 0.85rem;
    color: #86868b;
}

/* Video Preview */
.video-preview {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.preview-container h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 1.5rem;
}

.video-info {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.video-thumbnail {
    position: relative;
    width: 200px;
    height: 112px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    flex-shrink: 0;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.video-details {
    flex: 1;
}

.video-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.video-meta {
    color: #86868b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.video-url {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.85rem;
}

.video-url code {
    background: none;
    color: #007AFF;
    font-family: monospace;
    word-break: break-all;
}

/* Transcript Results */
.transcript-results {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1d1d1f;
}

.results-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1d1d1f;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #007AFF;
    color: white;
    border-color: #007AFF;
    transform: translateY(-1px);
}

.transcript-content {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.transcript-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #1d1d1f;
    white-space: pre-wrap;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.transcript-meta {
    display: flex;
    justify-content: space-around;
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem;
}

.meta-item {
    text-align: center;
}

.meta-label {
    display: block;
    font-size: 0.8rem;
    color: #86868b;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.meta-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1d1d1f;
}

/* Extraction History */
.extraction-history {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.history-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1d1d1f;
}

.history-actions {
    display: flex;
    gap: 0.5rem;
}

.history-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #007AFF;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #86868b;
    font-weight: 500;
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-placeholder {
    text-align: center;
    padding: 3rem;
    color: #86868b;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.history-item {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 122, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.15);
    border-color: rgba(0, 122, 255, 0.4);
}

.history-item-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.video-thumbnail {
    position: relative;
    width: 120px;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.history-item:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.history-item:hover .play-overlay {
    opacity: 1;
}

.video-details {
    flex: 1;
    min-width: 0;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.history-video-info {
    flex: 1;
    min-width: 0;
}

.video-title {
    margin: 0 0 0.25rem 0;
    color: #1d1d1f;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-author {
    color: #86868b;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-video-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.history-video-meta {
    color: #86868b;
    font-size: 0.85rem;
    line-height: 1.4;
}

.history-item-actions {
    text-align: right;
    flex-shrink: 0;
}

.history-status {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.status-success {
    background: rgba(52, 199, 89, 0.1);
    color: #34c759;
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.status-error {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.status-processing {
    background: rgba(255, 149, 0, 0.1);
    color: #ff9500;
    border: 1px solid rgba(255, 149, 0, 0.3);
}

.history-time {
    color: #86868b;
    font-size: 0.85rem;
    text-align: right;
}

/* Mobile Responsive for History Items */
@media screen and (max-width: 768px) {
    .history-item-content {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .video-thumbnail {
        width: 100%;
        height: 200px;
        align-self: stretch;
    }
    
    .history-item-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .history-item-actions {
        text-align: left;
    }
    
    .video-title {
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .history-item {
        padding: 1rem;
    }
    
    .video-thumbnail {
        height: 180px;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    margin: 0 2rem;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #007AFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.loading-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.loading-content p {
    color: #86868b;
    margin-bottom: 1.5rem;
}

.loading-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007AFF, #5856D6);
    transition: width 0.3s ease;
    border-radius: 3px;
}

.progress-text {
    font-size: 0.85rem;
    color: #86868b;
    font-weight: 500;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 120px;
    right: 2rem;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #30d158;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
}

.toast.error {
    border-left-color: #ff3b30;
}

.toast.warning {
    border-left-color: #ff9500;
}

.toast.info {
    border-left-color: #007AFF;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .video-info {
        flex-direction: column;
    }
    
    .video-thumbnail {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* iPad specific navigation adjustments */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .nav-container {
        padding: 0.75rem 1.5rem;
    }
    
    .logo {
        height: 72px;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    .language-selector {
        margin: 0 0.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 1rem;
        flex-wrap: wrap;
        min-height: auto;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
        gap: 1rem;
    }
    
    .transcript-main {
        padding-top: 160px;
    }
    
    .url-section,
    .video-preview,
    .transcript-results,
    .extraction-history {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .url-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .extract-button {
        width: 100%;
        justify-content: center;
        margin-top: 0.75rem;
    }
    
    .results-header,
    .history-header {
        flex-direction: column;
        text-align: center;
    }
    
    .results-actions,
    .history-actions {
        justify-content: center;
    }
    
    .history-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .auth-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .primary-button,
    .secondary-button {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .user-indicator .user-info {
        display: none;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .transcript-main {
        padding-top: 140px;
    }
    
    .page-header {
        padding: 1rem 0;
    }
    
    .url-section,
    .video-preview,
    .transcript-results,
    .extraction-history,
    .auth-required {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .auth-message {
        padding: 0;
    }
    
    .auth-icon {
        font-size: 3rem;
    }
    
    .loading-content {
        padding: 2rem;
    }
}

/* Animations */
.transcript-interface {
    animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.auth-required {
    animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}