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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #eeeeee;
    color: #333333;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: none;
    color: #333;
}

header h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 25px;
    color: #555;
}

header p {
    font-size: 1rem;
    opacity: 1;
    font-weight: 400;
    color: #555;
}

.header-info {
    margin-bottom: 25px;
}

.header-info p {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.header-info p.authors {
    font-size: 1.2rem;
    font-weight: 500;
}

.header-info p.authors a {
    color: #007bff;
    text-decoration: none;
}

.header-info p.authors a:hover {
    color: #007bff;
    text-decoration: none;
}

.header-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.header-buttons .btn {
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 25px;
    background: #333;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    flex: none;
    text-decoration: none !important;
}

.header-buttons .btn:hover {
    background: #555;
    transform: translateY(-1px);
    text-decoration: none !important;
}

main {
    display: flex;
    gap: 30px;
    flex: 1;
    align-items: flex-start;
}

.canvas-container {
    flex: 1;
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#canvas {
    display: block;
    width: 100%;
    max-width: 1000px;
    height: auto;
    border-radius: 8px;
    background: #000000;
    cursor: crosshair;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 20px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    max-width: 80%;
    z-index: 10;
}

.controls {
    width: 300px;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.control-group {
    margin-bottom: 25px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: #333333;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 5px;
}

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

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
}

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

.slider-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    width: 100%;
    overflow: hidden;
}

.slider-group label {
    font-size: 0.9rem;
    min-width: 80px;
    flex-shrink: 0;
    color: #555555;
}

.slider-group input[type="range"] {
    flex: 1;
    min-width: 0;
    height: 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.1);
    outline: none;
    -webkit-appearance: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-group span {
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 40px;
    max-width: 50px;
    text-align: right;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #555555;
}

.select-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.select-group label {
    font-size: 0.9rem;
    min-width: 80px;
    color: #555555;
}

.select-group select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.8);
    color: #333333;
    font-size: 0.9rem;
}

.select-group select option {
    background: #ffffff;
    color: #333333;
}

.checkbox-group {
    margin-bottom: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    color: #555555;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #007bff;
}

.instructions {
    list-style: none;
    padding: 0;
}

.instructions li {
    font-size: 0.9rem;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.instructions li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #007bff;
    font-weight: bold;
}

.about-text {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 10px;
    opacity: 0.9;
    color: #555555;
}

footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    opacity: 0.8;
    color: #555555;
}

footer a {
    color: #007bff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 1024px) {
    main {
        flex-direction: column;
    }

    .controls {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }

    .control-group {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2rem;
    }

    .canvas-container {
        padding: 15px;
    }

    .controls {
        padding: 15px;
    }

    .button-group {
        flex-direction: column;
    }

    .slider-group,
    .select-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .slider-group label,
    .select-group label {
        min-width: auto;
    }

    .slider-group input[type="range"],
    .select-group select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    header p {
        font-size: 1rem;
    }

    .container {
        padding: 10px;
    }

    .canvas-container,
    .controls {
        padding: 10px;
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

* {
    transition: opacity 0.2s ease;
}

button:focus,
input:focus,
select:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

@media (prefers-contrast: high) {

    .canvas-container,
    .controls {
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid #ffffff;
    }

    .btn-primary {
        background: #0000ff;
    }

    .btn-secondary {
        background: #808080;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.info-section {
    margin-top: 40px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.info-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #333;
}

.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    justify-content: center;
    align-items: start;
}

.video-item {
    background: #eeeeee;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.video-item h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
}

.video-item p {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.4;
}

.video-item video {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 6px;
    background-color: #000;
}

@media (max-width: 768px) {
    .info-section {
        padding: 15px;
    }

    .info-section h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .video-gallery {
        grid-template-columns: 1fr;
    }
}