:root {
    --primary-color: #ff4b2b;
    --secondary-color: #ff416c;
    --bg-color: #f6f5f7;
    --text-color: #333;
    --white: #ffffff;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#app {
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: var(--white);
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

main {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    position: relative;
}

.hidden {
    display: none !important;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: transform 0.2s, opacity 0.2s;
}

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

.btn.primary {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    width: 100%;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.btn.google { background-color: #4285F4; color: white; }
.btn.github { background-color: #333; color: white; }

/* Profile Form */
#profile-section h2 {
    margin-bottom: 15px;
}

.profile-card {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: bold;
    color: #888;
    margin-bottom: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

#pet-form input, #pet-form select, #pet-form textarea {
    padding: 10px;
    border: 1px solid #eee;
    background-color: #fafafa;
    border-radius: 8px;
    width: 100%;
    font-size: 0.95rem;
}

#pet-form textarea {
    height: 80px;
    resize: none;
}

.upload-container {
    margin-top: 10px;
    text-align: center;
    border: 2px dashed #eee;
    padding: 15px;
    border-radius: 10px;
}

.photo-preview-large {
    width: 100%;
    height: 150px;
    margin-bottom: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.photo-preview-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn.secondary {
    background: #eee;
    color: #555;
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Discovery Card */
#pet-card {
    border-radius: 15px;
    overflow: hidden;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    height: 70vh;
}

#card-photo {
    width: 100%;
    height: 70%;
    object-fit: cover;
}

.card-info {
    padding: 15px;
}

.swipe-buttons {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-evenly;
}

.btn.reject { background: #eee; color: #ff4b2b; font-size: 1.5rem; border-radius: 50%; width: 60px; height: 60px; }
.btn.heart { background: linear-gradient(to right, #ff4b2b, #ff416c); color: white; font-size: 1.5rem; border-radius: 50%; width: 60px; height: 60px; }

/* Bottom Nav */
#bottom-nav {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    border-top: 1px solid #eee;
}

#bottom-nav button {
    background: none;
    border: none;
    color: #888;
    font-weight: bold;
    cursor: pointer;
}

#bottom-nav button.active {
    color: var(--primary-color);
}

/* Matches Layout */
.matches-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#matches-list ul {
    list-style: none;
    display: flex;
    overflow-x: auto;
    padding: 10px 0;
    gap: 15px;
}

#matches-list li {
    text-align: center;
    cursor: pointer;
}

#matches-list img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

/* Chat */
#chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message {
    padding: 8px 12px;
    border-radius: 15px;
    max-width: 80%;
}

.message.sent {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
}

.message.received {
    background: #eee;
    align-self: flex-start;
}

#chat-form {
    display: flex;
    padding: 10px;
}

#chat-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 20px;
    margin-right: 5px;
}
