/* Base styles */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.8;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header */
header {
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    text-align: left;
    margin-bottom: 60px;
    padding: 80px 0;
}

.logo {
    color: #007bff;
    font-size: 180px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    font-family: Arial, sans-serif;
}

.logo a {
    color: #007bff;
    text-decoration: none;
    letter-spacing: 0;
    font-weight: 800;
}

nav .logo {
    font-size: 64px;
    margin-left: 20px;
    letter-spacing: 0;
}

.subtitle {
    font-size: 42px;
    color: #ffffff;
    margin: 40px 0 0 8px;
    font-weight: 300;
    font-family: 'Segoe UI', Arial, sans-serif;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

header h1 {
    font-size: 36px;
    color: #fff;
    margin: 0 0 10px 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1516329771765-0d29fcb5b7ce?auto=format&fit=crop&w=1920&q=80') center/cover;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    padding: 80px 2rem 2rem;
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    padding-right: 2rem;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Upload Section */
.upload-section {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-box {
    background: rgba(0, 0, 0, 0.4);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.upload-box::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    pointer-events: none;
}

.upload-box:hover {
    background: rgba(0, 0, 0, 0.5);
}

.upload-box:hover::after {
    border-color: rgba(255, 255, 255, 0.2);
}

.upload-box i {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.upload-box p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin: 0;
}

.or-divider {
    width: 100%;
    margin: 20px 0;
    position: relative;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 600px;
}

.or-divider::before,
.or-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 2px;
    border-top: 2px dashed rgba(255, 255, 255, 0.2);
    background: none;
}

.or-divider::before {
    left: 0;
}

.or-divider::after {
    right: 0;
}

.or-divider span {
    background: #1a1a1a;
    color: rgba(255, 255, 255, 0.6);
    padding: 0 15px;
    font-size: 14px;
    text-transform: uppercase;
    z-index: 1;
}

.url-input {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
    justify-content: center;
}

.url-input input {
    flex: 1;
    max-width: 500px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 12px 15px;
    color: #fff;
    font-size: 16px;
}

.url-input input:focus {
    outline: none;
    border-color: #007bff;
}

.url-input button {
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.url-input button:hover {
    background: #0056b3;
}

/* FAQ Section */
.faq-section {
    max-width: 800px;
    margin: 20px auto 60px;
    padding: 0 20px;
}

.faq-title {
    color: #007bff;
    font-size: 42px;
    text-align: center;
    margin: 0 0 40px 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.faq-item {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s, background 0.2s;
}

.faq-item:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

.faq-item h2 {
    color: #007bff;
    font-size: 20px;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.faq-item p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

/* Features Section */
.features-section {
    padding: 3rem 0;
    background: rgba(0, 0, 0, 0.3);
}

.features-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #fff;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Supported Formats */
.supported-formats {
    padding: 3rem 0;
    background: rgba(0, 0, 0, 0.2);
}

.supported-formats h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.format-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.format-item i {
    font-size: 2rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.format-item h4 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.format-item p {
    color: rgba(255, 255, 255, 0.8);
}

/* Common Questions */
.common-questions {
    background: rgba(0, 0, 0, 0.3);
    padding: 3rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.question-item {
    margin-bottom: 2.5rem;
}

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

.question-item h3 {
    color: #007bff;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
}

.question-item p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-text {
        padding-right: 0;
    }

    .hero h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 100px 1.5rem 2rem;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .common-questions {
        padding: 2rem;
    }

    .question-item {
        margin-bottom: 2rem;
    }

    .question-item h3 {
        font-size: 1.2rem;
    }

    .question-item p {
        font-size: 1rem;
    }
}

/* Player page styles */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --background-color: #151b26;
    --text-color: #ffffff;
    --border-radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: var(--text-color);
    min-height: 100vh;
}

header {
    background-color: transparent;
    padding: 1rem 2rem;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.logo a {
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 1px;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
}

.home-page {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    min-height: 100vh;
    color: #fff;
}

.upload-container {
    max-width: 600px;
    margin: 100px auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.input-section {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
}

.input-section input[type="text"] {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 16px;
}

.primary-button {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    background: #007bff;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.primary-button:hover {
    background: #0056b3;
}

.divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background: #1a1a1a;
    padding: 0 1rem;
    color: rgba(255, 255, 255, 0.6);
}

.upload-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.upload-button i {
    font-size: 24px;
}

/* Instructions section */
.instructions-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 2rem;
    color: #fff;
}

.how-to-use {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.how-to-use h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #fff;
    text-align: center;
}

.steps {
    display: grid;
    gap: 2rem;
}

.step {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.step h3 {
    color: #007bff;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.step p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.step .example {
    color: #6c757d;
    font-style: italic;
}

.step .or {
    color: #6c757d;
    margin: 1rem 0;
    font-weight: bold;
}

/* Features section */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
}

.feature-card i {
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 1rem;
}

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

.feature-card p {
    color: #adb5bd;
    line-height: 1.6;
}

/* FAQ section */
.faq {
    margin: 3rem 0;
}

.faq h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.faq-list {
    display: grid;
    gap: 1.5rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
}

.faq-item h3 {
    color: #007bff;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.faq-item p {
    color: #adb5bd;
    line-height: 1.6;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 2rem 0;
    background: rgba(0, 0, 0, 0.3);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-copyright {
    color: #6c757d;
}

/* Responsive design */
@media (min-width: 768px) {
    .steps {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (max-width: 767px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

/* Player page styles */
.player-page {
    background-color: var(--background-color);
}

.player-page .logo a {
    color: white;
}

.player-page main {
    padding: 0;
    max-width: none;
    height: 100vh;
    position: relative;
}

.help-tooltip {
    background-color: white;
    color: #333;
    padding: 1rem;
    border-radius: var(--border-radius);
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 100;
}

.help-tooltip i {
    color: var(--primary-color);
}

.close-tooltip {
    padding: 0.25rem;
    background: none;
    color: #666;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}

.close-tooltip:hover {
    color: #333;
}

.video-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    background: black;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 2rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.controls-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    gap: 20px;
}

.left-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.center-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.loop-marker {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px;
    border-radius: 4px;
}

.marker-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 4px;
    min-width: 70px;
}

.marker-label {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.marker-time {
    color: #fff;
    font-size: 14px;
    font-family: monospace;
    opacity: 0.8;
}

.marker-adjust {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 12px;
}

.marker-adjust:hover {
    background: rgba(255, 255, 255, 0.2);
}

.marker-adjust:active {
    background: rgba(255, 255, 255, 0.3);
}

.marker-adjust i {
    opacity: 0.8;
}

.marker-adjust:hover i {
    opacity: 1;
}

.timeline {
    position: relative;
    padding: 0 10px;
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    overflow: visible;
}

.progress {
    position: absolute;
    height: 100%;
    background: #007bff;
    border-radius: 2px;
    transition: width 0.1s ease;
}

.progress-handle {
    position: absolute;
    top: 50%;
    left: 0;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
    border: 2px solid #007bff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.progress-bar:hover .progress-handle {
    transform: translate(-50%, -50%) scale(1.2);
}

.progress-handle:active {
    transform: translate(-50%, -50%) scale(1.3);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-control input[type="range"] {
    width: 80px;
}

.time-display {
    color: #fff;
    font-size: 14px;
    font-family: monospace;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 90px;
    display: inline-block;
    text-align: center;
}

#currentTime, #duration {
    font-weight: normal;
}

button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

button:hover {
    opacity: 1;
}

button.active {
    color: #007bff;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 4px;
    border-radius: 4px;
}

.error-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.error-content {
    background: #333;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
}

.error-content h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-weight: normal;
}

.error-content p {
    color: #fff;
    margin-bottom: 1.5rem;
}

.error-ok {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 2rem;
    border-radius: var(--border-radius);
    float: right;
    cursor: pointer;
}

.error-ok:hover {
    background: #357abd;
}

#player {
    width: 100%;
    height: 100%;
    position: relative;
}

#videoPlayer, #youtubePlayer {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: black;
}

/* Loop controls */
.loop-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 0 10px;
}

.loop-marker {
    display: flex;
    align-items: center;
    gap: 8px;
}

.marker-button {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}

.marker-button:hover {
    background: rgba(0, 0, 0, 0.7);
}

.marker-button i {
    font-size: 12px;
    opacity: 0.7;
    cursor: pointer;
}

.marker-button i:hover {
    opacity: 1;
}

.marker-time {
    font-size: 14px;
    color: #fff;
    opacity: 0.8;
    font-family: monospace;
}

/* Progress bar */
.timeline {
    position: relative;
    padding: 0 10px;
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    overflow: visible;
}

.progress {
    position: absolute;
    height: 100%;
    background: #007bff;
    border-radius: 2px;
    transition: width 0.1s ease;
}

.progress-handle {
    position: absolute;
    top: 50%;
    left: 0;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
    border: 2px solid #007bff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.progress-bar:hover .progress-handle {
    transform: translate(-50%, -50%) scale(1.2);
}

.progress-handle:active {
    transform: translate(-50%, -50%) scale(1.3);
}
