:root {
    --primary-color: #4a6cf7;
    --secondary-color: #6c757d;
    --background-color: #f8f9fa;
    --text-color: #333;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --error-color: #dc3545;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Top Header */
.top-header {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 998;
    width: 100%;
}

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

.top-header .logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 0;
}

.platform-nav {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

.platform-nav a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.platform-nav a:hover {
    color: var(--primary-color);
}

.platform-nav a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin: 40px 0;
}

.hero-section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-section .subtitle {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-weight: 400;
}

/* Password Modal */
.password-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.password-container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    width: 350px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.password-container h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.password-container input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
}

.password-container button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.password-container button:hover {
    background-color: #3a5bd9;
}

.error-message {
    color: var(--error-color);
    margin-top: 10px;
    font-size: 14px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    display: none; /* Hide old header */
}

.logo h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.logo p {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

/* Main Content */
main {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow-color);
    overflow: hidden;
}

.input-section {
    padding: 30px;
    border-bottom: 1px solid var(--border-color);
}

textarea {
    width: 100%;
    height: 100px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    resize: none;
    font-size: 16px;
    margin-bottom: 20px;
}

.button-group {
    display: flex;
    gap: 15px;
}

#clearButton {
    background-color: #dc3545;
    color: white;
}

#clearButton:hover {
    background-color: #c82333;
}

button {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#pasteButton {
    background-color: var(--secondary-color);
    color: white;
}

#pasteButton:hover {
    background-color: #5a6268;
}

#startButton {
    background-color: var(--primary-color);
    color: white;
    flex-grow: 1;
}

#startButton:hover {
    background-color: #3a5bd9;
}

/* Result Section */
.result-section {
    padding: 30px;
    display: none;
}

.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--primary-color);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.result-content {
    display: none;
}

#videoTitle {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--text-color);
    text-align: center;
}

.media-preview {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.preview-container {
    flex: 1;
    min-width: 300px;
}

.preview-container h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.video-container, .image-container {
    width: 100%;
    background-color: #f1f1f1;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.video-container video, .image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.download-button {
    width: 100%;
    background-color: var(--success-color);
    color: white;
    padding: 12px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.download-button:hover {
    background-color: #218838;
}

.error-container {
    display: none;
    text-align: center;
    padding: 30px;
}

#errorMessage {
    color: var(--error-color);
    font-size: 18px;
}

/* How to Use Section */
.how-to-use {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow-color);
    padding: 40px;
    margin: 40px auto;
    max-width: 1200px;
}

.how-to-use h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

.instructions p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 20px;
}

/* Steps Section */
.steps {
    margin: 30px 0;
}

.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 10px;
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
}

.step-number {
    background-color: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 20px;
    flex-shrink: 0;
}

.step-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.step-content p {
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
}

/* Features Section */
.features {
    margin-top: 40px;
}

.features h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 25px;
    text-align: center;
}

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

.feature-item {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

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

.feature-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-item h4 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.feature-item p {
    color: var(--secondary-color);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* FAQ Section */
.faq-section {
    margin-top: 40px;
}

.faq-section h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.faq-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 3px solid var(--primary-color);
}

.faq-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.faq-item p {
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
}

.supported-platforms {
    margin-top: 30px;
}

.supported-platforms h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-align: center;
}

.platform-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.platform-tag {
    background-color: #f8f9fa;
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.platform-tag:last-child {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 50px 0 30px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-section h3 {
    color: #ecf0f1;
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

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

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #34495e;
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
    color: #bdc3c7;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .top-header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .platform-nav {
        justify-content: center;
        gap: 10px;
    }
    
    .platform-nav a {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
    
    .hero-section h2 {
        font-size: 2rem;
    }
    
    .hero-section .subtitle {
        font-size: 1.1rem;
    }
    
    .media-preview {
        flex-direction: column;
        gap: 20px;
    }
    
    .preview-container {
        min-width: 100%;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    #pasteButton, #clearButton, #startButton {
        width: 100%;
    }
    
    .how-to-use {
        padding: 25px;
    }
    
    .platform-grid {
        gap: 8px;
    }
    
    .platform-tag {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}