@font-face {
    font-family: 'GilroyExtraBold';
    src: url('font/Gilroy-ExtraBold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #020408 30%, #040810 60%, #060c18 100%);
    background-attachment: fixed;
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite, fadeIn 0.6s ease-out;
    color: #b0c4de;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: rgba(2, 4, 10, 0.94);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(15, 25, 60, 0.2) inset;
    text-align: center;
    border: 1px solid rgba(15, 25, 60, 0.35);
    max-height: 90vh;
    overflow-y: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}


.form-control {
    background-color: rgba(0, 2, 8, 0.85);
    border: 1px solid rgba(15, 25, 60, 0.3);
    border-radius: 12px;
    color: #b0c4de;
    text-shadow: 0 0 0 white;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    background-color: rgba(4, 6, 16, 0.95);
    color: #b0c4de;
    border-color: rgba(40, 70, 180, 0.45);
    box-shadow: 0 0 0 3px rgba(40, 70, 180, 0.12);
}

.form-control.multiselect {
    min-height: 120px;
    max-height: 200px;
    overflow-y: auto;
}

.form-control.multiselect option {
    background-color: #080a12;
    color: white;
    padding: 6px 8px;
    margin: 2px 0;
    border-radius: 3px;
}

.form-control.multiselect option:checked {
    background-color: #3550d1;
    color: white;
    font-weight: bold;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

h1 {
    margin-bottom: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #d0dae8 0%, #5a7aaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.025em;
}

.header-with-logout {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
}

.header-with-logout h1 {
    margin-bottom: 0;
    text-align: center;
    flex: 1;
}

.logout-btn {
    background: rgba(230, 57, 70, 0.15);
    color: #e63946;
    border: 1px solid rgba(230, 57, 70, 0.3);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: absolute;
    right: 0;
}

.logout-btn:hover {
    background: rgba(230, 57, 70, 0.25);
    border-color: rgba(230, 57, 70, 0.5);
    color: #ff6b6b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.15);
}

.logout-btn i {
    font-size: 16px;
}

p {
    margin-bottom: 25px;
    font-size: 18px;
}

.confirm-training-select {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background-color: #080a12;
    color: #fff;
    border: 1px solid #1a2040;
    border-radius: 4px;
    font-size: 14px;
    min-height: 120px;
    max-height: 150px;
    overflow-y: auto;
}

.confirm-training-select:focus {
    outline: none;
    border-color: #4a6cf7;
}

.confirm-training-select option {
    background-color: #080a12;
    color: #fff;
    padding: 6px 8px;
    margin: 2px 0;
    border-radius: 3px;
}

.confirm-training-select option:checked {
    background-color: #0d1020;
    font-weight: bold;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 16px;
    background-color: #080a12;
}

.login-btn {
    background: linear-gradient(135deg, rgba(74, 108, 247, 0.8), rgba(30, 55, 120, 0.9));
    color: white;
    border: 1px solid rgba(74, 108, 247, 0.3);
    border-radius: 14px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(74, 108, 247, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 108, 247, 0.3);
    border-color: rgba(74, 108, 247, 0.5);
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

form[id] {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    max-height: 0;
    overflow: hidden;
}

form[id].show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    max-height: unset;
    overflow: visible;
    transition: opacity 0.4s ease, transform 0.4s ease, max-height 0.8s ease;
}

@keyframes formAppear {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#wybor {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 20px auto;
    max-width: 700px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#wybor .submit-btn {
    flex: 0 0 auto;
    max-width: calc(33.333% - 10px);
    min-width: 180px;
}

.submit-btn {
    background: rgba(2, 4, 12, 0.95);
    color: #b0c4de;
    border: 1px solid rgba(15, 25, 60, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 14px 30px;
    margin: 10px 0;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(15, 25, 60, 0.2) inset;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(15, 30, 80, 0.25), transparent);
    transition: left 0.6s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(15, 30, 80, 0.3) inset;
    border-color: rgba(20, 40, 100, 0.5);
    color: white;
}

label, h1, p, input, textarea, button {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(13, 16, 32, 0.6);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #1a2040;
    border-radius: 10px;
    border: 2px solid rgba(13, 16, 32, 0.6);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #2a3560;
}

* {
    scrollbar-color: #1a2040 #080a12;
    scrollbar-width: thin;
}

#wybor .alert {
    margin: 15px auto;
    max-width: 90%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    border-left: 4px solid #2a3560;
    font-weight: 500;
    padding: 12px 15px;
    animation: fadeIn 0.5s ease, alertPulse 2s infinite;
}

#wybor .alert-warning {
    background-color: rgba(26, 42, 96, 0.15);
    color: #f8f8f8;
    border-color: rgba(74, 108, 247, 0.5);
}

@keyframes alertPulse {
    0% {
        box-shadow: 0 0 0 rgba(42, 42, 42, 0.4);
    }
    70% {
        box-shadow: 0 0 10px rgba(74, 108, 247, 0.2);
    }
    100% {
        box-shadow: 0 0 0 rgba(42, 42, 42, 0.4);
    }
}




.btn.submit-btn.disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background-color: rgba(42, 34, 24, 0.4) !important;
}


form {
    margin-bottom: 20px;
}

.container::-webkit-scrollbar {
    width: 8px;
}

.container::-webkit-scrollbar-track {
    background: rgba(13, 16, 32, 0.4);
    border-radius: 8px;
}

.container::-webkit-scrollbar-thumb {
    background: #1a2040;
    border-radius: 8px;
}

.container::-webkit-scrollbar-thumb:hover {
    background: #2a3560;
}

.form-check {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    background-color: #0d1020 !important;
    border: 1px solid #1a2040 !important;
    appearance: none;
    border-radius: 3px;
    position: relative;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: #3550d1 !important;
    border-color: #4a6cf7 !important;
}

.form-check-input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
    color: white;
}

.form-check-input:hover {
    border-color: #4a6cf7 !important;
}

.form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.25);
}

.file-input {
    background-color: #000000 !important;
    border: 2px dashed #2a3560 !important;
    color: white !important;
    padding: 12px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-input:hover {
    border-color: #4a6cf7 !important;
    background-color: #000000 !important;
}

.file-input:focus {
    border-color: #4a6cf7 !important;
    background-color: #000000 !important;
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.25) !important;
}

.file-info {
    background-color: rgba(13, 16, 32, 0.5);
    border-radius: 6px;
    padding: 8px 12px;
    border-left: 3px solid #4a6cf7;
}

.file-info small {
    display: block;
    margin-bottom: 2px;
}

.file-info small:last-child {
    margin-bottom: 0;
}

.file-preview {
    max-height: 200px;
    overflow-y: auto;
}

.file-preview h6 {
    color: #7b9ae8;
    margin-bottom: 8px;
    font-size: 14px;
}

.file-preview-item {
    margin-bottom: 4px;
}

.file-preview-item .bg-dark {
    background-color: rgba(13, 16, 32, 0.8) !important;
    border: 1px solid rgba(58, 58, 58, 0.5);
}

.file-preview-item i {
    color: #7b9ae8;
}

.file-preview-item span {
    color: white;
    font-size: 14px;
}

.file-preview-item small {
    color: #aaa !important;
    font-size: 12px;
}

.file-preview::-webkit-scrollbar {
    width: 6px;
}

.file-preview::-webkit-scrollbar-track {
    background: rgba(13, 16, 32, 0.4);
    border-radius: 6px;
}

.file-preview::-webkit-scrollbar-thumb {
    background: #1a2040;
    border-radius: 6px;
}

.file-preview::-webkit-scrollbar-thumb:hover {
    background: #2a3560;
}

.file-upload-area {
    border: 2px dashed rgba(15, 25, 60, 0.4);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    background: rgba(0, 2, 8, 0.6);
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.file-upload-area:hover {
    border-color: rgba(40, 70, 180, 0.45);
    background: rgba(4, 6, 16, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.file-upload-area.dragover {
    border-color: rgba(40, 70, 180, 0.5);
    background: rgba(10, 15, 40, 0.3);
    transform: scale(1.02);
}

.file-upload-placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    line-height: 1.6;
    pointer-events: none;
}

.file-upload-placeholder i {
    font-size: 48px;
    color: #8fa4e8;
    margin-bottom: 15px;
    display: block;
}

.file-upload-placeholder .main-text {
    font-size: 18px;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 8px;
}

.file-upload-placeholder .sub-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.selected-files-container {
    display: none;
    background: rgba(2, 4, 10, 0.7);
    border-radius: 16px;
    padding: 20px;
    margin-top: 15px;
    border: 1px solid rgba(15, 25, 60, 0.2);
}

.selected-files-container.has-files {
    display: block;
}

.selected-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.selected-files-title {
    color: #f8fafc;
    font-size: 16px;
    font-weight: 600;
}

.clear-all-files {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-all-files:hover {
    background: rgba(220, 53, 69, 0.3);
    border-color: rgba(220, 53, 69, 0.5);
}

.selected-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.selected-file-item {
    position: relative;
    background: rgba(8, 10, 18, 0.95);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.selected-file-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.file-thumbnail {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8fa4e8;
    font-size: 24px;
}

.file-thumbnail img,
.file-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.file-info {
    text-align: center;
}

.file-name {
    color: #f8fafc;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
    word-break: break-word;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
}

.file-size {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
}

.remove-file-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.remove-file-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.file-limits-info {
    background: rgba(5, 10, 25, 0.4);
    border: 1px solid rgba(15, 25, 60, 0.25);
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
    font-size: 13px;
    color: rgba(176, 196, 222, 0.65);
}

.file-limits-info i {
    color: #8fa4e8;
    margin-right: 8px;
}

@media (max-width: 768px) {
    #wybor .submit-btn {
        max-width: calc(50% - 10px);
        min-width: 150px;
    }
    
    .file-upload-area {
        padding: 30px 15px;
        min-height: 120px;
    }
    
    .file-upload-placeholder i {
        font-size: 36px;
        margin-bottom: 10px;
    }
    
    .file-upload-placeholder .main-text {
        font-size: 16px;
    }
    
    .selected-files-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .file-thumbnail {
        height: 60px;
    }
}

@media (max-width: 480px) {
    #wybor .submit-btn {
        max-width: 100%;
        min-width: auto;
        width: 100%;
    }
    
    .header-with-logout {
        flex-direction: column;
        text-align: center;
    }
    
    .header-with-logout h1 {
        width: 100%;
    }
    
    .logout-btn {
        position: static;
        width: 100%;
        justify-content: center;
    }
}