/* Dating Page Styles */

.dating-container {
    padding: 16px;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
}

/* Filters */
.dating-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    justify-content: center;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid var(--border);
    background: var(--bg-white);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* Cards Stack */
.cards-stack {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

.loading-state {
    text-align: center;
    color: var(--text-secondary);
}

.loading-state p {
    margin-top: 16px;
    font-size: 14px;
}

/* Dating Card */
.dating-card {
    position: absolute;
    width: 100%;
    max-width: 400px;
    height: 580px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    cursor: grab;
    transition: transform 0.3s ease, opacity 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
}

.dating-card:active {
    cursor: grabbing;
}

.dating-card.dragging {
    transition: none;
}

.dating-card.swipe-left {
    animation: swipeLeft 0.3s ease-out forwards;
}

.dating-card.swipe-right {
    animation: swipeRight 0.3s ease-out forwards;
}

.dating-card.swipe-up {
    animation: swipeUp 0.4s ease-out forwards;
}

@keyframes swipeLeft {
    to {
        transform: translateX(-150%) rotate(-30deg);
        opacity: 0;
    }
}

@keyframes swipeRight {
    to {
        transform: translateX(150%) rotate(30deg);
        opacity: 0;
    }
}

@keyframes swipeUp {
    to {
        transform: translateY(-150%) scale(1.1);
        opacity: 0;
    }
}

/* Card Photo */
.card-photo {
    width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120px;
}

/* Card Overlay */
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 24px;
    color: white;
}

.card-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.card-age {
    font-size: 24px;
    opacity: 0.9;
}

.card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    opacity: 0.9;
    font-size: 14px;
}

.card-location svg {
    width: 16px;
    height: 16px;
}

.card-bio {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.95;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Swipe Indicators */
.swipe-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 80px;
    font-weight: 900;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.swipe-indicator.like {
    right: 30px;
    color: #00C853;
}

.swipe-indicator.dislike {
    left: 30px;
    color: #FF3B30;
}

.swipe-indicator.superlike {
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #2196F3;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 24px 0;
}

.action-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.action-btn:active {
    transform: scale(0.95);
}

.dislike-btn {
    color: #FF3B30;
}

.like-btn {
    color: #00C853;
    width: 76px;
    height: 76px;
}

.superlike-btn {
    color: #2196F3;
}

/* Match Badge */
.icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--border);
}

.icon-btn svg {
    color: var(--text);
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #FF3B30;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Matches List */
#matchesList {
    padding: 16px;
}

.match-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: var(--bg-white);
    border-radius: var(--radius);
    margin-bottom: 12px;
    transition: var(--transition);
}

.match-card-content {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    flex: 1;
}

.match-card-content:hover {
    opacity: 0.8;
}

.match-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.match-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.match-info {
    flex: 1;
}

.match-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

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

.match-arrow {
    color: var(--text-secondary);
}

.match-chat-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.match-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,136,204,0.4);
}

.match-chat-btn:active {
    transform: translateY(0);
}

/* Match Found Modal */
.match-found-content {
    position: relative;
    background: white;
    border-radius: var(--radius);
    padding: 40px 24px;
    max-width: 400px;
    margin: auto;
    text-align: center;
    animation: matchFoundPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes matchFoundPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.match-found-header h1 {
    font-size: 32px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.match-found-photos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 24px 0;
}

.match-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.match-photo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.match-heart {
    font-size: 48px;
    animation: heartBeat 1s ease-in-out infinite;
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 127, 0.7);
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 0 0 10px rgba(255, 0, 127, 0);
    }
}

@keyframes fireworkParticle {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(
            calc(var(--end-x) - var(--start-x, 0px)),
            calc(var(--end-y) - var(--start-y, 0px))
        ) scale(0);
        opacity: 0;
    }
}

@keyframes fireworkEmoji {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(0);
        opacity: 0;
    }
    20% {
        opacity: 1;
        transform: translate(0, -100px) rotate(var(--rotation, 0deg)) scale(1);
    }
    100% {
        transform: translate(
            calc(var(--end-x) - var(--start-x, 0px)),
            calc(var(--end-y) - var(--start-y, 0px))
        ) rotate(var(--rotation, 0deg)) scale(0);
        opacity: 0;
    }
}

.match-found-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.match-found-actions {
    display: flex;
    gap: 12px;
}

.btn-secondary {
    flex: 1;
    padding: 12px 24px;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    background: white;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
}

.btn-submit {
    flex: 1;
    padding: 12px 24px;
    border-radius: var(--radius);
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Empty State */
.empty-matches {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-matches svg {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-matches h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text);
}

.empty-matches p {
    font-size: 14px;
}

/* No More Cards */
.no-more-cards {
    text-align: center;
    padding: 40px 20px;
}

.no-more-cards svg {
    width: 100px;
    height: 100px;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.no-more-cards h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.no-more-cards p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.btn-reload {
    padding: 12px 32px;
    border-radius: var(--radius);
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reload:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Responsive */
@media (max-width: 480px) {
    .dating-card {
        height: 520px;
    }
    
    .action-btn {
        width: 56px;
        height: 56px;
    }
    
    .like-btn {
        width: 68px;
        height: 68px;
    }
}

/* ============================================ */
/* PROFILE SETUP STYLES */
/* ============================================ */

.profile-setup-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}

/* Progress Bar */
.setup-progress {
    margin-bottom: 24px;
}

.progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    width: 25%;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Setup Form */
.setup-form {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.setup-step {
    display: none;
}

.setup-step.active {
    display: block;
    animation: fadeSlideIn 0.3s ease;
}

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

.setup-step h2 {
    font-size: 24px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Location Section */
.location-section {
    margin-bottom: 20px;
}

.location-label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 14px;
}

.location-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.location-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    background: white;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.location-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.location-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.selected-location {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    font-size: 14px;
}

.selected-location svg {
    color: var(--success);
    flex-shrink: 0;
}

/* Interests Grid */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.interest-tag {
    padding: 10px 16px;
    border-radius: 20px;
    border: 2px solid var(--border);
    background: white;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.interest-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.interest-tag.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* Character Counter */
.char-counter {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Button Groups */
.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-back {
    flex: 1;
    padding: 14px 24px;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    background: white;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-back:hover {
    background: var(--bg-secondary);
}

.btn-next {
    flex: 2;
    padding: 14px 24px;
    border-radius: var(--radius);
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-submit {
    flex: 2;
    padding: 14px 24px;
    border-radius: var(--radius);
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-submit .btn-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.btn-submit .btn-loading .loading {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* Map Center Marker */
.map-center-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    z-index: 1000;
    pointer-events: none;
}

/* Photo Grid for Setup */
.setup-step .photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.setup-step .photo-item {
    aspect-ratio: 1;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}

.setup-step .photo-add-btn {
    aspect-ratio: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-secondary);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.setup-step .photo-add-btn:hover {
    border-color: var(--primary);
    background: var(--bg);
}

.setup-step .photo-add-btn svg {
    width: 32px;
    height: 32px;
    stroke: var(--text-secondary);
}

.setup-step .photo-add-btn span {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .location-buttons {
        flex-direction: column;
    }
    
    .interests-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-back,
    .btn-next,
    .btn-submit {
        flex: 1;
    }
}

/* Profile View Modal */
.profile-view-content {
    background: var(--bg);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

.profile-view-photos {
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
}

.profile-view-photos img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-slider {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}

.profile-photo-slider img {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.photo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: var(--transition);
}

.photo-dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

.profile-view-info {
    padding: 24px;
}

.profile-view-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.profile-view-header h2 {
    font-size: 28px;
    margin: 0;
}

.profile-view-header span {
    font-size: 24px;
    color: var(--text-secondary);
}

.profile-view-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.profile-view-tag {
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-radius: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-view-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.profile-view-section:last-of-type {
    border-bottom: none;
}

.profile-view-section h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-view-section p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.profile-view-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-interest-tag {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 14px;
}

.btn-telegram {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    transition: var(--transition);
}

.btn-telegram:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,136,204,0.3);
}

.btn-telegram:active {
    transform: translateY(0);
}

/* Mobile Responsive - Small screens */
@media (max-width: 480px) {
    .dating-container {
        padding: 12px;
    }
    
    .dating-card-stack {
        height: calc(100vh - 280px);
        min-height: 400px;
    }
    
    .dating-card {
        max-width: 100%;
        height: auto;
        aspect-ratio: 3/4;
    }
    
    .card-photo {
        border-radius: 16px;
    }
    
    .card-overlay {
        padding: 16px;
    }
    
    .card-name {
        font-size: 24px;
    }
    
    .card-age {
        font-size: 20px;
    }
    
    .card-location, .card-bio {
        font-size: 14px;
    }
    
    .action-buttons {
        gap: 12px;
        padding: 16px 12px;
    }
    
    .action-btn {
        width: 56px;
        height: 56px;
    }
    
    .action-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .action-btn.dislike {
        width: 50px;
        height: 50px;
    }
    
    .action-btn.like {
        width: 50px;
        height: 50px;
    }
    
    .profile-view-photos {
        height: 300px;
    }
    
    .profile-view-header h2 {
        font-size: 24px;
    }
}

/* Extra small screens */
@media (max-width: 375px) {
    .dating-card-stack {
        height: calc(100vh - 260px);
        min-height: 350px;
    }
    
    .card-name {
        font-size: 20px;
    }
    
    .card-age {
        font-size: 18px;
    }
    
    .card-location, .card-bio {
        font-size: 13px;
    }
    
    .action-buttons {
        gap: 8px;
        padding: 12px 8px;
    }
    
    .action-btn {
        width: 50px;
        height: 50px;
    }
    
    .action-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .action-btn.dislike {
        width: 44px;
        height: 44px;
    }
    
    .action-btn.like {
        width: 44px;
        height: 44px;
    }
    
    .action-btn.superlike {
        width: 48px;
        height: 48px;
    }
}

