#contactModal {
    --accent: #6366f1;
    --soft-bg: rgba(255, 255, 255, 0.95);
}

#contactModal .modal-dialog {
    position: fixed;
    top: calc(50% + 40px);   /* Измените значение с 50% на 55% */
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 500px;
    width: 90%;
    margin: 0;
    transition: top 0.3s ease; /* Добавляем плавную анимацию */
}

#contactModal .modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    background: var(--soft-bg);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.modal-header {
    border-bottom: none;
    padding: 1rem 1.25rem;
}

.modal-title {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1.25rem;
    color: #1f2937;
}

.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
}

.contact-card {
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
    background: white;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.1);
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.contact-details strong {
    font-size: 1rem;
    color: #1f2937;
    display: block;
    margin-bottom: 0.25rem;
}

.contact-details span {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
}

.contact-details a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.contact-details a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.quantum-map {
    height: 200px;
    background: #f3f4f6;
    border-radius: 8px;
    margin: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    #contactModal .modal-dialog {
        top: 60% !important;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    opacity: 0.9;
    animation: lineAppear 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes lineAppear {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(0); }
}

.contact-list {
    display: grid;
    gap: 0.75rem;
    padding: 0 1rem 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: iconEntrance 0.3s ease forwards;
    opacity: 0;
}

.contact-item:hover {
    background: none;
}

.icon-wrapper {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.animated-icon {
    width: 20px;
    height: 20px;
    stroke: #6366f1;
    transition: all 0.3s ease;
}

.contact-item:hover .animated-icon {
    transform: none;
    stroke: #6366f1;
}

.contact-details .label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.1rem;
}

.contact-details .value {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.9rem;
    line-height: 1.4;
}

@keyframes iconEntrance {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.contact-item:nth-child(1) { animation-delay: 0.1s; }
.contact-item:nth-child(2) { animation-delay: 0.2s; }
.contact-item:nth-child(3) { animation-delay: 0.3s; }
.contact-item:nth-child(4) { animation-delay: 0.4s; }

@media (max-width: 768px) {
    .contact-list {
        padding: 0 0.5rem 0.5rem;
    }
    
    .contact-item {
        padding: 0.5rem;
    }
}