* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f5f7;
    color: #222;
}
.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}
.site-header, .site-footer {
    background: #111827;
    color: #fff;
}
.site-header .container,
.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}
.site-header h1 {
    font-size: 1.1rem;
    margin: 0;
}
.site-header nav a {
    color: #e5e7eb;
    text-decoration: none;
    margin-left: 12px;
}
main.container {
    padding: 24px 16px 40px;
}
.card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}
.btn {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.95rem;
    cursor: pointer;
}
.btn:hover {
    background: #1d4ed8;
}
.link-btn {
    background: none;
    border: none;
    color: #e5e7eb;
    cursor: pointer;
    text-decoration: underline;
}
.logout-form {
    margin: 0;
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
}
.help-text {
    margin: 0 0 6px;
    font-size: 0.85rem;
    color: #4b5563;
}
.error {
    color: #b91c1c;
    background: #fee2e2;
    padding: 8px 10px;
    border-radius: 6px;
}
.success {
    color: #166534;
    background: #dcfce7;
    padding: 8px 10px;
    border-radius: 6px;
}
.emoji-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    max-height: 260px;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
    background: #f9fafb;
}
.emoji-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 1.5rem;
}
.emoji-option.selected {
    border-color: #2563eb;
    background: #dbeafe;
}
.emoji-option span {
    font-size: 0.75rem;
    margin-top: 2px;
}
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}
.emoji-card {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.emoji-char {
    font-size: 2.4rem;
    margin-bottom: 8px;
}
.emoji-card-text {
    align-items: stretch;
    grid-column: 1 / -1; /* span full row so text table has width */
}
.emoji-card-text .emoji-char {
    font-size: 1rem;
    width: 100%;
}
.emoji-block {
    max-height: 260px;
    overflow: auto;
    background: #ffe4f0; /* light pink */
    border-radius: 8px;
    border: 2px dotted #be185d; /* dark pink */
    padding: 8px 10px;
    margin: 0 0 8px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.85rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
}
.emoji-cell {
    padding: 2px 4px;
    text-align: left;
    white-space: nowrap;
}
.copy-btn {
    width: 100%;
}
.related-searches ul {
    padding-left: 18px;
}
.related-searches li {
    margin-bottom: 4px;
}
.breadcrumb {
    font-size: 0.85rem;
}
.breadcrumb a {
    color: #d1d5db;
    text-decoration: none;
}
.breadcrumb span {
    color: #9ca3af;
}
/* Auth */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.auth-container {
    background: #fff;
    padding: 24px 20px;
    border-radius: 8px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}
.auth-container h1 {
    margin-top: 0;
    margin-bottom: 16px;
}
.auth-container form label {
    margin-top: 8px;
}
.auth-container input[type="password"] {
    margin-bottom: 12px;
}
@media (max-width: 640px) {
    .site-header .container,
    .site-footer .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
