/* =========================================
   HeartMatch - Dark Purple + Gold Theme
   ========================================= */

:root {
    --primary: #FFE18F;
    --primary-dark: #e6c97a;
    --bg: #17113A;
    --card: #251C4E;
    --text: #FFFFFF;
    --text-muted: #A99DC7;
    --border: #4B3F73;
    --success: #22c55e;
    --error: #ef4444;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg) !important;
    color: var(--text) !important;
    line-height: 1.5;
    min-height: 100vh;
}

/* ========== AUTH PAGES ========== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg);
    padding: 20px;
}

.auth-container {
    background: var(--card);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border);
}

.auth-container h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text) !important;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: #1e1645 !important;
    color: var(--text) !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary) !important;
    color: #17113A !important;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-dark) !important;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

/* ========== ALERTS ========== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid #ef4444;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid #22c55e;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
}

.auth-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* ========== NAVBAR ========== */
.navbar {
    background: var(--card) !important;
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary) !important;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: var(--text) !important;
    text-decoration: none;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary) !important;
}

/* ========== CONTAINER & CARDS ========== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px;
}

.card {
    background: var(--card) !important;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    color: var(--text);
}

h1, h2, h3 {
    color: var(--text) !important;
}

/* ========== SWIPE ========== */
.swipe-container {
    max-width: 400px;
    margin: 40px auto;
}

.profile-card {
    background: var(--card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.profile-card img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
}

.profile-info {
    padding: 20px;
}

.profile-info h2 {
    font-size: 1.6rem;
    margin-bottom: 4px;
    color: var(--text);
}

.profile-info .meta {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.swipe-actions {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.swipe-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.15s;
}

.swipe-btn:hover {
    transform: scale(1.1);
}

.btn-pass {
    background: var(--card);
    color: var(--text-muted);
    border: 2px solid var(--border);
}

.btn-like {
    background: var(--primary);
    color: #17113A;
}

/* ========== MATCHES ========== */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.match-item {
    text-align: center;
}

.match-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
}

.match-item p {
    margin-top: 8px;
    font-weight: 500;
    color: var(--text);
}

/* Online / Offline dots */
.status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--card);
    position: absolute;
    bottom: 6px;
    right: 6px;
}

.status-dot.online {
    background-color: #22c55e;
}

.status-dot.offline {
    background-color: #ef4444;
}

.photo-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* ========== CHAT ========== */
.chat-layout, .chat-container {
    display: flex;
    height: calc(100vh - 140px);
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.chat-sidebar {
    width: 300px;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    background: #1e1645;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg);
}

.message {
    max-width: 70%;
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 16px;
}

.message.sent {
    background: var(--primary);
    color: #17113A;
    margin-left: auto;
}

.message.received {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
}

.chat-input, .chat-input-area {
    display: flex;
    padding: 16px;
    border-top: 1px solid var(--border);
    gap: 10px;
    background: var(--card);
}

.chat-input input,
.chat-input-area input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #1e1645;
    color: var(--text);
}

/* ========== INTERESTS ========== */
.form-group label {
    color: #FFFFFF !important;
}

/* ========== FOOTER ========== */
footer {
    text-align: center;
    padding: 30px;
    color: var(--text-muted) !important;
    font-size: 0.9rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
    .auth-container {
        padding: 24px;
    }
    .chat-sidebar {
        display: none;
    }
}