/* General */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Navigation */
.main-header {
    padding: 0 1rem;
}

.nav-link {
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: currentColor;
}

/* Posts */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.post-content video {
    max-width: 100%;
    border-radius: 0.5rem;
}

/* Stories */
.story-preview {
    position: relative;
    padding-bottom: 177.77%;
    overflow: hidden;
    border-radius: 0.5rem;
}

.story-preview img,
.story-preview video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-content {
    background-color: white;
    border-radius: 0.5rem;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.3s ease-out;
}

/* Utilities */
.aspect-square {
    aspect-ratio: 1 / 1;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #ffffff;
    }

    .bg-white {
        background-color: #2d2d2d;
    }

    .text-gray-500 {
        color: #a0a0a0;
    }

    .border-gray-200 {
        border-color: #404040;
    }
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.hobby-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin: 0.25rem;
    background-color: #f3f4f6;
    border-radius: 9999px;
    font-size: 0.875rem;
    color: #4b5563;
}

.dark .hobby-tag {
    background-color: #374151;
    color: #e5e7eb;
}

/* Стили для модального окна изображений */
.drag-over {
    border-color: #3b82f6 !important;
}

#imageUploadModal {
    background-color: transparent !important;
}

#imageUploadModal::before {
    content: '';
    position: fixed;
    inset: 0;
    background: transparent;
    pointer-events: none;
}

/* Добавим анимацию появления */
#imageUploadModal:not(.hidden) {
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#uploadArea {
    transition: all 0.3s ease;
}

#uploadArea:hover {
    border-color: #3b82f6;
}

.image-upload-button {
    transition: transform 0.2s ease;
}

.image-upload-button:hover {
    transform: scale(1.05);
}

.audio-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    background-color: #4CAF50;
    transition: height 0.1s ease;
}

/* Стили для модального окна звонка */
#callModal {
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
}

#callModal .bg-white {
    background-color: rgba(255, 255, 255, 0.95);
}

#callModal.dark .bg-white {
    background-color: rgba(17, 24, 39, 0.95);
}

/* Анимации для кнопок */
#callModal button {
    transition: all 0.2s ease;
}

#callModal button:hover {
    transform: scale(1.05);
}

#callModal button:active {
    transform: scale(0.95);
}

/* Анимация появления модального окна */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

#callModal:not(.hidden) > div {
    animation: slideIn 0.3s ease-out forwards;
}

/* Стили для текста */
#callModalName {
    font-size: 28px;
    font-weight: 600;
}

#callModalStatus {
    font-size: 16px;
}

/* Стили для кнопок действий */
#callModal .w-12 {
    width: 48px;
    height: 48px;
}

/* Стили для кнопок управления звонком */
#callModal .w-16 {
    width: 64px;
    height: 64px;
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    #callModal .bg-white {
        background-color: #1a1a1a;
    }
    
    #callModal .text-gray-600 {
        color: #d1d5db;
    }
    
    #callModal .bg-gray-100 {
        background-color: #374151;
    }
}

/* Modal styles */
.uk-modal {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.uk-modal-dialog {
    margin: 1rem;
    max-width: 500px;
    width: 100%;
    opacity: 0;
    transform: scale(0.95);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.uk-modal.uk-open .uk-modal-dialog {
    opacity: 1;
    transform: scale(1);
}

#invite-link {
    font-family: monospace;
    user-select: all;
    width: 100%;
}

.uk-modal-close-default {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    padding: 5px !important;
    border-radius: 50% !important;
    background: none !important;
    color: #6B7280 !important;
    transition: all 0.2s !important;
    z-index: 10 !important;
}

.uk-modal-close-default:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #374151 !important;
}

.dark .uk-modal-close-default {
    color: #9CA3AF !important;
}

.dark .uk-modal-close-default:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #F3F4F6 !important;
}

/* Добавляем анимацию для модального окна */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.uk-modal.uk-open {
    animation: modalFadeIn 0.3s ease-out forwards;
}
