* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    color: #333;
    position: relative;
    overflow-x: hidden;
    background: #f5f0e8;
}

/* Animated Mesh Gradient Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg,
        #667eea 0%,
        #764ba2 25%,
        #f093fb 50%,
        #4facfe 75%,
        #667eea 100%);
    background-size: 400% 400%;
    animation: meshGradient 15s ease infinite;
    opacity: 0.15;
}

@keyframes meshGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Floating Gradient Blobs for Depth */
body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(240, 147, 251, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(79, 172, 254, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 60% 20%, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
    animation: floatingBlobs 20s ease-in-out infinite;
}

@keyframes floatingBlobs {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* Accessibility: Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after {
        animation: none;
    }
}

.container {
    max-width: 1200px; /* Increased from 800px for better desktop experience */
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.upload-section {
    background: white;
    border-radius: 15px;
    padding: 40px; /* Increased from 30px for better spacing */
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

.status-banner {
    background: linear-gradient(135deg, #f0fff4 0%, #48bb78 20%, #f0fff4 100%);
    border: 2px solid #48bb78;
    border-radius: 10px;
    padding: 12px 20px;
    margin: -20px -20px 20px -20px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.upload-group {
    margin-bottom: 30px;
}

.upload-group h2 {
    margin-bottom: 12px;
    color: #4a5568;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Video Title Input Styling */
.video-title-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #2d3748;
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.video-title-input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.video-title-input:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.video-title-input:focus {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.video-title-input:focus::placeholder {
    color: #cbd5e0;
}

.file-input-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 20px;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input-label:hover {
    border-color: #667eea;
    background: #edf2f7;
    transform: translateY(-1px);
}

.upload-icon {
    font-size: 1.5rem;
}

.upload-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: #4a5568;
}

.preview-container {
    margin-top: 15px;
}

.photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.photo-item {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: grab;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.photo-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.photo-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
    transform: scale(0.95);
}

.photo-item.drag-over {
    border-color: #667eea;
    background-color: rgba(102, 126, 234, 0.1);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Edit Text Button - Hidden by default, shown on hover */
.edit-text-btn-hover {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    white-space: nowrap;
}

.photo-item:hover .edit-text-btn-hover {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.edit-text-btn-hover:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.drag-handle {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 12px;
    cursor: grab;
    z-index: 2;
    user-select: none;
}

.photo-number {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.remove-btn:hover {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

/* Photo Text Controls */
.photo-text-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.85) 100%);
    padding: 10px;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease;
    z-index: 3;
    border-radius: 0 0 8px 8px;
}

.photo-item:hover .photo-text-controls {
    opacity: 1;
    transform: translateY(0);
}

.photo-text-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 5px;
    font-size: 13px;
    margin-bottom: 8px;
    outline: none;
    font-weight: 500;
}

.photo-text-input::placeholder {
    color: rgba(255,255,255,0.65);
    font-weight: 400;
}

.photo-text-input:focus {
    border-color: #667eea;
    background: rgba(255,255,255,0.18);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.text-style-controls {
    display: flex;
    gap: 5px;
    justify-content: space-between;
}

.text-color-picker {
    width: 42px;
    height: 32px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    cursor: pointer;
    background: transparent;
}

.text-size-select,
.text-font-select,
.text-animation-select,
.text-position-select {
    flex: 1;
    padding: 6px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    outline: none;
    font-weight: 500;
}

.text-size-select option,
.text-font-select option,
.text-animation-select option,
.text-position-select option {
    background: #1e293b;
    color: white;
}

.text-size-select:focus,
.text-font-select:focus,
.text-animation-select:focus,
.text-position-select:focus {
    border-color: #667eea;
}

.audio-preview {
    padding: 15px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.audio-icon {
    font-size: 2rem;
}

.audio-info {
    flex: 1;
}

.audio-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.audio-size {
    color: #64748b;
    font-size: 0.9rem;
}

.format-info {
    color: #059669;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 4px;
    padding: 2px 6px;
    background: #ecfdf5;
    border-radius: 4px;
    display: inline-block;
}

/* Video Clip Preview Styles */
.video-clip-preview {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.video-clip-item {
    padding: 15px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.video-clip-icon {
    font-size: 2rem;
}

.video-clip-info {
    flex: 1;
}

.video-clip-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.video-clip-size {
    color: #64748b;
    font-size: 0.9rem;
}

.duration-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

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

/* Background Selector Styles */
.background-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.background-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.background-option:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.background-option.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.background-option.active::before {
    content: "✓";
    position: absolute;
    top: 5px;
    right: 8px;
    background: white;
    color: #667eea;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.bg-preview {
    width: 60px;
    height: 40px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid rgba(0,0,0,0.1);
}

.background-option span {
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
}

/* Background Preview Styles */
.bg-preview.solid-black {
    background: #000000;
}

.bg-preview.gradient-sunset {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
}

.bg-preview.gradient-ocean {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-preview.gradient-forest {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.bg-preview.gradient-royal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-preview.particles {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    position: relative;
    overflow: hidden;
}

.bg-preview.particles::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, white 1px, transparent 1px),
        radial-gradient(circle at 70% 80%, white 1px, transparent 1px),
        radial-gradient(circle at 40% 60%, white 1px, transparent 1px);
    background-size: 15px 15px, 20px 20px, 12px 12px;
}

.bg-preview.geometric {
    background: linear-gradient(45deg, #667eea 25%, transparent 25%),
                linear-gradient(-45deg, #764ba2 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #667eea 75%),
                linear-gradient(-45deg, transparent 75%, #764ba2 75%);
    background-size: 10px 10px;
    background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
}

.bg-preview.blur-colorful {
    background:
        radial-gradient(circle at 20% 20%, #ff9a9e 20%, transparent 20%),
        radial-gradient(circle at 80% 80%, #667eea 25%, transparent 25%),
        radial-gradient(circle at 40% 40%, #38ef7d 15%, transparent 15%),
        linear-gradient(135deg, #fecfef 0%, rgba(254, 207, 239, 0.3) 100%);
    filter: blur(0.5px);
}

.bg-preview.animated-mesh {
    background: linear-gradient(135deg,
        #667eea 0%,
        #764ba2 25%,
        #f093fb 50%,
        #4facfe 75%,
        #667eea 100%);
    background-size: 200% 200%;
    animation: meshGradientPreview 3s ease infinite;
    position: relative;
    overflow: hidden;
}

.bg-preview.animated-mesh::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background:
        radial-gradient(circle at 30% 30%, rgba(102, 126, 234, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(240, 147, 251, 0.4) 0%, transparent 50%);
    animation: floatingBlobsPreview 4s ease-in-out infinite;
    filter: blur(20px);
}

@keyframes meshGradientPreview {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes floatingBlobsPreview {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10px, 10px) scale(1.1); }
}

/* Photo Effects Selector Styles */
.effects-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.effect-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.effect-option:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.effect-option.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.effect-option.active::before {
    content: "✓";
    position: absolute;
    top: 4px;
    right: 6px;
    background: white;
    color: #667eea;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.effect-preview {
    width: 50px;
    height: 35px;
    border-radius: 6px;
    margin-bottom: 6px;
    border: 1px solid rgba(0,0,0,0.1);
    background-image: linear-gradient(45deg, #ff9a9e 0%, #fecfef 100%);
}

.effect-option span {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

/* Effect Preview Styles */
.effect-preview.effect-none {
    background: linear-gradient(45deg, #ff9a9e 0%, #fecfef 100%);
}

.effect-preview.effect-vintage {
    background: linear-gradient(45deg, #d4a574 0%, #b8956a 100%);
    filter: sepia(0.5) contrast(1.2);
}

.effect-preview.effect-sepia {
    background: linear-gradient(45deg, #deb887 0%, #cd853f 100%);
    filter: sepia(1);
}

.effect-preview.effect-black-white {
    background: linear-gradient(45deg, #666 0%, #999 100%);
    filter: grayscale(1);
}

.effect-preview.effect-dramatic {
    background: linear-gradient(45deg, #2c3e50 0%, #4a6741 100%);
    filter: contrast(1.5) brightness(0.8);
}

.effect-preview.effect-cool {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    filter: hue-rotate(180deg);
}

.effect-preview.effect-warm {
    background: linear-gradient(45deg, #ff9a56 0%, #ff6b6b 100%);
    filter: hue-rotate(30deg) saturate(1.3);
}

.effect-preview.effect-bright {
    background: linear-gradient(45deg, #ffecd2 0%, #fcb69f 100%);
    filter: brightness(1.3) saturate(1.2);
}

/* Audio Source Selector Styles */
.audio-source-selector {
    display: flex;
    background: #f8fafc;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
    gap: 4px;
}

.audio-tab {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #64748b;
    background: transparent;
}

.audio-tab:hover {
    background: #e2e8f0;
    color: #475569;
}

.audio-tab.active {
    background: #667eea;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.audio-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.audio-content.active {
    display: block;
}

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

.audio-help-text {
    text-align: center;
    color: #64748b;
    font-style: italic;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    margin: 0;
}

/* Music Library Styles */
.music-library {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    background: #f8fafc;
    border-radius: 12px;
}

.music-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.music-track:hover {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.music-track.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.track-info {
    flex: 1;
}

.track-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.track-duration {
    font-size: 0.875rem;
    opacity: 0.7;
}

.track-subtitle {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 2px;
    font-style: italic;
}

.music-track.selected .track-duration,
.music-track.selected .track-subtitle {
    opacity: 0.9;
}

.config-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 16px;
}

.config-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.music-track.active .config-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.custom-name-track {
    border: 2px dashed #cbd5e1;
}

.custom-name-track:hover {
    border-color: #667eea;
    border-style: solid;
}

.custom-name-track.active {
    border-style: solid;
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.play-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #667eea;
    color: white;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 16px;
}

.play-btn:hover {
    background: #5a67d8;
    transform: scale(1.1);
}

.music-track.selected .play-btn {
    background: white;
    color: #667eea;
}

.play-btn.playing {
    background: #ef4444;
}

.play-btn.playing::before {
    content: "⏸";
}

/* Video Templates Styles */
.template-description {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: center;
    font-style: italic;
}

.template-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.template-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    text-align: center;
}

.template-option:hover {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
    transform: translateY(-3px);
}

.template-option.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.template-option.active::before {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 10px;
    background: white;
    color: #667eea;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.template-preview {
    width: 80px;
    height: 50px;
    border-radius: 10px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.template-icon {
    font-size: 24px;
    z-index: 1;
}

.template-info {
    text-align: center;
}

.template-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.template-desc {
    font-size: 0.75rem;
    opacity: 0.8;
    line-height: 1.2;
}

.template-option.active .template-desc {
    opacity: 0.9;
}

/* Template Preview Backgrounds */
.custom-template {
    background: linear-gradient(45deg, #f8fafc 0%, #e2e8f0 100%);
    color: #64748b;
}

.modern-minimal-template {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.vibrant-energy-template {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    color: white;
}

.elegant-classic-template {
    background: linear-gradient(135deg, #2c3e50 0%, #fd79a8 100%);
    color: white;
}

.tech-futuristic-template {
    background: linear-gradient(135deg, #0093E9 0%, #80D0C7 100%);
    color: white;
}

.warm-cozy-template {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
    color: white;
}

.artistic-creative-template {
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    color: white;
}

.corporate-professional-template {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
    color: white;
}

/* Event-Themed Templates */
.happy-birthday-template {
    background: linear-gradient(135deg, #ff6ec4 0%, #7873f5 100%);
    color: white;
}

.baby-shower-template {
    background: linear-gradient(135deg, #ffd6e8 0%, #c4e0ff 100%);
    color: #5a5a5a;
}

.wedding-template {
    background: linear-gradient(135deg, #fff5f7 0%, #ffd5e5 100%);
    color: #d946a6;
}

.diwali-template {
    background: linear-gradient(135deg, #ff9933 0%, #ffcc00 100%);
    color: white;
}

.housewarming-template {
    background: linear-gradient(135deg, #f4a460 0%, #d2691e 100%);
    color: white;
}

.christmas-template {
    background: linear-gradient(135deg, #c41e3a 0%, #0c8346 100%);
    color: white;
}

.new-year-template {
    background: linear-gradient(135deg, #ffd700 0%, #9b59b6 100%);
    color: white;
}

.graduation-template {
    background: linear-gradient(135deg, #1e3a8a 0%, #fbbf24 100%);
    color: white;
}

.anniversary-template {
    background: linear-gradient(135deg, #ff6b9d 0%, #c92a68 100%);
    color: white;
}

.settings-group {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.settings-group h2 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a5568;
}

/* Message Input Styles */
.message-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.message-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message-item label {
    font-weight: 500;
    color: #4a5568;
    font-size: 1rem;
}

.message-item textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fafafa;
}

.message-item textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.message-item textarea::placeholder {
    color: #a0aec0;
    font-style: italic;
}

.char-counter {
    align-self: flex-end;
    color: #718096;
    font-size: 0.85rem;
    font-weight: 400;
}

.char-counter.warning {
    color: #ed8936;
}

.char-counter.error {
    color: #e53e3e;
}

/* Message Styling Controls */
.message-styling {
    display: flex;
    gap: 15px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.style-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.style-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a5568;
}

.style-group select {
    padding: 6px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    transition: border-color 0.2s ease;
}

.style-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.color-select {
    position: relative;
}

.color-select option[value="white"] { background-color: #f8f9fa; }
.color-select option[value="black"] { background-color: #2d3748; color: white; }
.color-select option[value="gold"] { background-color: #ffd700; color: black; }
.color-select option[value="red"] { background-color: #e53e3e; color: white; }
.color-select option[value="blue"] { background-color: #3182ce; color: white; }
.color-select option[value="green"] { background-color: #38a169; color: white; }
.color-select option[value="purple"] { background-color: #805ad5; color: white; }
.color-select option[value="orange"] { background-color: #dd6b20; color: white; }

.animation-select {
    position: relative;
}

.animation-select option[value="fade-in"] { background-color: #f8fafc; }
.animation-select option[value="slide-up"] { background-color: #e0f2fe; }
.animation-select option[value="slide-down"] { background-color: #e8f5e8; }
.animation-select option[value="slide-left"] { background-color: #fff3e0; }
.animation-select option[value="slide-right"] { background-color: #fce4ec; }
.animation-select option[value="zoom-in"] { background-color: #f3e5f5; }
.animation-select option[value="typewriter"] { background-color: #e1f5fe; }
.animation-select option[value="bounce"] { background-color: #fff8e1; }
.animation-select option[value="glow"] { background-color: #f9fbe7; }
.animation-select option[value="none"] { background-color: #fafafa; }

.setting-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.setting-item label {
    font-weight: 500;
    min-width: 180px;
    color: #4a5568;
}

.setting-item input,
.setting-item select {
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 1rem;
}

.create-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-top: 20px;
}

.create-btn:hover {
    transform: translateY(-2px);
}

.create-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.progress-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.result-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.back-to-home-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    float: left;
}

.back-to-home-link:hover {
    color: #764ba2;
}

.result-section h3 {
    color: #2d3748;
    margin-bottom: 15px;
    margin-top: 0;
    font-size: 1.3rem;
}

.ready-subtitle {
    color: #718096;
    font-size: 1rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.result-video {
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
    margin: 20px 0;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn,
.secondary-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.download-btn {
    background: #38a169;
    color: white;
    border: none;
}

.secondary-btn {
    background: #e2e8f0;
    color: #4a5568;
    border: 1px solid #cbd5e0;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
    border-radius: 6px;
}

.download-btn:hover,
.secondary-btn:hover {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    .upload-section {
        padding: 20px;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .setting-item label {
        min-width: auto;
    }

    .result-actions {
        flex-direction: column;
        align-items: center;
    }

    .message-item textarea {
        min-height: 60px;
        font-size: 0.95rem;
    }

    .background-selector {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 10px;
    }

    .background-option {
        padding: 8px;
    }

    .bg-preview {
        width: 50px;
        height: 30px;
    }

    .background-option span {
        font-size: 0.75rem;
    }

    .message-styling {
        flex-direction: column;
        gap: 10px;
    }

    .style-group select {
        font-size: 0.85rem;
    }

    .effects-selector {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 8px;
    }

    .effect-option {
        padding: 6px;
    }

    .effect-preview {
        width: 40px;
        height: 25px;
    }

    .effect-option span {
        font-size: 0.7rem;
    }

    .audio-source-selector {
        flex-direction: column;
        gap: 2px;
    }

    .audio-tab {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .music-library {
        max-height: 200px;
    }

    .music-track {
        padding: 12px 16px;
    }

    .track-title {
        font-size: 0.9rem;
    }

    .track-duration {
        font-size: 0.8rem;
    }

    .play-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
        margin-left: 12px;
    }
}

/* Error Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px 15px;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.error-icon {
    font-size: 1.5rem;
    color: #e53e3e;
}

.modal-header h3 {
    flex: 1;
    margin: 0;
    color: #2d3748;
    font-size: 1.4rem;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #718096;
    line-height: 1;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #2d3748;
}

.modal-body {
    padding: 20px 25px;
}

.modal-body p {
    margin-bottom: 15px;
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.5;
}

.error-suggestions {
    background: #fef5e7;
    border-left: 4px solid #f6ad55;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.error-suggestions h4 {
    color: #c53030;
    margin-bottom: 10px;
    font-size: 1rem;
}

.error-suggestions ul {
    margin: 0;
    padding-left: 18px;
    color: #744210;
}

.error-suggestions li {
    margin-bottom: 5px;
}

.modal-footer {
    padding: 15px 25px 20px;
    text-align: right;
    border-top: 1px solid #e2e8f0;
}

.modal-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.modal-btn:hover {
    transform: translateY(-1px);
}

.modal-btn-secondary {
    background: #e5e7eb;
    color: #374151;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 10px;
}

.modal-btn-secondary:hover {
    background: #d1d5db;
    transform: translateY(-1px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Social Sharing Styles */
.social-sharing {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    border: 2px solid #e2e8f0;
}

.social-sharing h4 {
    color: #2d3748;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.social-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    gap: 8px;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.twitter-btn {
    background: linear-gradient(135deg, #1da1f2 0%, #0d8bd9 100%);
}

.twitter-btn:hover {
    background: linear-gradient(135deg, #0d8bd9 0%, #0a7bc4 100%);
}

.facebook-btn {
    background: linear-gradient(135deg, #3b5998 0%, #2d4373 100%);
}

.facebook-btn:hover {
    background: linear-gradient(135deg, #2d4373 0%, #1e2b4d 100%);
}

.linkedin-btn {
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
}

.linkedin-btn:hover {
    background: linear-gradient(135deg, #005885 0%, #004066 100%);
}

.instagram-btn {
    background: linear-gradient(135deg, #f58529 0%, #dd2a7b 50%, #8134af 100%);
}

.instagram-btn:hover {
    background: linear-gradient(135deg, #dd2a7b 0%, #8134af 50%, #515bd4 100%);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.whatsapp-btn:hover {
    background: linear-gradient(135deg, #128c7e 0%, #075e54 100%);
}

.email-btn {
    background: linear-gradient(135deg, #ea4335 0%, #d33b2c 100%);
}

.email-btn:hover {
    background: linear-gradient(135deg, #d33b2c 0%, #b52d20 100%);
}

.copy-btn {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.copy-btn:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

.social-icon {
    font-size: 16px;
}

.quick-share {
    margin-top: 20px;
}

.quick-share label {
    display: block;
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.share-message-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: all 0.3s ease;
}

.share-message-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.char-count {
    display: flex;
    justify-content: flex-end;
    margin-top: 5px;
    font-size: 12px;
    color: #718096;
}

.char-count.warning {
    color: #ed8936;
}

.char-count.error {
    color: #e53e3e;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .social-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .social-btn {
        padding: 10px 12px;
        font-size: 13px;
    }

    .social-sharing {
        padding: 20px;
        margin-top: 20px;
    }
}

/* Video Editing Styles */
.editing-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.editing-section h3 {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.editing-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.editing-panel {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 20px;
    border: 2px solid #e2e8f0;
}

.editing-panel h4 {
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.trim-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.time-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.time-input-group label {
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
}

.time-input {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.time-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.crop-presets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.crop-preset-btn {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.crop-preset-btn.active,
.crop-preset-btn:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.photo-sequence {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    border: 2px dashed #cbd5e0;
    margin-bottom: 15px;
    min-height: 100px;
    overflow-x: auto;
}

.photo-item {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    cursor: move;
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
    position: relative;
}

.photo-item:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.photo-item .photo-number {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.sequence-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.speed-options {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.speed-btn {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.speed-btn.active,
.speed-btn:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.edit-action-btn {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.edit-action-btn.primary {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.edit-action-btn.primary:hover {
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.edit-preview {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    text-align: center;
}

.edit-preview h4 {
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.edit-preview-video {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 12px;
    margin-bottom: 20px;
}

.preview-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .editing-controls {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .crop-presets {
        grid-template-columns: 1fr;
    }

    .speed-options {
        grid-template-columns: repeat(3, 1fr);
    }

    .sequence-controls {
        flex-direction: column;
    }

    .preview-actions {
        flex-direction: column;
        align-items: center;
    }

    .editing-section {
        padding: 20px;
    }
}

/* Download Options Styles */
.download-options {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #e2e8f0;
}

.download-options h4 {
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.download-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quality-format-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.selector-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selector-group label {
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
}

.quality-select,
.format-select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quality-select:focus,
.format-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.quality-info {
    background: white;
    border-radius: 12px;
    padding: 15px;
    border: 2px solid #e2e8f0;
}

.quality-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #4a5568;
}

.detail-item strong {
    color: #2d3748;
    font-weight: 600;
}

.download-btn.primary {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.download-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

.download-btn.secondary {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.download-btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.3);
}

.quality-selector.loading {
    opacity: 0.6;
    pointer-events: none;
}

.quality-selector.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .quality-format-selector {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .quality-details {
        text-align: center;
    }

    .detail-item {
        justify-content: center;
        flex-direction: column;
        gap: 4px;
    }

    .download-options {
        padding: 15px;
    }
}

/* Advanced Transition Styles */

.effect-option[data-transition]:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}


.transition-preview {
    width: 60px;
    height: 40px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #f7fafc;
}

.preview-box {
    position: absolute;
    width: 50%;
    height: 100%;
    border-radius: 4px;
}

.preview-box:first-child {
    left: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.preview-box:last-child {
    right: 0;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    opacity: 0;
}

.effect-option[data-transition]:hover .preview-box:last-child {
    animation: var(--transition-animation, fadeTransition) 1.5s ease-in-out infinite;
}

/* Fade Transition */
.fade-preview {
    --transition-animation: fadeTransition;
}

@keyframes fadeTransition {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Slide Transition */
.slide-preview {
    --transition-animation: slideTransition;
}

@keyframes slideTransition {
    0% { transform: translateX(100%); opacity: 0; }
    50% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(-100%); opacity: 0; }
}

/* Zoom Transition */
.zoom-preview {
    --transition-animation: zoomTransition;
}

@keyframes zoomTransition {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.2); opacity: 0; }
}

/* Dissolve Transition */
.dissolve-preview {
    --transition-animation: dissolveTransition;
}

@keyframes dissolveTransition {
    0% { opacity: 0; filter: blur(5px); }
    50% { opacity: 1; filter: blur(0px); }
    100% { opacity: 0; filter: blur(5px); }
}

/* Wipe Transition */
.wipe-preview {
    --transition-animation: wipeTransition;
}

@keyframes wipeTransition {
    0% { clip-path: inset(0 100% 0 0); }
    50% { clip-path: inset(0 0 0 0); }
    100% { clip-path: inset(0 0 0 100%); }
}

/* Push Transition */
.push-preview {
    --transition-animation: pushTransition;
}

@keyframes pushTransition {
    0% { transform: translateX(100%); }
    50% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Cover Transition */
.cover-preview {
    --transition-animation: coverTransition;
}

@keyframes coverTransition {
    0% { transform: translateY(100%); opacity: 0; }
    50% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-100%); opacity: 0; }
}

/* Reveal Transition */
.reveal-preview {
    --transition-animation: revealTransition;
}

@keyframes revealTransition {
    0% { clip-path: circle(0% at center); }
    50% { clip-path: circle(70% at center); }
    100% { clip-path: circle(100% at center); opacity: 0; }
}

/* Crossfade Transition */
.crossfade-preview {
    --transition-animation: crossfadeTransition;
}

@keyframes crossfadeTransition {
    0% { opacity: 0; mix-blend-mode: multiply; }
    50% { opacity: 0.8; mix-blend-mode: multiply; }
    100% { opacity: 0; mix-blend-mode: normal; }
}

/* Morph Transition */
.morph-preview {
    --transition-animation: morphTransition;
}

@keyframes morphTransition {
    0% { border-radius: 50%; transform: scale(0); opacity: 0; }
    50% { border-radius: 4px; transform: scale(1); opacity: 1; }
    100% { border-radius: 0%; transform: scale(1.1); opacity: 0; }
}

/* Flip Transition */
.flip-preview {
    --transition-animation: flipTransition;
}

@keyframes flipTransition {
    0% { transform: rotateY(90deg); opacity: 0; }
    50% { transform: rotateY(0deg); opacity: 1; }
    100% { transform: rotateY(-90deg); opacity: 0; }
}

/* Cube Transition */
.cube-preview {
    --transition-animation: cubeTransition;
}

@keyframes cubeTransition {
    0% { transform: rotateX(90deg) rotateY(0deg); opacity: 0; }
    50% { transform: rotateX(0deg) rotateY(0deg); opacity: 1; }
    100% { transform: rotateX(-90deg) rotateY(0deg); opacity: 0; }
}

.transition-name {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}


@media (max-width: 768px) {
    .transition-preview {
        width: 50px;
        height: 35px;
    }
}

/* Batch Processing Styles */
.form-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.batch-btn {
    background: linear-gradient(135deg, #9f7aea 0%, #805ad5 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.batch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(159, 122, 234, 0.3);
}

.clear-all-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.clear-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.clear-all-btn:active {
    transform: translateY(0);
}

.batch-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.batch-section h3 {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    background: linear-gradient(135deg, #9f7aea 0%, #805ad5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.batch-section p {
    text-align: center;
    color: #718096;
    margin-bottom: 30px;
    font-size: 16px;
}

.batch-controls {
    margin-bottom: 30px;
}

.batch-jobs {
    margin-bottom: 25px;
    min-height: 100px;
    padding: 20px;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    background: #f7fafc;
}

.batch-job {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.batch-job:hover {
    border-color: #9f7aea;
    box-shadow: 0 4px 15px rgba(159, 122, 234, 0.1);
}

.batch-job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.batch-job-title {
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;
}

.batch-job-remove {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.batch-job-remove:hover {
    background: #c53030;
}

.batch-job-config {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.batch-config-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.batch-config-item label {
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
}

.batch-config-item select,
.batch-config-item input {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.batch-config-item select:focus,
.batch-config-item input:focus {
    outline: none;
    border-color: #9f7aea;
    box-shadow: 0 0 0 3px rgba(159, 122, 234, 0.1);
}

.batch-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.add-job-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-job-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

.start-batch-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-batch-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.start-batch-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.batch-progress {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    border: 2px solid #e2e8f0;
}

.batch-progress h4 {
    color: #2d3748;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.overall-progress {
    margin-bottom: 25px;
}

.progress-info {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    font-weight: 600;
    color: #4a5568;
}

.batch-job-statuses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.batch-job-status {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
}

.batch-job-status.processing {
    border-color: #667eea;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
}

.batch-job-status.completed {
    border-color: #48bb78;
    background: linear-gradient(135deg, #f0fff4 0%, #dcfce7 100%);
}

.batch-job-status.failed {
    border-color: #e53e3e;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.batch-job-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.batch-job-status-name {
    font-weight: 600;
    color: #2d3748;
}

.batch-job-status-indicator {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.batch-job-status-indicator.pending {
    background: #cbd5e0;
    color: #4a5568;
}

.batch-job-status-indicator.processing {
    background: #667eea;
    color: white;
}

.batch-job-status-indicator.completed {
    background: #48bb78;
    color: white;
}

.batch-job-status-indicator.failed {
    background: #e53e3e;
    color: white;
}

.batch-results {
    background: linear-gradient(135deg, #f0fff4 0%, #dcfce7 100%);
    border-radius: 16px;
    padding: 25px;
    border: 2px solid #48bb78;
}

.batch-results h4 {
    color: #2d3748;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.batch-summary {
    margin-bottom: 25px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #718096;
    font-weight: 600;
}

.batch-video-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.batch-video-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.batch-video-preview {
    width: 100%;
    height: 150px;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
}

.batch-video-info h5 {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.batch-video-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.batch-result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.download-all-btn {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.3);
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .batch-section {
        padding: 20px;
    }

    .batch-job-config {
        grid-template-columns: 1fr;
    }

    .batch-actions {
        flex-direction: column;
    }

    .summary-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .batch-video-list {
        grid-template-columns: 1fr;
    }

    .batch-result-actions {
        flex-direction: column;
    }
}

/* User Authentication Styles */
.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-logo h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.auth-buttons {
    display: flex;
    gap: 12px;
}

.auth-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.signup-btn {
    background: white;
    color: #667eea;
}

.signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.user-name {
    font-weight: 600;
}

.user-menu-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-dropdown {
    position: static;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    padding: 8px 0;
    display: none;
    z-index: 9999;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.user-dropdown.show .dropdown-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: #2d3748;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.dropdown-menu a:hover {
    background: #f7fafc;
    border-left-color: #667eea;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #2d3748;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.dropdown-item:hover {
    background: #f7fafc;
    border-left-color: #667eea;
}

.dropdown-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 0;
}

/* Profile and Settings Pages */
.main-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 0;
}

.profile-header, .settings-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    color: white;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.profile-header h1, .settings-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

/* Profile Content */
.profile-content, .settings-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.profile-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.profile-basic-info {
    text-align: left;
}

.profile-basic-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 5px 0;
}

.profile-basic-info p {
    font-size: 1.1rem;
    color: #4a5568;
    margin: 0 0 10px 0;
}

.profile-member-since {
    color: #718096;
    font-size: 0.9rem;
}

/* Profile Sections */
.profile-sections, .settings-sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.profile-section, .settings-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e2e8f0;
}

.profile-section h3, .settings-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

/* Form Styles */
.profile-form, .settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-1px);
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-item {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    color: #4a5568;
    font-weight: 500;
}

/* Checkbox Styles */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 500;
    color: #4a5568;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

/* Danger Zone Styles */
.danger-zone {
    border: 2px solid #fed7d7 !important;
    background: #fff5f5 !important;
}

.danger-zone h3 {
    color: #c53030 !important;
    border-bottom-color: #fed7d7 !important;
}

.danger-content {
    padding: 20px 0;
}

.danger-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.danger-text h4 {
    color: #c53030;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.danger-text p {
    color: #4a5568;
    line-height: 1.5;
}

.btn-danger {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 62, 62, 0.4);
}

/* Delete Account Modal */
.delete-account-content {
    padding: 20px 0;
}

.warning-message {
    background: #fff5f5;
    border: 2px solid #fed7d7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.warning-message p {
    color: #c53030;
    margin-bottom: 10px;
}

.warning-message ul {
    color: #4a5568;
    margin-left: 20px;
    margin-top: 10px;
}

.warning-message li {
    margin-bottom: 5px;
}

.delete-form .form-group {
    margin-bottom: 20px;
}

.delete-form label {
    font-weight: 600;
    color: #2d3748;
    display: block;
    margin-bottom: 8px;
}

.delete-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.delete-form input:focus {
    outline: none;
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-avatar-section {
        flex-direction: column;
        text-align: center;
    }

    .profile-basic-info {
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Email Verification Styles */
.verification-content {
    text-align: center;
    padding: 20px 0;
}

.verification-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.verification-message h4 {
    color: #2d3748;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.verification-message p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 10px;
}

.verification-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.verification-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
}

.verification-status.success {
    background: #f0fff4;
    border-color: #38a169;
    color: #38a169;
}

.verification-status.error {
    background: #fff5f5;
    border-color: #e53e3e;
    color: #e53e3e;
}

.unverified-banner {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-weight: 500;
    display: none;
    position: sticky;
    top: 0;
    z-index: 999;
}

.unverified-banner .banner-text {
    margin-right: 15px;
}

.unverified-banner .banner-action {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.unverified-banner .banner-action:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Authentication Modals */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    overflow-y: auto; /* Allow modal backdrop to scroll */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.auth-modal-content {
    background: white;
    border-radius: 16px;
    padding: 0;
    width: 90%;
    max-width: 400px;
    max-height: 90vh; /* Limit height to 90% of viewport */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
    display: flex;
    flex-direction: column; /* Enable flex layout for scrollable body */
    margin: auto; /* Center in scrollable area */
}

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

.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px 16px 0 0;
    color: white;
}

.auth-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.auth-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.auth-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Modal body - scrollable content */
.text-modal-body,
.auth-modal-body,
.auth-form {
    padding: 25px;
    overflow-y: auto; /* Make body scrollable */
    max-height: calc(90vh - 80px); /* Subtract header height */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.auth-form {
    padding: 25px;
}

.auth-input-group {
    margin-bottom: 20px;
}

.auth-input-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #2d3748;
}

.auth-input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.auth-input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-input-group input.error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.error-message {
    display: block;
    color: #e53e3e;
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.auth-link-btn {
    background: none;
    border: none;
    color: #667eea;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 8px;
}

.auth-link-btn:hover {
    color: #5a67d8;
}

/* User Dashboard */
.user-dashboard {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1500;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    overflow-y: auto;
}

.dashboard-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.dashboard-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.close-dashboard-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.close-dashboard-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.dashboard-tabs {
    display: flex;
    background: #f7fafc;
    border-bottom: 2px solid #e2e8f0;
}

.dashboard-tab {
    background: none;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-weight: 600;
    color: #718096;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.dashboard-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

.dashboard-tab:hover:not(.active) {
    background: #edf2f7;
    color: #4a5568;
}

.dashboard-content {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

.dashboard-tab-content {
    display: none;
}

.dashboard-tab-content.active {
    display: block;
}

.dashboard-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.dashboard-section-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
}

.video-filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

.videos-grid,
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Enhanced Video Cards */
.video-card-enhanced {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
}

.video-card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.video-thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card-enhanced:hover .video-overlay {
    opacity: 1;
}

.play-overlay-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 0;
}

.play-overlay-btn:hover {
    transform: scale(1.1);
}

/* Video Selection Checkbox */
.video-select-checkbox-wrapper {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.video-select-checkbox-wrapper:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.video-select-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
    margin: 0;
}

.video-select-checkbox:checked {
    accent-color: #764ba2;
}

.video-duration-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Segoe UI', system-ui, sans-serif;
    backdrop-filter: blur(8px);
}

.video-content {
    padding: 20px;
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.video-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    line-height: 1.4;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.video-menu-btn {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #718096;
    margin-left: 12px;
    flex-shrink: 0;
}

.video-menu-btn:hover {
    background: #fee;
    border-color: #fc8181;
    color: #e53e3e;
}

.video-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4a5568;
}

.meta-icon {
    color: #667eea;
    flex-shrink: 0;
}

.meta-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-actions-modern {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.action-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.action-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.action-btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.action-btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

/* Old video card styles for compatibility */
.video-card,
.template-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.video-card:hover,
.template-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.video-thumbnail,
.template-thumbnail {
    width: 100%;
    height: 120px;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-size: 24px;
}

.video-info h4,
.template-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.video-meta,
.template-meta {
    font-size: 14px;
    color: #718096;
    margin-bottom: 15px;
}

.video-actions,
.template-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.settings-form {
    max-width: 500px;
}

.settings-group {
    margin-bottom: 20px;
}

.settings-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #2d3748;
}

.settings-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.settings-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.settings-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.settings-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
}

.settings-section:last-child {
    border-bottom: none;
}

.preferences-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.preference-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.preference-info strong {
    display: block;
    color: #2d3748;
    margin-bottom: 4px;
}

.preference-info p {
    margin: 0;
    font-size: 14px;
    color: #718096;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #667eea;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.danger-btn {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.danger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(229, 62, 62, 0.3);
}

.danger-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.main-header {
    text-align: center;
    margin-bottom: 30px;
}

.main-header p {
    font-size: 20px;
    color: #2d3748;
    margin: 0;
    font-weight: 600;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .auth-buttons {
        width: 100%;
        justify-content: center;
    }

    .dashboard-content {
        max-height: 95vh;
        margin: 10px;
    }

    .dashboard-tabs {
        flex-direction: column;
    }

    .dashboard-section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .videos-grid,
    .templates-grid {
        grid-template-columns: 1fr;
    }

    .video-actions,
    .template-actions {
        justify-content: center;
    }

    .settings-actions {
        flex-direction: column;
    }

    .preference-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* Analytics Styles */
.analytics-overview {
    padding: 25px;
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.analytics-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 700;
}

.analytics-period select {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #2d3748;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.analytics-period select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Analytics Metrics */
.analytics-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.metric-card {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.metric-icon {
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    flex-shrink: 0;
}

.metric-content h4 {
    margin: 0 0 8px 0;
    color: #718096;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}

.metric-change {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.metric-change.positive {
    background: #f0fff4;
    color: #22c55e;
}

.metric-change.negative {
    background: #fef2f2;
    color: #ef4444;
}

.metric-change.neutral {
    background: #f8fafc;
    color: #64748b;
}

/* Analytics Charts */
.analytics-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.chart-container {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.chart-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.chart-header h4 {
    margin: 0 0 5px 0;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
}

.chart-info {
    color: #718096;
    font-size: 14px;
}

.chart-content {
    position: relative;
}

#creationTimelineChart {
    width: 100%;
    height: 200px;
    background: #f8fafc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-size: 14px;
}

.settings-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-stat h5 {
    margin: 0 0 10px 0;
    color: #4a5568;
    font-size: 14px;
    font-weight: 600;
}

.stat-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.stat-bar-label {
    min-width: 80px;
    font-size: 12px;
    color: #718096;
    font-weight: 500;
}

.stat-bar-visual {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.stat-bar-value {
    min-width: 35px;
    text-align: right;
    font-size: 12px;
    color: #4a5568;
    font-weight: 600;
}

/* Analytics Insights */
.analytics-insights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.insight-container,
.activity-container {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.insight-header,
.activity-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.insight-header h4,
.activity-header h4 {
    margin: 0 0 5px 0;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
}

.insight-info,
.activity-info {
    color: #718096;
    font-size: 14px;
}

.insights-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.insight-item {
    padding: 15px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #0ea5e9;
    border-radius: 12px;
    position: relative;
}

.insight-item::before {
    content: '💡';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 16px;
}

.insight-title {
    font-weight: 600;
    color: #0369a1;
    margin-bottom: 5px;
    font-size: 14px;
}

.insight-description {
    color: #0284c7;
    font-size: 13px;
    line-height: 1.4;
}

.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.activity-icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 2px;
}

.activity-time {
    font-size: 12px;
    color: #718096;
}

/* Analytics Export */
.analytics-export {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
}

.export-header {
    margin-bottom: 20px;
}

.export-header h4 {
    margin: 0 0 5px 0;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
}

.export-info {
    color: #718096;
    font-size: 14px;
}

.export-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Responsive Analytics */
@media (max-width: 1024px) {
    .analytics-charts,
    .analytics-insights {
        grid-template-columns: 1fr;
    }

    .analytics-metrics {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .analytics-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .analytics-metrics {
        grid-template-columns: 1fr;
    }

    .metric-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .export-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .analytics-overview {
        padding: 15px;
    }
}

/* Payment Styles */
.payment-info {
    margin-top: 10px;
    padding: 10px;
    background: #f0f8ff;
    border: 1px solid #007acc;
    border-radius: 5px;
}

.payment-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #007acc;
}

.payment-icon {
    font-size: 1.2rem;
}

.payment-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.payment-summary h3 {
    margin-bottom: 15px;
    color: #2d3748;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.summary-item:last-child {
    border-bottom: none;
    font-weight: bold;
    font-size: 1.1rem;
}

.payment-form {
    margin: 20px 0;
}

#card-element {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    margin-bottom: 10px;
}

#card-errors {
    color: #e53e3e;
    font-size: 0.9rem;
    margin-top: 5px;
}

.payment-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.payment-actions .btn {
    min-width: 120px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Authentication Notice Styles */
.auth-requirement {
    margin-bottom: 20px;
}

.auth-notice {
    background: linear-gradient(135deg, #fef5e7 0%, #f6ad55 20%, #fef5e7 100%);
    border: 2px solid #ed8936;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.2);
}

.auth-icon {
    font-size: 1.5rem;
    color: #c05621;
}

.auth-notice span:not(.auth-icon) {
    flex: 1;
    font-weight: 500;
    color: #744210;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
    min-width: auto;
}

/* Upload section adjustments for authenticated users */
.upload-section.authenticated {
    border-top: 3px solid #48bb78;
}

.upload-section.authenticated .section-header {
    background: linear-gradient(135deg, #f0fff4 0%, #48bb78 20%, #f0fff4 100%);
}

/* Enhanced Authentication Notice Styles */
.auth-notice {
    background: linear-gradient(135deg, #fef5e7 0%, #f6ad55 20%, #fef5e7 100%);
    border: 2px solid #ed8936;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 6px 20px rgba(237, 137, 54, 0.25);
    margin-bottom: 20px;
}

.auth-icon {
    font-size: 2rem;
    color: #c05621;
    flex-shrink: 0;
}

.auth-text {
    flex: 1;
    color: #744210;
}

.auth-text strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #c05621;
}

.auth-text p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.auth-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Blocked upload section styles */
.upload-section.blocked {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.upload-section.blocked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    z-index: 1;
}

.upload-section.blocked .file-input-label {
    cursor: not-allowed !important;
    opacity: 0.5;
}

.upload-section.blocked button {
    cursor: not-allowed !important;
    opacity: 0.5;
}

/* Login prompt popup */
.login-prompt-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.popup-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.popup-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.popup-content h3 {
    margin: 0 0 10px 0;
    color: #2d3748;
    font-size: 1.1rem;
}

.popup-content p {
    margin: 0 0 20px 0;
    color: #4a5568;
    line-height: 1.5;
}

.popup-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .auth-notice {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .auth-actions {
        justify-content: center;
    }

    .popup-content {
        margin: 20px;
        padding: 25px 20px;
    }

    .popup-actions {
        flex-direction: column;
    }

    .popup-actions .btn {
        width: 100%;
    }
}

/* Subscription Modal Styles */
.subscription-modal {
    max-width: 900px !important;
    width: 95% !important;
}

.subscription-content {
    padding: 30px;
}

.subscription-intro {
    text-align: center;
    font-size: 1.1rem;
    color: #4a5568;
    margin-bottom: 30px;
}

.subscription-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.subscription-plan {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.subscription-plan:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.subscription-plan.current-plan {
    border-color: #48bb78;
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
}

.subscription-plan.unlimited-plan {
    border-color: #667eea;
}

.plan-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #48bb78;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.plan-badge.popular {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.subscription-plan h4 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 15px;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.plan-duration {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 20px;
}

.price-period {
    font-size: 1.2rem;
    color: #718096;
    font-weight: 400;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.plan-features li {
    padding: 10px 0;
    color: #4a5568;
    font-size: 0.95rem;
}

.plan-status {
    font-size: 0.9rem;
    color: #48bb78;
    font-weight: 600;
    margin-top: 15px;
}

.select-plan-btn {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.select-plan-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.select-plan-btn.popular-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.select-plan-btn.popular-btn:hover {
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
}

.subscription-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.subscription-footer .btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    padding: 10px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.subscription-footer .btn-secondary:hover {
    background: #cbd5e0;
}

/* Subscription Info Card in Settings */
.subscription-info-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    border: 1px solid #e2e8f0;
}

.subscription-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.subscription-details > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.subscription-details strong {
    color: #2d3748;
    font-size: 0.9rem;
    font-weight: 600;
}

.subscription-details span {
    color: #4a5568;
    font-size: 1.1rem;
}

.subscription-actions {
    display: flex;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .subscription-plans {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .subscription-modal {
        width: 95% !important;
        max-width: 100%;
        max-height: 85vh;
        overflow-y: auto;
        margin: 20px auto;
    }

    .subscription-content {
        padding: 15px;
    }

    .subscription-intro {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .subscription-plan {
        padding: 20px 15px;
    }

    .subscription-plan h4 {
        font-size: 1.25rem;
        margin-bottom: 10px;
    }

    .plan-price {
        font-size: 2rem;
    }

    .price-period {
        font-size: 0.9rem;
    }

    .plan-features {
        font-size: 0.9rem;
        margin: 15px 0;
    }

    .plan-features li {
        padding: 6px 0;
    }

    .select-plan-btn,
    .popular-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
    }

    .plan-status {
        font-size: 0.85rem;
    }

    .subscription-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .subscription-actions {
        flex-direction: column;
    }

    .subscription-actions button {
        width: 100%;
    }

    .subscription-footer {
        margin-top: 20px;
    }

    .subscription-footer button {
        width: 100%;
        padding: 12px;
        font-size: 0.95rem;
    }

    .auth-modal-header h3 {
        font-size: 1.25rem;
    }
}

/* PWA Install Button */
.pwa-install-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
    animation: bounceIn 0.5s ease;
}

.pwa-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.pwa-install-btn:active {
    transform: translateY(0);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .pwa-install-btn {
        bottom: 15px;
        right: 15px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
