:root {
    --primary-bg: #0f0f13;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-gradient: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --font-family: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--primary-bg);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    padding: 40px 20px;
    /* More padding */
    display: block;
    /* Remove flex centering to fix scrolling */
}

/* Dynamic Background */
/* ... (blobs remain same) ... */

/* Glass Container */
/* Center independently with margin */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 600px;
    /* Slightly wider */
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    margin: 0 auto;
    /* Center horizontally */
}

/* ... (Header, Logo, Subtitle remain same) ... */

/* Input Group */
.input-group {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
}

input[type="text"] {
    width: 100%;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    text-align: center;
    /* Center text for better look */
}

input[type="text"]:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

/* Action Buttons Container */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

/* Large Action Buttons */
.action-btn-large {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-family);
}

.action-btn-large.primary {
    background: var(--text-main);
    color: var(--primary-bg);
}

.action-btn-large.primary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.action-btn-large.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.action-btn-large.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.action-btn-large:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ... (Loader, Messages remain same) ... */
.hidden {
    display: none !important;
}

/* Result Card */
.video-preview {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    /* Letterboxing background */
}

.video-preview video {
    width: 100%;
    height: auto;
    max-height: 500px;
    display: block;
}

.video-info h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-caption {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    line-height: 1.4;
    max-height: 80px;
    overflow-y: auto;
    padding-right: 5px;
    text-align: left;
}

/* Custom scrollbar for caption */
.video-caption::-webkit-scrollbar {
    width: 4px;
}

.video-caption::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
}

.hashtag {
    font-size: 0.8rem;
    color: #a8c0ff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.hashtag:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-family);
}

.action-btn.primary {
    background: white;
    color: #000;
}

.action-btn.primary:hover {
    background: #f0f0f0;
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Footer */
footer {
    margin-top: 30px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}

@media (max-width: 480px) {
    .glass-container {
        padding: 30px 20px;
    }
}

/* Accessibility Utility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Fix for Result Card Layout */
#result.result-card {
    flex-direction: column !important;
}

.result-card .video-preview {
    width: 100% !important;
    max-width: 100% !important;
}