/* Home Page Styles */
.home-container {
    padding:15px;
}
.headline {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding: 0 20px;
}

.tagline {
    text-align: left;
    margin-bottom: 15px;
}

.tagline p {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    padding-left: 20px;
}

.card-stack {
    position: relative;
    width: 100%;
    min-height: 500px;
    margin-bottom: 20px;
}

.card {
    background: black;
    border-radius: 20px;
    border: none;
    overflow: hidden;
    position: absolute;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    height: 500px;
}

.card-next {
    z-index: 1;
    transform: scale(0.95) translateY(10px);
    opacity: 0.8;
    box-shadow: 0 2px 10px var(--shadow);
}

.card-current {
    z-index: 2;
    transform: scale(1) translateY(0);
    box-shadow: 0 4px 20px var(--shadow);
    cursor: grab;
}

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

.card-current.slide-left {
    animation: slideLeft 0.5s ease-out forwards;
}

.card-current.slide-right {
    animation: slideRight 0.5s ease-out forwards;
}

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

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

.profile-photo {
    width: 100%;
    height: 500px;
    overflow: hidden;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: height 0.3s ease-out;
}

.profile-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    transition: height 0.3s ease-out;
}

.profile-icon {
    font-size: 120px;
    color: var(--text-muted);
    pointer-events: none;
    user-select: none;
}

.profile-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0));
    color: white;
    padding: 40px 20px 20px;
    text-align: left;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
}

.profile-name {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 8px;
}

.profile-bio {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    max-height: 4.2em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    white-space: break-spaces;
}

/* Expanded state - Tinder-style layout */
.card:has(.profile-bio.expanded) {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;  /* Firefox */
}

.card:has(.profile-bio.expanded)::-webkit-scrollbar {
    display: none;  /* Chrome, Safari */
}

.card:has(.profile-bio.closing) {
    overflow: hidden;
}

.card:has(.profile-bio.expanded) .profile-photo,
.card:has(.profile-bio.closing) .profile-photo {
    height: 350px;
    overflow: visible;
}

.card:has(.profile-bio.expanded) .profile-info,
.card:has(.profile-bio.closing) .profile-info {
    position: absolute;
    top: 100%;
    bottom: auto;
    left: 0;
    right: 0;
    margin-top: -20px;
    background: var(--bg-container-solid);
    border-radius: 20px 20px 0 0;
    padding: 24px 20px;
    pointer-events: auto;
    min-height: 150px;
}

.card:has(.profile-bio.expanded) .profile-name,
.card:has(.profile-bio.closing) .profile-name {
    color: var(--text-primary);
    font-size: 22px;
    margin-bottom: 12px;
}

.profile-bio.expanded,
.profile-bio.closing {
    max-height: none;
    overflow: visible;
    -webkit-line-clamp: unset;
    display: block;
    color: var(--text-primary);
    line-height: 1.6;
}

.card:has(.profile-bio.expanded) .bio-scroll-hint,
.card:has(.profile-bio.closing) .bio-scroll-hint {
    transform: rotate(180deg);
    top: 24px;
}

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

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.bio-scroll-hint {
    position: absolute;
    right: 20px;
    top: 40px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    pointer-events: auto;
    opacity: 0.85;
}

.bio-scroll-hint svg {
    width: 100%;
    height: 100%;
}

.bio-scroll-hint:hover {
    opacity: 1;
}

.bio-scroll-hint:active {
    transform: scale(0.95);
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 20px;
}

.btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    background: var(--bg-container);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-primary);
    gap: 2px;
}

.btn-icon {
    font-size: 28px;
    line-height: 1;
}

.btn-text {
    font-size: 10px;
    font-weight: 500;
}

.btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--shadow);
}

.btn-no {
    color: var(--text-muted);
}

.btn-yes {
    color: var(--accent-green);
    width: 115px;
    border-radius: 50px;
}

.no-profiles {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-profiles h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.no-profiles p {
    font-size: 16px;
}

/* Match Overlay */
.match-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background: rgba(0, 0, 0, 0.85);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
    overflow: hidden;
    transform: translateZ(0); /* Force GPU layer */
    -webkit-transform: translateZ(0);
}

.match-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

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

.match-text {
    color: white;
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
}

.match-profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid white;
    overflow: hidden;
    margin-bottom: 20px;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.match-profile-icon {
    font-size: 60px;
    color: var(--text-muted);
}

.match-profile-name {
    color: white;
    font-size: 24px;
    margin-bottom: 30px;
}

.match-hint {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-top: 20px;
}

/* Image Navigation */
.image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background 0.2s, opacity 0.2s;
    font-weight: bold;
}

.image-nav:hover {
    background: rgba(0, 0, 0, 0.6);
}

.image-nav.prev {
    left: 10px;
}

.image-nav.next {
    right: 10px;
}


/* Image Dots Indicator */
.image-dots {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}

.image-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: background 0.2s, transform 0.2s;
}

.image-dot.active {
    background: white;
    transform: scale(1.2);
}
