.swipe-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 600px;
    margin: 0 auto;
    perspective: 1000px;
}

.profile-card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease;
    transform-origin: center bottom;
}

.profile-card img {
    width: 100%;
    height: 45%;
    object-fit: cover;
    display: block;
}

.profile-info {
    padding: 15px;
    height: 55%;
    display: flex;
    flex-direction: column;
}

.profile-info h3 {
    margin: 0 0 6px;
    font-size: 1.5em;
    color: #333;
}
.profile-seeking{font-size:.9em;color:#6b7280;margin-bottom:8px}

.profile-details {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.profile-detail {
    display: flex;
    align-items: center;
    margin-right: 15px;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #555;
}

.profile-detail i {
    margin-right: 5px;
    color: #888;
}

.profile-bio {
    flex-grow: 1;
    overflow: hidden;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.profile-bio p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.swipe-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 16px;
    position: relative;
    z-index: 10;
}

.swipe-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.swipe-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.dislike-btn {
    background: #ff6b6b;
    color: white;
}

.like-btn {
    background: #10b981;
    color: white;
}

.sp-notice {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 20px 0;
    color: #495057;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-size: 1.2em;
    color: #666;
}

/* Stacked swipe cards */
#card-stack {position:relative;width:100%;height:100%}
.profile-card.top{z-index:3;transform:translateY(0) scale(1)}
.profile-card.mid{z-index:2;transform:translateY(8px) scale(.975);opacity:.98}
.profile-card.back{z-index:1;transform:translateY(16px) scale(.95);opacity:.95}

/* Discover styles */
.sp-discover-list{max-width:720px;margin:20px auto;display:grid;grid-template-columns:1fr;gap:16px}
.sp-discover-card{display:flex;gap:14px;background:#fff;border-radius:14px;box-shadow:0 4px 15px rgba(0,0,0,.08);padding:12px;align-items:flex-start}
.sp-avatar{width:84px;height:84px;border-radius:12px;object-fit:cover}
.sp-meta h3{margin:.25rem 0 .5rem;font-size:1.1rem}
.sp-actions{display:flex;gap:8px;margin-bottom:.5rem}
.sp-actions .sp-accept,.sp-actions .sp-reject{border:none;border-radius:10px;padding:8px 12px;cursor:pointer;box-shadow:0 2px 6px rgba(0,0,0,.08)}
.sp-actions .sp-accept{background:#10b981;color:#fff}
.sp-actions .sp-reject{background:#ef4444;color:#fff}
.sp-social{display:flex;flex-direction:column;gap:6px}
.sp-social-link{display:inline-flex;align-items:center;gap:6px;text-decoration:none}
.sp-hidden{opacity:.7;font-style:italic}

/* Friends page modern layout */
.sp-friends-grid{display:flex;flex-direction:column;gap:16px;max-width:920px;margin:10px auto}
.sp-friend-row{display:flex;gap:16px;background:#fff;border-radius:16px;box-shadow:0 8px 24px rgba(0,0,0,.06);padding:12px;align-items:center}
.sp-friend-photo-wrap{flex:0 0 300px;max-width:300px;border-radius:14px;overflow:hidden}
.sp-friend-photo{width:100%;height:200px;object-fit:cover;display:block}
.sp-friend-panel{flex:1;display:flex;flex-direction:column;gap:10px}
.sp-friend-name{margin:.25rem 0 .5rem;font-size:22px;color:#1f2937}
.sp-friend-buttons{display:flex;flex-direction:column;gap:10px;max-width:360px}
.sp-btn{display:flex;align-items:center;justify-content:center;height:40px;border-radius:10px;text-decoration:none;font-weight:600;box-shadow:0 3px 10px rgba(0,0,0,.08);}
.sp-btn-wa{background:#10b981;color:#fff}
.sp-btn-msg{background:#635bff;color:#fff}
.sp-disabled{opacity:.45;pointer-events:none}
.sp-social-row{display:flex;gap:10px;margin-top:4px}
.sp-icon{width:52px;height:40px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;background:#fff;border:1px solid #e5e7eb;box-shadow:0 3px 10px rgba(0,0,0,.06);transition:transform .12s ease, box-shadow .12s ease}
.sp-icon svg{width:22px;height:22px;display:block}
/* Instagram gradient brand pill */
.sp-icon-ig{color:#fff; background: linear-gradient(45deg,#feda75 0%,#fa7e1e 25%,#d62976 50%,#962fbf 75%,#4f5bd5 100%); border-color:transparent}
.sp-icon-tk{background:#0a0a0a;color:#fff;border-color:#0a0a0a}
.sp-icon:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(0,0,0,.1)}
.sp-icon.sp-disabled{opacity:.45;filter:grayscale(100%);pointer-events:none}

/* Responsive */
@media (max-width:768px){
  .sp-friend-row{flex-direction:column;align-items:stretch}
  .sp-friend-photo-wrap{flex:none;max-width:100%}
  .sp-friend-photo{height:220px}
  .sp-friend-buttons{max-width:none}
}

@media (max-width: 480px) {
    .swipe-container {
        height: 65vh;
        max-width: 90%;
    }
    
    .profile-info h3 {
        font-size: 1.2em;
    }
    
    .profile-detail {
        font-size: 0.85em;
    }
    
    .profile-bio {
        font-size: 0.85em;
    }
    
    .swipe-btn {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}
