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


/* Base layout & typography */
html, body {
    height: 100%;
}

body {
    font-family: var(--font-sans);
    line-height: 1.5;
    color: var(--ink-900);
    background: radial-gradient(circle at center, var(--daisy-gradient-start) 0%, var(--daisy-gradient-end) 100%);
    display: flex;
    flex-direction: column;
}

main {
    width: 100%;
    max-width: 100%;
    height: 80%;
    margin: 24px auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, var(--accent), var(--accent-2)); /* violet-700 to purple-600 */
    color: #ffffff;
    padding: 14px 20px;
    margin: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    gap: 16px;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

header a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
}

header a:hover {
    text-decoration: underline;
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    box-shadow: none;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 1.25rem;
    padding: 16px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
    border: 1px solid var(--border);
    overflow-y: scroll;
    max-height: 90vh;
    scrollbar-width: none;
}

.card {
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: var(--radius);
    min-width: 15%;
    min-height: 200px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}


.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink-900);
    text-align: center;
}

.card-image {
    border: 1px solid var(--border);
    height: 15em;
    width: 100%;
    border-radius: 8px;
    object-fit: scale-down;
    display: block;
}

.pet-btn {
    width: 100%;
    height: 2.5em;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.78rem 1.1rem;
    text-align: center;
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    color: #fff;
    font-weight: 600;
    border-radius: 999px; /* pill */
    font-size: 1rem;
    font-family: var(--font-sans);
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 6px 14px rgba(139, 92, 246, 0.35);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.btn:hover {
    background: linear-gradient(180deg, var(--accent-3), var(--accent-2));
    transform: translateY(-1px);
}

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

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 6px rgba(167, 139, 250, 0.28);
}

.btn:visited {
    color: white;
}

.btn.disabled,
.btn[aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

/* Login form styling (unchanged structurally, styled with theme) */
#login-form-container,
#signup-form-container {
    max-width: 560px;
    margin: 22px auto 32px auto;
    padding: 0 16px;
}

#login-form,
#signup-form {
    display: grid;
    gap: 12px;
    grid-auto-rows: min-content;
    align-items: start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-md);
    width: 40vw;
    max-width: 520px;
    min-width: 320px;
    align-content: start;
    justify-items: stretch;
    box-sizing: border-box;
}

#login-form h1,
#signup-form h1 {
    margin: 0 0 4px;
    text-align: center;
}

#login-form label,
#signup-form label {
    font-size: 0.95rem;
    color: var(--ink-700);
}

#login-form input[type="email"],
#login-form input[type="password"],
#signup-form input[type="email"],
#signup-form input[type="password"],
#signup-form input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb; /* gray-200 */
    background: #f9fafb; /* gray-50 */
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

#login-form input:focus,
#signup-form input:focus {
    outline: none;
    border-color: #a5b4fc; /* indigo-300 */
    background: #fff;
    box-shadow: 0 0 0 3px rgba(165, 180, 252, 0.35);
}

#login-button,
#signup-button {
    margin-top: 8px;
}

.auth-switch {
    margin-top: 6px;
    text-align: center;
    color: #475569;
    font-size: 0.95rem;
}

.auth-switch a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Simple typographic tweaks */
h1, h2, h3 {
    color: #0f172a;
    letter-spacing: 0.2px;
}

p {
    color: #334155;
}

/* Small screens: tighten gaps a bit */
@media (max-width: 480px) {
    .card-container {
        gap: 0.9rem;
        padding: 12px;
    }

    .card {
        padding: 12px;
    }
}

/* Medium-down responsive stacking for the pet page */
@media (max-width: 960px) {
    main {
        width: 94%;
    }
}
