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

:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --text-color: #333;
    --light-text: #6c757d;
    --bg-color: #f8f9fa;
    --card-bg: #fff;
    --border-color: #e9ecef;
    --success-color: #4cc9f0;
    --error-color: #f72585;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf5 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 900px;
    width: 100%;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.input-container {
    display: flex;
    margin-bottom: 30px;
    position: relative;
}

#flvUrl {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 50px 0 0 50px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

#flvUrl:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

#loadBtn {
    padding: 15px 30px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    outline: none;
    position: relative;
    overflow: hidden;
}

#loadBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

#loadBtn:active {
    transform: translateY(0);
}

#loadBtn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

#loadBtn:hover:before {
    left: 100%;
}

.video-container {
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    position: relative;
}

#videoElement {
    width: 100%;
    height: auto;
    min-height: 500px;
    display: block;
}

.status-container {
    text-align: center;
    padding: 15px;
    background-color: var(--bg-color);
    border-radius: 8px;
    margin-top: 20px;
    transition: all 0.3s ease;
}

#status {
    color: var(--light-text);
    font-size: 16px;
    transition: color 0.3s ease;
}

.status-success {
    color: var(--success-color) !important;
}

.status-error {
    color: var(--error-color) !important;
}

.status-loading {
    color: var(--primary-color) !important;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(67, 97, 238, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

/* Custom video controls */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .video-controls {
    opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin-top: 20px;
    }

    h1 {
        font-size: 1.8rem;
    }

    #videoElement {
        min-height: 350px;
    }
}

@media (max-width: 576px) {
    .input-container {
        flex-direction: column;
    }

    #flvUrl,
    #loadBtn {
        width: 100%;
        border-radius: 50px;
        margin-bottom: 15px;
    }

    #videoElement {
        min-height: 250px;
    }
}