@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-blue: #3b82f6;
    --primary-red: #ef4444;
    --primary-green: #22c55e;
    --bg-dark: #1a1a2e;
    --bg-card: #16213e;
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
    --gradient-blue: linear-gradient(135deg, #3b82f6, #1d4ed8);
    --gradient-red: linear-gradient(135deg, #ef4444, #dc2626);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
}

.navbar {
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.95) 0%, rgba(26, 26, 46, 0.8) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    color: var(--text-muted) !important;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
    border-radius: 20px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-light) !important;
    background: rgba(59, 130, 246, 0.2);
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.card-stack-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

.card-stack {
    position: relative;
    height: 500px;
}

.card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, opacity 0.3s ease;
    cursor: grab;
}

.card:active {
    cursor: grabbing;
}

.card.overlay-like {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(34, 197, 94, 0.8));
}

.card.overlay-pass {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.8), rgba(220, 38, 38, 0.8));
}

.card-photo {
    position: relative;
    width: 100%;
    height: 100%;
}

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

.card-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(22, 33, 62, 1), transparent);
}

.card-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    color: white;
}

.card-info h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.card-info p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.degree-badge {
    display: inline-block;
    background: var(--gradient-blue);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 10px;
}

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

.btn-swipe {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.btn-swipe:hover {
    transform: scale(1.1);
}

.btn-pass {
    background: var(--gradient-red);
    color: white;
}

.btn-like {
    background: var(--gradient-blue);
    color: white;
}

.btn-superlike {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.degree-indicator {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px;
}

.match-item {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.match-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.match-item img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.match-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.match-info span {
    font-size: 0.8rem;
    color: var(--primary-blue);
}

.chat-container {
    display: flex;
    height: calc(100vh - 200px);
    min-height: 500px;
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
}

.conversations-list {
    width: 250px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    cursor: pointer;
    transition: background 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.conversation-item:hover {
    background: rgba(59, 130, 246, 0.2);
}

.conversation-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-question {
    background: var(--gradient-blue);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.message {
    max-width: 70%;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
}

.message.sent {
    margin-left: auto;
    background: var(--primary-blue);
}

.question-message {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid var(--primary-blue);
}

.questions-panel {
    position: absolute;
    right: 0;
    top: 60px;
    bottom: 70px;
    width: 300px;
    background: var(--bg-dark);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    overflow-y: auto;
}

.questions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.question-item {
    margin-bottom: 15px;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 10px;
}

.question-text {
    font-weight: 500;
    margin-bottom: 10px;
}

.question-options {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.question-options button {
    font-size: 0.8rem;
}

.chat-input {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    outline: none;
}

.chat-input input::placeholder {
    color: var(--text-muted);
}

.btn-send {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: var(--gradient-blue);
    color: white;
    cursor: pointer;
}

.profile-card {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    background: var(--bg-card);
    border-radius: 20px;
    text-align: center;
}

.profile-photo {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-blue);
}

.btn-photo-upload {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--gradient-blue);
    color: white;
    cursor: pointer;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
}

.stat {
    text-align: center;
}

.stat span {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.match-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ef4444, #3b82f6);
    padding: 30px 50px;
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    z-index: 1000;
    animation: matchPulse 0.5s ease;
}

@keyframes matchPulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.modal-content {
    background: var(--bg-card);
    border: none;
    border-radius: 20px;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-tabs .nav-link {
    color: var(--text-muted) !important;
    border: none;
}

.nav-tabs .nav-link.active {
    color: var(--primary-blue) !important;
    background: transparent;
    border-bottom: 2px solid var(--primary-blue);
}

.form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 10px;
    padding: 12px 15px;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-blue);
    color: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.btn-primary {
    background: var(--gradient-blue);
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 500;
}

.btn-success {
    background: var(--gradient-blue);
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 500;
}

.btn-outline-danger {
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    padding: 10px 30px;
    border-radius: 25px;
}

.btn-outline-danger:hover {
    background: var(--primary-red);
    color: white;
}

@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
    }

    .conversations-list {
        width: 100%;
        height: 100px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .questions-panel {
        position: fixed;
        right: 0;
        left: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        height: 50vh;
    }
}