@font-face {
    font-family: 'Dream Outloud Pro';
    src: url('assets/dreaming-outloud-pro-regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

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

body {
    font-family: 'Dream Outloud Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #008f89 0%, #42AEB0 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.app-container {
    width: 100%;
    max-width: 500px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: white;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

header {
    padding: 20px;
    background: linear-gradient(to right, #4a0004, #730e04);
    color: white;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    font-family: 'Dream Outloud Pro', cursive;
    font-size: 32px;
    font-weight: normal;
}

.filter-btn {
    position: absolute;
    right: 20px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

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

.filter-btn svg {
    width: 24px;
    height: 24px;
}

.card-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

#card-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

.profile-card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    cursor: grab;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.profile-card.swiping {
    transition: none;
}

.profile-card.swipe-left {
    animation: swipeLeft 0.5s ease-out forwards;
}

.profile-card.swipe-right {
    animation: swipeRight 0.5s ease-out forwards;
}

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

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

.card-panels {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.3s ease;
}

.card-panel {
    min-width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.panel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panel-text {
    width: 100%;
    height: 100%;
    padding: 40px 30px;
    background: linear-gradient(135deg, #008f89 0%, #42AEB0 100%);
    color: white;
    overflow-y: auto;
}

.panel-text h2 {
    font-family: 'Dream Outloud Pro', cursive;
    font-size: 36px;
    margin-bottom: 20px;
    font-weight: normal;
}

.panel-text p {
    font-size: 18px;
    line-height: 1.6;
    white-space: pre-line;
}

.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    color: white;
    pointer-events: none;
}

.card-info h2 {
    font-family: 'Dream Outloud Pro', cursive;
    font-size: 36px;
    margin-bottom: 5px;
    font-weight: normal;
}

.card-info .age {
    font-size: 24px;
    font-weight: 300;
}

.panel-indicators {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    display: flex;
    gap: 5px;
    padding: 0 10px;
    pointer-events: none;
}

.panel-indicator {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.panel-indicator.active {
    background: rgba(255, 255, 255, 0.9);
}

.panel-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    z-index: 10;
    cursor: pointer;
}

.panel-nav-left {
    left: 0;
}

.panel-nav-right {
    right: 0;
}

.swipe-indicator {
    font-family: 'Dream Outloud Pro', cursive;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    font-weight: normal;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    padding: 10px 30px;
    border: 5px solid;
    border-radius: 10px;
}

.swipe-indicator.like {
    right: 20px;
    color: #008f89;
    border-color: #008f89;
}

.swipe-indicator.dislike {
    left: 20px;
    color: #FF0000;
    border-color: #FF0000;
}

.swipe-indicator.visible {
    opacity: 1;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 30px;
    background: white;
}

.btn {
    width: 70px;
    height: 70px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.btn:active {
    transform: scale(0.95);
}

.btn svg {
    width: 30px;
    height: 30px;
}

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

.btn-like {
    background: #008f89;
    color: white;
}

.no-more-cards {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #333;
    text-align: center;
    padding: 40px;
}

.no-more-cards h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.no-more-cards p {
    font-size: 16px;
    margin-bottom: 20px;
}

.clear-filters-btn {
    background: #008f89;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 143, 137, 0.3);
}

.clear-filters-btn:hover {
    background: #006f69;
    transform: scale(1.05);
}

/* Match Modal */
.match-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 143, 137, 0.95) 0%, rgba(66, 174, 176, 0.95) 100%);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.match-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

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

.match-content {
    text-align: center;
    color: white;
    padding: 40px;
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.match-celebration h1 {
    font-family: 'Dream Outloud Pro', cursive;
    font-size: 56px;
    margin-bottom: 20px;
    font-weight: normal;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.match-emoji {
    font-size: 80px;
    margin: 30px 0;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.match-celebration p {
    font-size: 24px;
    margin-bottom: 40px;
}

.match-celebration p span {
    font-family: 'Dream Outloud Pro', cursive;
    font-size: 28px;
    font-weight: bold;
}

.match-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 300px;
    margin: 0 auto;
}

.contact-btn {
    background: white;
    color: #008f89;
    text-decoration: none;
    padding: 18px 40px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: block;
}

.contact-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.keep-swiping-btn {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.keep-swiping-btn:hover {
    background: white;
    color: #008f89;
}

/* Filter Modal */
.filter-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.filter-modal.active {
    display: flex;
}

.filter-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(to right, #4a0004, #730e04);
    color: white;
}

.filter-header h2 {
    font-family: 'Dream Outloud Pro', cursive;
    font-size: 28px;
    font-weight: normal;
    margin: 0;
}

.close-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn svg {
    width: 24px;
    height: 24px;
}

.filter-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.filter-section {
    margin-bottom: 30px;
}

.filter-section > label {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 15px;
}

.location-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.status-indicator {
    font-size: 20px;
    line-height: 1;
}

.status-indicator.status-active {
    color: #4CAF50;
    animation: pulse-dot 2s ease-in-out infinite;
}

.status-indicator.status-inactive {
    color: #999;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.status-text {
    font-weight: 500;
    color: #333;
}

.distance-display {
    font-family: 'Dream Outloud Pro', cursive;
    font-size: 32px;
    color: #008f89;
    text-align: center;
    margin-bottom: 15px;
}

.distance-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 15px;
}

.distance-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #008f89;
    cursor: pointer;
}

.distance-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #008f89;
    cursor: pointer;
    border: none;
}

.location-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.location-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.location-input:focus {
    outline: none;
    border-color: #008f89;
}

.search-location-btn {
    background: #008f89;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.search-location-btn:hover {
    background: #006f69;
    transform: translateY(-2px);
}

.search-location-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.location-buttons {
    display: flex;
    gap: 10px;
}

.use-location-btn,
.clear-location-btn {
    flex: 1;
    background: linear-gradient(135deg, #008f89 0%, #42AEB0 100%);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-location-btn {
    background: #e74c3c;
}

.use-location-btn:hover,
.clear-location-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 143, 137, 0.3);
}

.clear-location-btn:hover {
    background: #c0392b;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

.use-location-btn:disabled,
.clear-location-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.filter-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: #008f89;
}

.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 20px;
    transition: all 0.2s;
}

.radio-label:hover {
    border-color: #008f89;
    background: #f0f9f9;
}

.radio-label input[type="radio"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #008f89;
}

.radio-label input[type="radio"]:checked + span {
    font-weight: 600;
    color: #008f89;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: #f0f9f9;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 20px;
    height: 20px;
    accent-color: #008f89;
}

.checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #008f89;
}

.filter-footer {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f5f5f5;
}

.filter-action-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-btn {
    background: white;
    color: #666;
    border: 2px solid #ddd;
}

.reset-btn:hover {
    background: #f5f5f5;
}

.apply-btn {
    background: #008f89;
    color: white;
}

.apply-btn:hover {
    background: #006f69;
}

@media (max-width: 600px) {
    .app-container {
        max-width: 100%;
        height: 100vh;
    }
}
