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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
    font-size: 2.5em;
}

h2 {
    color: #764ba2;
    margin-bottom: 15px;
    font-size: 1.5em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.section {
    margin-bottom: 40px;
}

/* Upload Section */
.upload-area {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

#fileInput {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

button:active {
    transform: translateY(0);
}

.delete-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 8px 15px;
    font-size: 0.9em;
}

.refresh-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    margin-top: 10px;
}

#uploadStatus, #playerStatus {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* File Selection */
.file-selection {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.file-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.file-group label {
    font-weight: bold;
    min-width: 150px;
    color: #555;
}

.file-group select {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    background: white;
    cursor: pointer;
}

.file-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* Mapping Section */
.mapping-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.save-btn {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    align-self: flex-start;
}

#mappingStatus {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    display: none;
}

.mappings-list {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.mappings-list h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.mapping-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.mapping-item:hover {
    transform: translateX(5px);
}

.mapping-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    flex-wrap: wrap;
}

.mapping-info .arrow {
    color: #667eea;
    font-size: 1.5em;
    font-weight: bold;
}

.remove-mapping-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.remove-mapping-btn:hover {
    background: #c82333;
    transform: rotate(90deg);
}

/* Video Player */
.player-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#videoPlayer {
    width: 100%;
    max-height: 600px;
    background: #000;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.3em;
    }

    .file-group {
        flex-direction: column;
        align-items: stretch;
    }

    .file-group label {
        min-width: auto;
    }

    button {
        width: 100%;
    }
}
