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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #fcf0ff 0%, #e8eaff 100%);
    color: #333;
    min-height: 100vh;
}

.main-nav {
    background: white;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: #ff4d8d;
}

.nav-links {
    display: flex;
    gap: 10px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link.active {
    background: #ff4d8d;
    color: white;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.filters-container {
    margin-bottom: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    background: #f8f8f8;
}

.filters-header h3 {
    margin: 0;
    font-size: 16px;
    color: #666;
}

.toggle-filters {
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.toggle-filters.collapsed {
    transform: rotate(-90deg);
}

.filters {
    padding: 20px;
    transition: max-height 0.3s ease;
    max-height: 500px;
    overflow: hidden;
}

.filters.collapsed {
    max-height: 0;
    padding: 0 20px;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group h3 {
    margin-bottom: 10px;
    font-size: 16px;
    color: #666;
}

.filter-btn {
    padding: 8px 16px;
    margin-right: 8px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: #ff4d8d;
    color: white;
    border-color: #ff4d8d;
}

.card-container {
    height: 450px;
    position: relative;
    margin-bottom: 30px;
    touch-action: none;
    perspective: 1000px;
    overflow: visible;
}

.card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(.13,.76,.26,.98), box-shadow 0.3s ease;
    touch-action: none;
    user-select: none;
    cursor: grab;
    will-change: transform;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    overflow: hidden;
}

.card[data-index="2"] {
    transform: translate(0, 8px) scale(0.92);
    z-index: 1;
    pointer-events: none; /* Prevent interaction with back cards */
}

.card[data-index="1"] {
    transform: translate(0, 4px) scale(0.96);
    z-index: 2;
    pointer-events: none; /* Prevent interaction with back cards */
}

.card[data-index="0"] {
    transform: translate(0, 0) scale(1);
    z-index: 3;
}

.card:active {
    cursor: grabbing;
}

.card.swiping {
    transition: box-shadow 0.3s ease; /* Allow transform to be controlled by JS but keep box-shadow transition */
}

.card.fly-left {
    transform: translate(-200%, 80px) rotate(-30deg) !important;
    pointer-events: none;
}

.card.fly-right {
    transform: translate(200%, 80px) rotate(30deg) !important;
    pointer-events: none;
}

.card.male {
    background: linear-gradient(135deg, #f6fcff 0%, #e0edff 100%);
}

.card.female {
    background: linear-gradient(135deg, #fff0f8 0%, #ffddf3 100%);
}

.card-content {
    text-align: center;
    padding: 40px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    padding: 15px 30px 25px;
}

.card-action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.card-action-btn.dislike {
    background: white;
    color: #666;
}

.card-action-btn.dislike i {
    font-size: 22px;
}

.card-action-btn.like {
    background: #ff4d8d;
    color: white;
}

.card-action-btn.like i {
    font-size: 18px;
}

.name {
    font-size: 38px;
    margin-bottom: 15px;
    color: #333;
}

.name-day {
    font-size: 18px;
    color: #666;
    margin-bottom: 5px;
}

.calendar-type {
    font-size: 14px;
    color: #888;
}

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

.action-btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.dislike {
    background: white;
    color: #666;
}

.dislike i {
    font-size: 26px;
}

.like {
    background: #ff4d8d;
    color: white;
}

.like i {
    font-size: 22px;
}

.favorites-page {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.favorites-page h2 {
    margin-bottom: 25px;
    color: #333;
}

.favorites-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.favorite-item {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.favorite-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.favorite-item.male {
    background: linear-gradient(135deg, #f6fcff 0%, #e0edff 100%);
}

.favorite-item.female {
    background: linear-gradient(135deg, #fff0f8 0%, #ffddf3 100%);
}

.remove-favorite {
    cursor: pointer;
    color: #ff4d8d;
    font-weight: bold;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.remove-favorite:hover {
    background-color: rgba(255, 77, 141, 0.1);
}

/* AdSense Container Styles */
.ad-container {
    margin-top: 30px;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    min-height: 150px;
}

.ad-label {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Mobile styles */
@media (max-width: 768px) {
    .main-nav {
        flex-direction: row;
        gap: 10px;
        padding: 0.8rem;
    }
    
    .nav-links {
        width: auto;
        justify-content: flex-end;
    }
    
    .container {
        padding: 15px;
    }
    
    .card-container {
        height: 400px;
    }
    
    .name {
        font-size: 32px;
    }
    
    .name-day {
        font-size: 16px;
    }
    
    .favorites-list {
        grid-template-columns: 1fr;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .action-btn {
        width: 55px;
        height: 55px;
        font-size: 20px;
    }
    
    .emoji-reactions {
        width: 100%;
    }
    
    .ad-container {
        padding: 10px;
        margin-top: 20px;
        min-height: 100px;
    }
}