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

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-white: #f8fafc;
    --border-color: #e2e8f0;
    --danger: #ef4444;
    --success: #10b981;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 2rem;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }
}

/* Landing Page */
.landing-page {
    min-height: 100vh;
    display: block;
    position: relative;
    overflow-x: hidden;
    width: 100%;
}

.landing-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.landing-header:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.landing-header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.landing-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-login-link {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-login-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-login-link:hover::before {
    width: 300px;
    height: 300px;
}

.btn-login-link:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4);
}

.landing-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

/* Background decorations */
.landing-bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
    filter: blur(60px);
    animation: float 20s ease-in-out infinite;
}

.bg-circle-1 {
    width: 500px;
    height: 500px;
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.bg-circle-2 {
    width: 400px;
    height: 400px;
    bottom: -150px;
    left: -150px;
    animation-delay: 5s;
}

.bg-circle-3 {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.landing-hero {
    text-align: center;
    margin-bottom: 6rem;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    color: var(--text-white);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.badge-icon {
    font-size: 1.125rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.landing-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
    animation: fadeInUp 0.8s ease-out 0.3s both;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.title-highlight {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.landing-subtitle {
    font-size: 1.25rem;
    color: rgba(248, 250, 252, 0.85);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(248, 250, 252, 0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.landing-features {
    margin-bottom: 6rem;
    position: relative;
    z-index: 1;
}

.features-header {
    text-align: center;
    margin-bottom: 4rem;
}

.features-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.features-subtitle {
    font-size: 1.125rem;
    color: rgba(248, 250, 252, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    animation: fadeInUp 0.6s ease-out both;
}

.feature-card-1 {
    animation-delay: 0.1s;
}

.feature-card-2 {
    animation-delay: 0.2s;
}

.feature-card-3 {
    animation-delay: 0.3s;
}

.feature-card-4 {
    animation-delay: 0.4s;
}

.feature-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, #6366f1 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-color: var(--primary);
}

.feature-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.feature-icon {
    font-size: 3.5rem;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-icon-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon-bg {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%);
}

.feature-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    opacity: 0.05;
    transition: height 0.4s ease;
}

.feature-card:hover .feature-highlight {
    height: 100%;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
    position: relative;
    z-index: 2;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1rem;
    position: relative;
    z-index: 2;
}

.landing-cta {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.98) 100%);
    padding: 5rem 3rem;
    border-radius: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.5);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.cta-decoration {
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    animation: pulse 4s ease-in-out infinite;
}

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

.cta-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.landing-cta h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-cta p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary-cta {
    padding: 1.125rem 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 0.875rem;
    font-size: 1.0625rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.btn-primary-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary-cta:hover::before {
    width: 400px;
    height: 400px;
}

.btn-primary-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(79, 70, 229, 0.4);
}

.btn-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.btn-primary-cta:hover .btn-icon {
    transform: scale(1.2) rotate(10deg);
}

.btn-secondary-cta {
    padding: 1.125rem 2.5rem;
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 0.875rem;
    font-size: 1.0625rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.btn-secondary-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: left 0.3s ease;
    z-index: 0;
}

.btn-secondary-cta:hover::before {
    left: 0;
}

.btn-secondary-cta span {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.btn-secondary-cta:hover span {
    color: white;
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.btn-secondary-cta:hover .btn-arrow {
    transform: translateX(5px);
}

.back-to-landing a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Login Screen */
.login-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-box {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 440px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
}

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

.login-box h2 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 2.25rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.025em;
}

.login-box .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.2s;
    background: #f8fafc;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

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

.error-message {
    color: var(--danger);
    margin-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    min-height: 1.25rem;
}

.register-link {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
}

.register-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Header */
header {
    background: white;
    color: var(--text-main);
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1.5rem;
}

header h1 {
    font-size: 1.875rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-info span {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: #f1f5f9;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* Content */
.content {
    padding: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    color: var(--text-main);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.loading {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Videos Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.video-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.video-header {
    margin-bottom: 1rem;
    width: 100%;
}

.video-title-section {
    width: 100%;
}

.video-title {
    color: var(--text-main);
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 0.75rem;
    letter-spacing: -0.01em;
}

.btn-delete,
.btn-password {
    background: #fee2e2;
    color: var(--danger);
    border: none;
    border-radius: 0.375rem;
    padding: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-delete:hover {
    background: var(--danger);
    color: white;
}

.btn-password {
    background: #dbeafe;
    color: var(--primary);
}

.btn-password:hover {
    background: var(--primary);
    color: white;
}

.video-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.btn-edit {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    padding: 0.375rem;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-edit:hover {
    background: #fbbf24;
    color: #78350f;
    transform: scale(1.05);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.video-info {
    margin-bottom: 1.5rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.75rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    color: var(--text-main);
    font-weight: 600;
}

.share-link-section {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--border-color);
}

.share-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.share-link-container {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    min-width: 0; /* Allow flex items to shrink below their content size */
}

.share-link-input {
    flex: 1;
    min-width: 0; /* Allow input to shrink */
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: #f1f5f9;
    color: var(--text-main);
    cursor: text;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-link-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-play {
    padding: 0.625rem 1rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0; /* Prevent button from shrinking */
}

.btn-play:hover {
    background: #059669;
}

.btn-copy {
    padding: 0.625rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0; /* Prevent button from shrinking */
}

.btn-copy:hover {
    background: var(--primary-hover);
}

.btn-qr {
    padding: 0.625rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.btn-qr:hover {
    background: var(--primary-hover);
}

.no-share-link {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-style: italic;
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--border-color);
    text-align: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 6rem 2rem;
    color: var(--text-muted);
    background: #f8fafc;
    border-radius: 1.5rem;
    border: 2px dashed var(--border-color);
}

.empty-state p {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.empty-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Responsive */
/* Mobile Responsive Styles */
@media (max-width: 768px) {

    .container {
        border-radius: 0;
        margin: 0;
    }

    header {
        padding: 1.25rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .user-info {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .user-info span {
        text-align: center;
    }

    .content {
        padding: 1.5rem 1rem;
    }

    .videos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .share-link-container {
        flex-direction: column;
    }
    
    .btn-play,
    .btn-copy,
    .btn-qr {
        width: 100%;
    }
    
    /* Landing Page Mobile Styles */
    .landing-header {
        padding: 1rem;
        position: relative;
        width: 100%;
        box-sizing: border-box;
    }
    
    .landing-header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .landing-logo {
        font-size: 1.125rem;
        text-align: left;
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .btn-login-link {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        white-space: nowrap;
        flex-shrink: 0;
        min-height: 44px; /* Better touch target */
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .landing-content {
        padding: 1.5rem 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .landing-hero {
        margin-bottom: 3rem;
    }

    .hero-badge {
        padding: 0.625rem 1rem;
        font-size: 0.75rem;
        margin-bottom: 1.5rem;
        display: inline-flex;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
        box-sizing: border-box;
    }

    .badge-icon {
        font-size: 1rem;
    }
    
    .landing-title {
        font-size: 1.75rem;
        line-height: 1.3;
        margin-bottom: 1rem;
        padding: 0 0.5rem;
    }
    
    .title-highlight {
        display: inline;
    }
    
    .landing-subtitle {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 2rem;
        padding: 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .hero-stats {
        flex-direction: row;
        justify-content: space-around;
        gap: 1rem;
        margin-top: 2rem;
        flex-wrap: wrap;
    }
    
    .stat-item {
        flex: 1;
        min-width: 80px;
    }
    
    .stat-number {
        font-size: 1.75rem;
        margin-bottom: 0.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }

    .features-header {
        margin-bottom: 2.5rem;
        padding: 0 0.5rem;
    }
    
    .features-title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .features-subtitle {
        font-size: 1rem;
    }
    
    .landing-features {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        margin-bottom: 3rem;
    }

    .feature-card {
        padding: 2rem 1.5rem;
        border-radius: 1.25rem;
    }

    .feature-icon-wrapper {
        margin-bottom: 1.25rem;
    }

    .feature-icon {
        font-size: 2.5rem;
    }

    .feature-icon-bg {
        width: 70px;
        height: 70px;
    }

    .feature-card:hover .feature-icon-bg {
        width: 80px;
        height: 80px;
    }

    .feature-card h3 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .feature-card p {
        font-size: 0.9375rem;
        line-height: 1.6;
    }
    
    .landing-cta {
        padding: 2.5rem 1.5rem;
        border-radius: 1.25rem;
        margin: 0;
    }

    .cta-content {
        position: relative;
        z-index: 1;
    }
    
    .cta-icon {
        font-size: 2.5rem;
        margin-bottom: 1.25rem;
    }
    
    .landing-cta h3 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .landing-cta p {
        font-size: 1rem;
        margin-bottom: 2rem;
        line-height: 1.6;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-primary-cta,
    .btn-secondary-cta {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 48px; /* Better touch target */
    }

    .btn-icon {
        font-size: 1.125rem;
    }
    
    .bg-circle {
        display: none;
    }

    .login-box {
        padding: 2rem 1.5rem;
        margin: 1rem;
        max-width: calc(100% - 2rem);
        border-radius: 1.25rem;
        width: calc(100% - 2rem);
        box-sizing: border-box;
    }

    /* Prevent text selection issues on mobile */
    .btn-primary-cta,
    .btn-secondary-cta,
    .btn-login-link {
        -webkit-tap-highlight-color: rgba(79, 70, 229, 0.2);
        touch-action: manipulation;
    }

    /* Improve scrolling on mobile */
    .landing-page {
        -webkit-overflow-scrolling: touch;
    }

    /* Fix iOS Safari viewport issues */
    @supports (-webkit-touch-callout: none) {
        .landing-page {
            min-height: -webkit-fill-available;
        }

        body {
            min-height: -webkit-fill-available;
        }
    }

    .login-box h2 {
        font-size: 1.75rem;
    }

    .login-box .subtitle {
        font-size: 0.9375rem;
        margin-bottom: 2rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .landing-content {
        padding: 1.25rem 0.75rem;
    }

    .landing-header {
        padding: 0.875rem;
    }

    .landing-logo {
        font-size: 1rem;
    }

    .btn-login-link {
        padding: 0.5625rem 0.875rem;
        font-size: 0.8125rem;
    }

    .landing-title {
        font-size: 1.5rem;
        margin-bottom: 0.875rem;
    }

    .landing-subtitle {
        font-size: 0.9375rem;
        margin-bottom: 1.75rem;
    }

    .hero-badge {
        font-size: 0.6875rem;
        padding: 0.5625rem 0.875rem;
    }

    .hero-stats {
        flex-direction: row;
        gap: 0.75rem;
        margin-top: 1.5rem;
    }

    .stat-item {
        flex: 1;
        min-width: 0;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.6875rem;
    }

    .features-title {
        font-size: 1.5rem;
    }

    .features-subtitle {
        font-size: 0.9375rem;
    }

    .landing-features {
        gap: 1rem;
        margin-bottom: 2.5rem;
    }

    .feature-card {
        padding: 1.75rem 1.25rem;
    }

    .feature-icon {
        font-size: 2.25rem;
    }

    .feature-icon-bg {
        width: 60px;
        height: 60px;
    }

    .feature-card h3 {
        font-size: 1.125rem;
    }

    .feature-card p {
        font-size: 0.875rem;
    }

    .landing-cta {
        padding: 2rem 1.25rem;
    }

    .cta-icon {
        font-size: 2.25rem;
        margin-bottom: 1rem;
    }

    .landing-cta h3 {
        font-size: 1.375rem;
        margin-bottom: 0.625rem;
    }

    .landing-cta p {
        font-size: 0.9375rem;
        margin-bottom: 1.75rem;
    }

    .btn-primary-cta,
    .btn-secondary-cta {
        padding: 0.9375rem 1.25rem;
        font-size: 0.9375rem;
    }

    .login-box {
        padding: 1.75rem 1.25rem;
        margin: 0.75rem;
        max-width: calc(100% - 1.5rem);
    }

    .login-box h2 {
        font-size: 1.5rem;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    padding: 2rem;
    overflow-y: auto;
}

.modal-content {
    background: white;
    margin: 2rem auto;
    padding: 2.5rem;
    border-radius: 1.5rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

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

.modal-content h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.modal-content p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.modal-warning {
    color: var(--danger);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.modal-actions button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-main);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

@media (max-width: 768px) {
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem auto;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
    }
}
