
        /*body {
            font-family: Arial, sans-serif;
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            background-color: #f5f5f5;
        }*/

        .container {
            background: white;
            padding: 30px;
            margin: 0 20px auto 20px;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        h1 {
          text-align: center;
          color: #1f2937;
          margin-bottom: 1.5rem;
          margin-top: 1.5rem;
            font-size: 1.3em;
        }

        .upload-area {
            border: 2px dashed #ccc;
            border-radius: 10px;
            padding: 30px;
            text-align: center;
            margin: 20px 0;
            background-color: #fafafa;
            transition: border-color 0.3s;
        }

        .upload-area:hover {
            border-color: #007bff;
        }

        .upload-area.dragover {
            border-color: #007bff;
            background-color: #e3f2fd;
        }

        .video-info {
          /*  border: 2px solid #ccc;*/
          /*  border-radius: 10px;*/
            padding: 30px;
            text-align: center;
          /*  margin: 20px 0;*/
          /*  background-color: #fafafa;*/
        }

        input[type="file"] {
            display: none;
        }

        .upload-btn {
            background-color: #007bff;
            color: white;
            padding: 12px 24px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
            margin: 10px 0;
        }

        .upload-btn:hover {
            background-color: #0056b3;
        }

        .video-info .upload-area {
            border: 2px #007bff;
        }

        .video-details-header {
           /* background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);*/
           /* color: white;*/
            padding: 20px;
            border-radius: 10px 10px 0 0;
            margin: -30px -30px 20px -30px;
        }

        .video-details-header h3 {
            margin: 0;
            font-size: 24px;
        }

        .video-metadata {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 2px solid #e0e0e0;
        }

        .metadata-item {
            background: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
            border-left: 4px solid #007bff;
        }

        .metadata-item strong {
            display: block;
            color: #666;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 5px;
        }

        .metadata-item span {
            display: block;
            font-size: 18px;
            color: #333;
            font-weight: 500;
        }

        .action-options {
            /* Use flexbox so cards can stretch to the same height
               and naturally wrap when there are 2 or 3 items. Each
               child will be at least 220px wide and grow to fill
               remaining space. */
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
            align-items: stretch; /* make children stretch to same row height */
            /* allow children to grow/shrink; min width ~220px */
        }

        /* target direct children (action cards) so they form columns
           and stretch to fill height of the row */
        .action-options > * {
            flex: 1 1 220px; /* grow, shrink, base 220px */
            min-width: 220px;
            display: block;
        }

        /* make action cards use column layout so button can be pushed to bottom */
        .action-card {
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        /* push button to the bottom of the card when possible */
        .action-card button {
            margin-top: auto;
        }

        /* Mobile responsiveness */
        @media (max-width: 768px) {
            .video-metadata {
                grid-template-columns: 1fr;
                gap: 15px;
                margin-bottom: 20px;
                padding-bottom: 15px;
            }

            .metadata-item {
                padding: 12px;
            }

            .metadata-item strong {
                font-size: 11px;
                margin-bottom: 3px;
            }

            .metadata-item span {
                font-size: 16px;
            }

            .action-options {
                /* stack the flex children vertically on small screens */
                flex-direction: column;
                gap: 15px;
            }
        }

        @media (max-width: 480px) {
            .video-details-header {
                margin: -30px -30px 15px -30px;
                padding: 15px;
            }

            .video-details-header h3 {
                font-size: 20px;
            }

            .metadata-item {
                padding: 10px;
            }

            .metadata-item strong {
                font-size: 10px;
            }

            .metadata-item span {
                font-size: 14px;
            }
        }

        .action-card {
            background: #f8f9fa;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            padding: 20px;
            text-align: center;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .action-card:hover {
            border-color: #007bff;
            box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
            transform: translateY(-2px);
        }

        .action-icon {
            font-size: 32px;
            margin-bottom: 10px;
        }

        .action-card h4 {
            margin: 10px 0;
            color: #333;
            font-size: 16px;
        }

        .action-card p {
            color: #666;
            font-size: 13px;
            margin: 10px 0;
        }

        .action-card button {
            background-color: #007bff;
            color: white;
            padding: 12px 24px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: background-color 0.3s;
            width: 100%;
            margin-top: 10px;
        }

        .action-card input[type=text] {
            padding: 8px 12px; 
            border: 1px solid #ccc;
            border-radius: 4px; 
            font-size: 14px;
        }

        .action-card button:hover {
            background-color: #0056b3;
        }

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

            .action-icon {
                font-size: 28px;
                margin-bottom: 8px;
            }

            .action-card h4 {
                margin: 8px 0;
                font-size: 15px;
            }

            .action-card p {
                font-size: 12px;
                margin: 8px 0;
            }

            .action-card button {
                padding: 10px 16px;
                font-size: 13px;
                margin-top: 8px;
            }
        }

        @media (max-width: 480px) {
            .action-card {
                padding: 12px;
            }

            .action-icon {
                font-size: 24px;
                margin-bottom: 6px;
            }

            .action-card h4 {
                margin: 6px 0;
                font-size: 14px;
            }

            .action-card p {
                font-size: 11px;
                margin: 6px 0;
                line-height: 1.3;
            }

            .action-card button {
                padding: 10px 12px;
                font-size: 12px;
                margin-top: 8px;
            }
        }

        .convert-options {
            background: #f0f7ff;
            padding: 15px;
            border-radius: 5px;
            margin-top: 15px;
        }

        .convert-options label {
            display: block;
            margin: 10px 0 5px 0;
            color: #333;
            font-weight: 500;
            font-size: 14px;
        }

        .convert-options select {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #ccc;
            border-radius: 4px;
            font-size: 14px;
            margin-bottom: 10px;
            box-sizing: border-box;
        }

        @media (max-width: 768px) {
            .convert-options {
                padding: 12px;
                margin-top: 12px;
            }

            .convert-options label {
                margin: 8px 0 4px 0;
                font-size: 13px;
            }

            .convert-options select {
                padding: 8px 10px;
                font-size: 13px;
                margin-bottom: 8px;
            }
        }

        @media (max-width: 480px) {
            .convert-options {
                padding: 10px;
                margin-top: 10px;
            }

            .convert-options label {
                margin: 6px 0 3px 0;
                font-size: 12px;
            }

            .convert-options select {
                padding: 8px;
                font-size: 12px;
                margin-bottom: 6px;
            }
        }

        .progress-bar {
            width: 100%;
            height: 20px;
            background-color: #f0f0f0;
            border-radius: 10px;
            overflow: hidden;
            margin: 15px 0;
        }

        .progress-fill {
            height: 100%;
            background-color: #007bff;
            width: 0%;
            transition: width 0.3s;
        }

        .status {
            margin: 15px 0;
            padding: 10px;
            border-radius: 5px;
            font-weight: bold;
        }

        .status.loading {
            background-color: #fff3cd;
            color: #856404;
        }

        .status.success {
            background-color: #d4edda;
            color: #155724;
        }

        .status.error {
            background-color: #f8d7da;
            color: #721c24;
        }

        .hidden {
            display: none;
        }



        button {
            background-color: #28a745;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            margin: 5px;
        }

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

        button:disabled {
            background-color: #6c757d;
            cursor: not-allowed;
        }

        .output-info {
            background-color: #d1ecf1;
            padding: 15px;
            border-radius: 5px;
            margin: 15px 0;
        }

        /* Edit Area Styling */
        #editArea {
            /*display: flex;*/
            display : none;
            flex-direction: column;
            gap: 20px;
        }

        #player-controls {
            background: #333;
            padding: 10px;
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
            justify-content: space-between;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        #player-buttons {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        #time-display {
            color: white;
            padding: 10px 16px;
            border-radius: 6px;
            font-weight: 600;
            font-size: 16px;
            white-space: nowrap;
        }

        #currentTime {
            font-family: 'Courier New', monospace;
            font-weight: bold;
        }

        #player-controls button {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.3);
            padding: 10px 16px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 16px;
            font-weight: 500;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
        }

        #player-controls button:hover:not(:disabled) {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

        #player-controls button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        #player-controls button:active:not(:disabled) {
            background: rgba(255, 255, 255, 0.4);
            transform: translateY(0);
        }

        /* Video Parts Container */
        #videoParts-container {
            background: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        #videoParts-container h3 {
            margin: 0 0 15px 0;
            color: #333;
            font-size: 18px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .video-part {
            background: #f8f9fa;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 15px;
            transition: all 0.3s ease;
        }

        .video-part:hover {
            border-color: #007bff;
            box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
        }

        .video-part-content {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr 1fr auto;
            gap: 12px;
            align-items: end;
        }

        .video-part-field {
            display: flex;
            flex-direction: column;
        }

        .video-part-field label {
            font-size: 12px;
            color: #666;
            font-weight: 600;
            text-transform: uppercase;
            margin-bottom: 4px;
            letter-spacing: 0.5px;
        }

        .video-part-field input,
        .video-part-field select {
            padding: 10px 12px;
            border: 1px solid #ccc;
            border-radius: 6px;
            font-size: 14px;
            background: white;
            transition: border-color 0.3s;
        }

        .video-part-field input:focus,
        .video-part-field select:focus {
            outline: none;
            border-color: #007bff;
            box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
        }

        .video-part-field input {
            font-family: inherit;
        }

        .video-part-time {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
            color: #666;
        }

        .delete-part-btn {
            background: #dc3545;
            color: white;
            border: none;
            width: 36px;
            height: 36px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 16px;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .delete-part-btn:hover {
            background: #c82333;
            transform: scale(1.05);
        }

        #editArea-footer {
            display: flex;
            gap: 10px;
            align-items: center;
            padding: 20px;
            background: linear-gradient(to bottom, #333 0%, #000 100%);
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            border-bottom-left-radius: 8px;
            border-bottom-right-radius: 8px;
            flex-wrap: wrap;
            justify-content: space-between;
        
        }


        #editArea-footer label {
            color: rgba(255, 255, 255, 0.7);
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            display: block;
            margin-bottom: 5px;
        }

        /* Field wrapper styling */
        #editArea-footer > div {
            display: flex;
            flex-direction: column;
            gap: 5px;
            min-width: 100px;
        }

        /* Input field styling */
        #editArea-footer input[type="text"] {
            background: rgba(255, 255, 255, 0.08);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.15);
            padding: 8px 12px;
            border-radius: 4px;
            font-size: 13px;
            transition: all 0.2s ease;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }

        #editArea-footer input[type="text"]::placeholder {
            color: rgba(255, 255, 255, 0.4);
        }

        #editArea-footer input[type="text"]:focus {
            outline: none;
            background: rgba(255, 255, 255, 0.12);
            border-color: rgba(255, 255, 255, 0.3);
            box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
        }

        /* Select/combo box styling */
        #editArea-footer select {
            background: rgba(255, 255, 255, 0.08);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.15);
            padding: 8px 12px;
            border-radius: 4px;
            font-size: 13px;
            transition: all 0.2s ease;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba%28255,255,255,0.6%29' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 8px center;
            background-size: 16px;
            padding-right: 32px;
        }

        #editArea-footer select:focus {
            outline: none;
            background-color: rgba(255, 255, 255, 0.12);
            border-color: rgba(255, 255, 255, 0.3);
            box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
        }

        #editArea-footer select option {
            background: #1a1a1a;
            color: white;
        }

        /* Time display text styling */
        #editArea-footer > div:nth-child(3) > div,
        #editArea-footer > div:nth-child(4) > div {
            color: rgba(255, 255, 255, 0.9);
            font-size: 13px;
            font-weight: 500;
            font-family: 'Courier New', monospace;
            padding: 8px 12px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 4px;
        }

        .submitCutBtn {
            padding: 10px 20px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
        }

        .submitCutBtn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
            /*background: linear-gradient(135deg, #0066d9 0%, #003d99 100%);*/
        }

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


        /* Mobile Responsiveness */
        @media (max-width: 768px) {
            .video-part-content {
                grid-template-columns: 1fr;
            }

            .video-part-field label {
                font-size: 11px;
            }

            .video-part-field input,
            .video-part-field select {
                font-size: 13px;
                padding: 8px 10px;
            }

            #player-controls {
                padding: 15px;
                gap: 8px;
                flex-direction: column;
                align-items: stretch;
            }

            #player-buttons {
                gap: 8px;
                flex-wrap: wrap;
                justify-content: center;
            }

            #player-controls button {
                padding: 8px 12px;
                font-size: 14px;
            }

            #time-display {
                padding: 8px 12px;
                font-size: 14px;
                text-align: center;
                order: 2;
            }

            #editArea-footer {
                flex-direction: column;
            }

        }

        /* Very small screens (mobile phones) */
        @media (max-width: 480px) {
            #player-buttons {
                gap: 6px;
            }

            #player-controls button {
                padding: 6px 10px;
                font-size: 13px;
            }

            #time-display {
                font-size: 13px;
                padding: 6px 10px;
            }
        }

        /* Loading Spinner Animation */
        .loading-spinner {
            width: 40px;
            height: 40px;
            margin: 20px auto;
            border: 4px solid #f3f3f3;
            border-top: 4px solid #007bff;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

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