/* Зменшені розміри для карток роботи */
.jobs-card {
    background: linear-gradient(135deg, #1e2a48 0%, #0a1022 100%);
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.jobs-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background-image: url('https://images.unsplash.com/photo-1531834685032-c34bf0d84c77?ixlib=rb-1.2.1&auto=format&fit=crop&w=1000&q=80'); */
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 0;
}

.card-content {
    position: relative;
    z-index: 1;
    padding: 12px;
}

.jobs-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin: 12px 0;
}

@media (max-width: 768px) {
    .jobs-container {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

.job-item {
    background-color: rgba(30, 41, 59, 0.8);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 0;
    transform: translateY(10px);
}

.job-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
}

.job-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

/* Зменшені розміри зображень */
.job-item[data-job-id="mechanic"] .job-image img,
.job-item[data-job-id="builder"] .job-image img,
.job-item[data-job-id="electrician"] .job-image img,
.job-item[data-job-id="programmer"] .job-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.job-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    filter: brightness(0.9);
}

.job-item:hover .job-image img {
    transform: scale(1.03);
    filter: brightness(1);
}

.job-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #5c4caf;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 1;
    backdrop-filter: blur(2px);
}

.premium-badge {
    background: linear-gradient(90deg, #FFD700, #FFA500);
    animation: shimmer 2s infinite linear;
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

.job-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.job-title {
    margin: 0 0 6px 0;
    font-size: 13px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.job-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.job-pay, .job-level {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: #bdc3d3;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 3px 5px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.job-item:hover .job-pay, .job-item:hover .job-level {
    background-color: rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 10px;
}

.job-description {
    font-size: 10px;
    color: #9a9eae;
    margin-bottom: 10px;
    line-height: 1.3;
    flex-grow: 1;
}

.btn-job-action {
    background-color: #4361ee;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn-job-action:hover {
    background-color: #3a56d4;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-job-action::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn-job-action:focus:not(:active)::after {
    animation: ripple 0.8s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(15, 15);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(25, 25);
    }
}

.premium-btn {
    background: linear-gradient(90deg, #4361ee, #7209b7);
    position: relative;
}

.premium-btn:hover {
    background: linear-gradient(90deg, #3a56d4, #6008a6);
}

.premium-job {
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.05);
}

.premium-job:hover {
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.1);
}

.jobs-summary {
    margin-top: 15px;
}

.summary-card {
    background-color: rgba(30, 41, 59, 0.8);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.summary-card:hover {
    background-color: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.summary-icon {
    font-size: 18px;
    background-color: rgba(67, 97, 238, 0.2);
    height: 36px;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.summary-card:hover .summary-icon {
    background-color: rgba(67, 97, 238, 0.3);
    transform: scale(1.03);
}

.summary-info {
    flex-grow: 1;
}

.summary-title {
    font-size: 12px;
    font-weight: 600;
    color: white;
    margin-bottom: 5px;
}

.summary-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.summary-stat {
    font-size: 10px;
    color: #9a9eae;
    display: flex;
    align-items: center;
    gap: 3px;
}

.summary-stat .stat-value {
    color: #4CAF50;
    font-weight: 600;
    transition: all 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.job-item {
    animation: fadeIn 0.4s forwards;
}

.job-item:nth-child(1) { animation-delay: 0.05s; }
.job-item:nth-child(2) { animation-delay: 0.1s; }
.job-item:nth-child(3) { animation-delay: 0.15s; }
.job-item:nth-child(4) { animation-delay: 0.2s; }

.working-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 3px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 15px;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.working-job-item .working-animation {
    opacity: 1;
}

.working-job-item .job-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.animation-dot {
    width: 5px;
    height: 5px;
    background-color: #4CAF50;
    border-radius: 50%;
    opacity: 0.7;
    animation: pulse 1.5s infinite ease-in-out;
}

.animation-dot:nth-child(2) {
    animation-delay: 0.3s;
}

.animation-dot:nth-child(3) {
    animation-delay: 0.6s;
}

.back-navigation {
    margin-bottom: 12px;
}

.btn-back {
    background-color: rgba(30, 41, 59, 0.8);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-back:before {
    content: '←';
    font-size: 12px;
}

.btn-back:hover {
    background-color: rgba(30, 41, 59, 1);
    transform: translateX(-2px);
}

/* Job selection highlight effect */
.job-item.selected {
    border: 1px solid #4361ee;
    box-shadow: 0 0 10px rgba(67, 97, 238, 0.2);
}

/* Job working state badge */
.working-job-item::before {
    content: 'В ПРОЦЕССЕ';
    position: absolute;
    top: 5px;
    left: 5px;
    background-color: rgba(67, 97, 238, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 10;
    animation: pulse 2s infinite;
}

/* Notification system styles */
.notification-container {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification {
    background-color: rgba(30, 41, 59, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    max-width: 300px;
    font-size: 11px;
    transform: translateX(120%);
    animation: slideIn 0.3s forwards, fadeOut 0.3s 3.7s forwards;
    border-left: 3px solid #4361ee;
}

.notification.success {
    border-left-color: #4CAF50;
}

.notification.error {
    border-left-color: #f44336;
}

.notification.warning {
    border-left-color: #ff9800;
}

.notification-icon {
    font-size: 14px;
}

.notification-message {
    flex-grow: 1;
}

@keyframes slideIn {
    to { transform: translateX(0); }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-5px); }
}

@keyframes stat-updated {
    0%, 100% { color: #fff; }
    50% { color: #4CAF50; transform: scale(1.05); }
}

.stat-updated {
    animation: stat-updated 0.8s ease;
}