:root {
    --primary: #ff3366;
    --primary-dark: #e61e4d;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
        Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.menu-toggle {
    display: none;
}

/* Main Content */
main {
    margin-top: 4rem;
    padding: 1rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* Card Styles */
.card-container {
    max-width: 400px;
    margin: 0 auto;
}

.card {
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-image {
    height: 400px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info {
    padding: 1.5rem;
}

.card-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.location {
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.card-actions {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
}

.action-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.action-btn:hover {
    transform: scale(1.1);
}

.dislike {
    background: var(--white);
    color: var(--gray-500);
    border: 2px solid var(--gray-300);
}

.like {
    background: var(--primary);
    color: var(--white);
}

/* Chat Styles */
.chat-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1rem;
    height: calc(100vh - 6rem);
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
}

.chat-list {
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.chat-item:hover,
.chat-item.active {
    background-color: var(--gray-100);
}

.chat-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-info {
    flex: 1;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.message {
    max-width: 70%;
    margin-bottom: 1rem;
}

.message p {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
}

.received p {
    background: var(--gray-100);
}

.sent {
    margin-left: auto;
}

.sent p {
    background: var(--primary);
    color: var(--white);
}

.message-input {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
}

.message-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    outline: none;
}

.message-input button {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
}

/* Credits Page */
.credits-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.credit-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.package {
    background: var(--white);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.popular {
    border: 2px solid var(--primary);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    padding: 0.25rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
}

.package h3 {
    margin-bottom: 1rem;
}

.price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.package ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.package li {
    margin-bottom: 0.5rem;
    color: var(--gray-600);
}

.buy-credits {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.buy-credits:hover {
    background: var(--primary-dark);
}

/* Profile Page */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 1rem;
    padding: 2rem;
}

.profile-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-image {
    position: relative;
    width: 150px;
    height: 150px;
}

.profile-image img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.edit-image {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.section {
    margin-bottom: 2rem;
}

.section h3 {
    margin-bottom: 1rem;
}

textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    resize: vertical;
}

.interests-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--gray-100);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

.add-tag {
    background: var(--white);
    border: 1px dashed var(--gray-300);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    cursor: pointer;
}

.save-profile {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
    }

    .menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: var(--gray-600);
        margin: 5px 0;
        transition: 0.3s;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .chat-container {
        grid-template-columns: 1fr;
    }

    .chat-list {
        display: none;
    }

    .chat-list.active {
        display: block;
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 100%;
        background: var(--white);
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}