/* BADLOVE Dating App Styles */

:root {
    --color-black: #000000;
    --color-black-light: #0a0a0a;
    --color-gold: #FFD700;
    --color-gold-dark: #FFA500;
    --color-purple: #9333EA;
    --color-purple-light: #7C3AED;
    --color-gray-dark: #1a1a1a;
    --color-gray: #2a2a2a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--color-black) 0%, var(--color-black-light) 100%);
    color: white;
    overflow-x: hidden;
}

/* Custom Text Colors */
.text-gold {
    color: var(--color-gold);
}

.text-purple {
    color: var(--color-purple);
}

/* ============================================================================
   COIN BALANCE
   ============================================================================ */

#coin-balance {
    background: linear-gradient(135deg, var(--color-gray-dark) 0%, var(--color-gray) 100%);
    border: 2px solid var(--color-gold);
    border-radius: 50px;
    padding: 12px 32px;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
    display: inline-flex;
    animation: pulse-glow 2s ease-in-out infinite;
}

#coin-amount {
    transition: transform 0.3s ease, color 0.3s ease;
}

/* Balance Change Animations */
#coin-amount.balance-increase {
    animation: balanceIncrease 0.8s ease-out;
    color: #4ade80;
}

#coin-amount.balance-decrease {
    animation: balanceDecrease 0.8s ease-out;
    color: #ef4444;
}

@keyframes balanceIncrease {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: #4ade80; }
    100% { transform: scale(1); color: var(--color-gold); }
}

@keyframes balanceDecrease {
    0% { transform: scale(1); }
    50% { transform: scale(0.8); color: #ef4444; }
    100% { transform: scale(1); color: var(--color-gold); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 4px 30px rgba(255, 215, 0, 0.5); }
}

.coin-icon {
    font-size: 28px;
    animation: coin-spin 3s linear infinite;
}

@keyframes coin-spin {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

/* ============================================================================
   SWIPE CARDS
   ============================================================================ */

.swipe-card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-gray-dark) 0%, var(--color-gray) 100%);
    border: 2px solid var(--color-purple);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(147, 51, 234, 0.4);
    cursor: grab;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.swipe-card:hover {
    box-shadow: 0 15px 50px rgba(147, 51, 234, 0.6);
    transform: translateY(-5px);
}

.swipe-card:active {
    cursor: grabbing;
}

.swipe-card-image {
    width: 100%;
    height: 70%;
    object-fit: cover;
    border-bottom: 2px solid var(--color-purple);
}

.swipe-card-info {
    padding: 20px;
    background: linear-gradient(to top, var(--color-black) 0%, transparent 100%);
}

.swipe-card-name {
    font-size: 24px;
    font-weight: bold;
    color: var(--color-gold);
    margin-bottom: 8px;
}

.swipe-card-bio {
    font-size: 14px;
    color: #ccc;
    line-height: 1.4;
}

/* Swipe Animation */
.swipe-left {
    animation: swipeLeft 0.5s ease-out forwards;
}

.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;
    }
}

/* ============================================================================
   BOTTOM NAVIGATION
   ============================================================================ */

#bottom-nav {
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(147, 51, 234, 0.3);
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 12px;
    min-width: 70px;
}

.nav-tab:hover {
    color: var(--color-purple-light);
    background: rgba(147, 51, 234, 0.1);
}

.nav-tab.active {
    color: var(--color-gold);
}

.nav-tab.active i {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px var(--color-gold));
}

.nav-tab i {
    transition: all 0.3s ease;
}

/* ============================================================================
   PAGE CONTENT
   ============================================================================ */

.page-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.page-content.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.page-content.hidden {
    display: none;
}

/* ============================================================================
   DISCOVER GRID
   ============================================================================ */

.discover-card {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: linear-gradient(135deg, var(--color-gray-dark) 0%, var(--color-gray) 100%);
    border: 2px solid var(--color-purple);
}

.discover-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(147, 51, 234, 0.5);
}

.discover-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discover-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    padding: 12px;
}

.discover-card-name {
    font-size: 16px;
    font-weight: bold;
    color: var(--color-gold);
    margin-bottom: 2px;
}

.discover-card-age {
    font-size: 14px;
    color: #ccc;
}

/* ============================================================================
   MESSAGES LIST
   ============================================================================ */

.message-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, var(--color-gray-dark) 0%, var(--color-gray) 100%);
    border: 1px solid var(--color-purple);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.message-item:hover {
    background: linear-gradient(135deg, var(--color-gray) 0%, var(--color-gray-dark) 100%);
    border-color: var(--color-gold);
    transform: translateX(4px);
}

.message-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-purple);
}

.message-content {
    flex: 1;
}

.message-username {
    font-size: 16px;
    font-weight: bold;
    color: var(--color-gold);
    margin-bottom: 4px;
}

.message-preview {
    font-size: 14px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-time {
    font-size: 12px;
    color: #666;
}

.message-unread-badge {
    background: var(--color-gold);
    color: black;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 12px;
}

/* ============================================================================
   PROFILE PAGE
   ============================================================================ */

.profile-avatar-container {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--color-gold);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4);
}

.profile-info-card {
    background: linear-gradient(135deg, var(--color-gray-dark) 0%, var(--color-gray) 100%);
    border: 2px solid var(--color-purple);
    border-radius: 16px;
    padding: 20px;
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(147, 51, 234, 0.3);
}

.profile-info-row:last-child {
    border-bottom: none;
}

.profile-info-label {
    color: #999;
    font-size: 14px;
}

.profile-info-value {
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.profile-action-btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.profile-action-btn.primary {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    color: black;
}

.profile-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.5);
}

.profile-action-btn.secondary {
    background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-purple-light) 100%);
    color: white;
}

.profile-action-btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(147, 51, 234, 0.5);
}

/* ============================================================================
   MODALS
   ============================================================================ */

#error-modal {
    backdrop-filter: blur(10px);
}

#error-modal > div {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================================================
   LOADING ANIMATION
   ============================================================================ */

.loading-spinner {
    border: 3px solid var(--color-gray);
    border-top: 3px solid var(--color-gold);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.gradient-gold {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
}

.gradient-purple {
    background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-purple-light) 100%);
}

.border-gold {
    border-color: var(--color-gold);
}

.border-purple {
    border-color: var(--color-purple);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 640px) {
    #coin-balance {
        padding: 10px 24px;
        font-size: 18px;
    }
    
    .coin-icon {
        font-size: 24px;
    }
    
    #card-stack {
        height: 500px;
    }
    
    .swipe-card-name {
        font-size: 20px;
    }
    
    .swipe-card-bio {
        font-size: 12px;
    }
    
    .nav-tab {
        min-width: 60px;
        padding: 6px 12px;
    }
    
    .nav-tab i {
        font-size: 20px;
    }
    
    .nav-tab span {
        font-size: 10px;
    }
    
    .discover-card-name {
        font-size: 14px;
    }
    
    .discover-card-age {
        font-size: 12px;
    }
}

/* ============================================================================
   SMOOTH TRANSITIONS
   ============================================================================ */

* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

button, a {
    transition: all 0.3s ease;
}
