/* --- Основні стилі --- */
:root {
    --bg-color: #0d0f12;
    --card-bg: rgba(22, 26, 33, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --primary-color: #5865F2;
    --primary-glow: rgba(88, 101, 242, 0.35);
    --success-color: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* --- Неонові фонові світіння --- */
.background-glows {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.glow-1 {
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(88, 101, 242, 0.15) 0%, rgba(0,0,0,0) 70%);
    top: 15%; left: -100px;
    border-radius: 50%;
    animation: pulse-glow 8s infinite alternate;
}

.glow-2 {
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.1) 0%, rgba(0,0,0,0) 70%);
    bottom: 10%; right: -150px;
    border-radius: 50%;
    animation: pulse-glow 12s infinite alternate-reverse;
}

@keyframes pulse-glow {
    0%   { transform: scale(1) translate(0, 0); opacity: 0.8; }
    100% { transform: scale(1.15) translate(30px, -20px); opacity: 1; }
}

/* --- Контейнер та картка --- */
.main-container {
    width: 100%;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 2;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    padding: 36px 28px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 150px; height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

/* --- Елементи картки --- */
.icon-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.shield-icon {
    width: 76px; height: 76px;
    background: rgba(88, 101, 242, 0.08);
    border: 1px solid rgba(88, 101, 242, 0.25);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.15);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}

.title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    margin-bottom: 24px;
}

/* --- Секція параметрів --- */
.parameters-section {
    text-align: left;
    margin-bottom: 32px;
}

.parameters-desc {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.parameter-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.parameter-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 10px 14px;
    transition: background 0.3s ease;
}

.parameter-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.tag {
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 6px;
    margin-right: 14px;
    min-width: 40px;
    text-align: center;
}

/* Emoji-теги для нових карток */
.tag-dev  { background: rgba(249, 115, 22, 0.08);  border: 1px solid rgba(249, 115, 22, 0.2);  color: #f97316; }
.tag-mod  { background: rgba(34, 197, 94, 0.08);   border: 1px solid rgba(34, 197, 94, 0.2);   color: #22c55e; }
.tag-lng  { background: rgba(59, 130, 246, 0.08);  border: 1px solid rgba(59, 130, 246, 0.2);  color: #3b82f6; }
.tag-time { background: rgba(168, 85, 247, 0.08);  border: 1px solid rgba(168, 85, 247, 0.2);  color: #a855f7; }

.param-text {
    font-size: 13px;
    color: var(--text-primary);
}

.param-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* --- Кнопка дії --- */
.btn-tg {
    width: 100%;
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
    border: none;
    outline: none;
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 16px 20px;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 8px 24px var(--primary-glow);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-tg:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(88, 101, 242, 0.5);
    background: linear-gradient(135deg, #6773f3 0%, #505cd1 100%);
}

.btn-tg:active {
    transform: translateY(1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-tg:disabled {
    background: #20242f;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Спінер */
.spinner {
    width: 20px; height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

.hidden { display: none !important; }

.security-note {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 16px;
    letter-spacing: 0.2px;
    line-height: 1.5;
}

/* --- Підвал --- */
.footer {
    width: 100%;
    max-width: 700px;
    padding: 24px 20px;
    text-align: center;
    z-index: 2;
    margin-top: auto;
}

.disclaimer {
    font-size: 11px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 11px;
    transition: color 0.2s ease;
}

.footer-links a:hover { color: #ffffff; }

.sep { color: var(--text-muted); font-size: 10px; }

/* --- Модальні вікна --- */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(9, 10, 13, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: #161a21;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 460px;
    border-radius: 20px;
    padding: 28px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal.show .modal-content { transform: translateY(0); }

.close-modal {
    position: absolute;
    top: 20px; right: 20px;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.close-modal:hover { color: white; }

.modal-content h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: white;
}

.modal-body {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-body p { margin-bottom: 12px; }

.modal-body ul {
    padding-left: 20px;
    margin-top: 8px;
}

.modal-body li { margin-bottom: 8px; }

/* --- Адаптивність --- */
@media (max-width: 480px) {
    .glass-card { padding: 28px 20px; }
    .title { font-size: 19px; }
    .parameter-item { padding: 8px 12px; }
}

/* --- Компактна сітка вакансій --- */
.vacancies-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.city-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.city-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 90px;
    letter-spacing: 0.2px;
}

.lang-pills {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.lang-pill {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(88, 101, 242, 0.08);
    border: 1px solid rgba(88, 101, 242, 0.2);
    border-radius: 20px;
    padding: 4px 11px;
    white-space: nowrap;
}

/* --- Мета-рядок умов --- */
.meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.meta-item {
    font-size: 12px;
    color: var(--text-secondary);
}

.meta-sep {
    color: var(--text-muted);
    font-size: 10px;
}

/* --- Зменшуємо відступи карточки на маленьких екранах --- */
@media (max-height: 700px) {
    .glass-card {
        padding: 20px 20px;
    }
    .icon-container {
        margin-bottom: 12px;
    }
    .shield-icon {
        width: 60px;
        height: 60px;
    }
    .title {
        font-size: 20px;
        margin-bottom: 5px;
    }
    .subtitle {
        font-size: 12px;
        margin-bottom: 14px;
    }
    .divider {
        margin-bottom: 14px;
    }
}
