@font-face { font-family: 'Tektur'; src: url('/fonts/Tektur-Regular.ttf') format('truetype'); font-weight: 400; }
@font-face { font-family: 'Tektur'; src: url('/fonts/Tektur-Bold.ttf') format('truetype'); font-weight: 700; }

:root { --bg: #04141f; --primary: #00ffff; --text: #e0f0ff; --muted: #66a3cc; --border: rgba(0, 255, 255, 0.2); }
* { box-sizing: border-box; font-family: 'Tektur', sans-serif; }

body { background-color: var(--bg); background-image: radial-gradient(circle at 50% 0%, #0a1f2e 0%, #04141f 80%); color: var(--text); margin: 0; padding: 40px 20px; min-height: 100vh; }
.container { max-width: 1200px; margin: 0 auto; }

.header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 30px; }
h1 { color: var(--primary); margin: 0 0 10px 0; font-size: 2rem; text-shadow: 0 0 15px rgba(0,255,255,0.4); }
.subtitle { color: var(--muted); margin: 0; font-size: 1rem; }

.custom-select { position: relative; display: inline-block; user-select: none; z-index: 100; }
.custom-select-btn { background: rgba(0,0,0,0.3); border: 1px solid var(--border); color: var(--primary); padding: 8px 35px 8px 15px; border-radius: 8px; font-size: 0.9rem; font-weight: bold; cursor: pointer; position: relative; text-transform: uppercase; outline: none !important; box-shadow: none !important; }
.custom-select-btn:hover { border-color: var(--primary); box-shadow: 0 0 10px rgba(0,255,255,0.2) !important; }
.custom-select-btn::after { content: '▼'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 0.6rem; color: var(--muted); }

.custom-select-options { display: none; position: absolute; top: 110%; right: 0; min-width: 100%; background: #04141f; border: 1px solid var(--primary); border-radius: 8px; box-shadow: 0 4px 15px rgba(0,255,255,0.2); overflow: hidden; }
.custom-select-options.active { display: block; }
.custom-select-option { padding: 10px 15px; cursor: pointer; font-weight: bold; font-size: 0.9rem; text-transform: uppercase; color: var(--text); transition: background 0.2s; }
.custom-select-option:hover { background: rgba(0,255,255,0.1); color: var(--primary); }

.card { background: rgba(4, 20, 31, 0.85); border: 1px solid var(--border); border-radius: 15px; padding: 25px; margin-bottom: 30px; backdrop-filter: blur(10px); }
.card-title { color: var(--primary); font-size: 1.3rem; margin-top: 0; margin-bottom: 10px; }
.card-desc { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; }

.input-group { margin-bottom: 15px; display: flex; gap: 15px; flex-wrap: wrap; }
.input-group input { flex: 1; min-width: 250px; }
input[type="text"] { background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border); color: var(--text); padding: 12px 15px; border-radius: 8px; font-size: 1rem; outline: none; transition: border-color 0.2s; width: 100%; }
input[type="text"]:focus { border-color: var(--primary); box-shadow: 0 0 10px rgba(0,255,255,0.2); }
input::placeholder { color: rgba(102, 163, 204, 0.5); }

button, .btn { background: transparent; color: var(--primary); border: 1px solid var(--primary); padding: 12px 30px; border-radius: 50px; font-size: 1rem; font-weight: bold; cursor: pointer; transition: all 0.2s; text-transform: uppercase; letter-spacing: 1px; text-decoration: none; outline: none; }
button:hover, .btn:hover { background: rgba(0, 255, 255, 0.1); box-shadow: 0 0 15px rgba(0,255,255,0.3); }
.btn-sm { padding: 6px 15px; font-size: 0.8rem; }
.btn-resources { border-color: #00b8b8; color: #00b8b8; background: rgba(0,184,184,0.1); padding: 4px 12px; text-transform: none; }
.btn-resources:hover { background: rgba(0,184,184,0.2); box-shadow: 0 0 10px rgba(0,184,184,0.4); }
.btn-main { width: 100%; } /* Для кнопки регистрации */

table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th { text-align: left; padding: 12px; color: var(--muted); border-bottom: 1px solid var(--border); font-size: 0.85rem; text-transform: uppercase; }
td { padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.95rem; vertical-align: middle; }
tr:hover td { background: rgba(0, 255, 255, 0.03); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Утилиты */
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.text-white { color: #fff; }
.hub-code { font-size: 0.7rem; color: var(--muted); }
.table-empty { color: #66a3cc; padding: 20px; text-align: center; }
.empty-li { color: var(--muted); list-style: none; }
.model-type { display: inline; color: var(--muted); margin-left: 8px; }
.modal-desc { color: var(--muted); margin-bottom: 10px; }
.modal-params { color: var(--muted); font-size: 0.85rem; display: block; margin-top: 2px; }

.msg { margin-top: 15px; padding: 12px; border-radius: 8px; display: none; }
.msg.show { display: block; }
.msg.ok { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.msg.err { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Модалки */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(5px); display: none; justify-content: center; align-items: center; z-index: 1000; }
.modal-overlay.active { display: flex; }
.modal-content { background: #04141f; border: 1px solid var(--primary); max-width: 800px; width: 90%; max-height: 85vh; border-radius: 15px; padding: 25px 30px; box-shadow: 0 0 30px rgba(0, 255, 255, 0.15); display: flex; flex-direction: column; overflow-y: auto; }
.modal-content::-webkit-scrollbar { width: 8px; }
.modal-content::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); border-radius: 4px; }
.modal-content::-webkit-scrollbar-thumb { background: rgba(0, 255, 255, 0.3); border-radius: 4px; }
.modal-content::-webkit-scrollbar-thumb:hover { background: rgba(0, 255, 255, 0.6); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 15px; }
.modal-header h2 { margin: 0; color: var(--primary); font-size: 1.4rem; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 1.5rem; cursor: pointer; padding: 0 10px; }
.modal-close:hover { color: #ef4444; }
.modal-section { margin-bottom: 25px; }
.modal-section h3 { color: #00b8b8; margin: 0 0 15px 0; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; }
.modal-list { margin: 0; padding-left: 20px; line-height: 1.6; }
.modal-list li { margin-bottom: 10px; color: var(--text); }
.modal-list li strong { color: #fff; }
.modal-list li span { color: var(--muted); font-size: 0.85rem; display: block; margin-top: 2px; }
.connect-info { background: rgba(0,255,255,0.05); padding: 15px; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 20px; }
.connect-info p { margin: 0 0 5px 0; color: var(--muted); font-size: 0.9rem; }
.connect-info strong { color: #fff; font-size: 1.1rem; }
.modal-content-small {max-width: 500px;}
@media (max-width: 768px) {
    body {
        padding: 20px 12px;
    }

    .container {
        max-width: 100%;
    }

 
    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        margin-bottom: 20px;
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .custom-select {
        align-self: flex-start;
    }


    .card {
        padding: 18px;
        border-radius: 12px;
        margin-bottom: 20px;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-desc {
        font-size: 0.85rem;
    }

    .input-group {
        flex-direction: column;
        gap: 10px;
    }

    .input-group input {
        min-width: 0;  
        width: 100%;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead {
        display: none;
    }

    tbody tr {
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 14px 16px;
        margin-bottom: 14px;
        background: rgba(0, 0, 0, 0.25);
    }

    tbody td {
        padding: 6px 0;
        border: none;
        overflow-wrap: anywhere;  /* длинные URL переносятся */
        word-break: break-word;
    }

    tbody td:first-child {
        font-size: 1.05rem;
        margin-bottom: 4px;
    }

    tbody td.text-right {
        text-align: left;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }


    tbody td .btn,
    tbody td .btn-sm {
        width: 100%;
        padding: 10px 14px;
        font-size: 0.85rem;
    }


    tbody tr:has(> td.table-empty) {
        border: none;
        background: transparent;
        padding: 0;
        margin-bottom: 0;
    }

    tbody td.table-empty {
        padding: 20px 0;
    }
    .modal-content {
        width: 95%;
        padding: 20px;
        max-height: 90vh;
    }

    .modal-content-small {
        max-width: none;
    }

    .modal-header {
        margin-bottom: 15px;
        padding-bottom: 12px;
    }

    .modal-header h2 {
        font-size: 1.15rem;
    }

    .modal-section h3 {
        font-size: 1rem;
    }

    .modal-list {
        padding-left: 16px;
    }

    .connect-info {
        padding: 12px;
    }

    .connect-info strong {
        font-size: 1rem;
    }

    #connect-target-url,
    .connect-info p {
        overflow-wrap: anywhere;
    }
    button,
    .btn {
        padding: 11px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 420px) {
    h1 {
        font-size: 1.3rem;
    }

    .card {
        padding: 15px;
    }

    .modal-content {
        padding: 16px;
    }

    button,
    .btn {
        font-size: 0.85rem;
        letter-spacing: 0.5px;
    }
}