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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background: #0a0a0f;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top nav */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-spacer {
    flex: 1;
}

.login-btn {
    color: #00d4ff;
    text-decoration: none;
    border: 1px solid #00d4ff;
    padding: 0.4rem 1.2rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}

.login-btn:hover {
    background: #00d4ff;
    color: #0a0a0f;
}

.back-link {
    color: #00d4ff;
    text-decoration: none;
    font-size: 0.95rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* Header */
header {
    text-align: center;
    padding: 2rem 2rem 1rem;
}

header h1 {
    font-family: 'Courier New', Courier, monospace;
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff, #7b2ff7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #666;
    font-size: 1rem;
    margin-top: 0.25rem;
}

/* Main */
main {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
    flex: 1;
    width: 100%;
}

/* Member grid */
.member-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .member-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .member-grid {
        grid-template-columns: 1fr;
    }
}

/* Member card */
.member-card {
    background: #13131a;
    border: 1px solid #1e1e2a;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s, border-color 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.member-card:hover {
    transform: translateY(-4px);
    border-color: #00d4ff;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.1);
}

.member-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Portrait */
.portrait {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #0a0a0f;
}

img.portrait {
    object-fit: cover;
    display: block;
}

/* Unique colors for each member */
.portrait-brian { background: linear-gradient(135deg, #00d4ff, #0099cc); }
.portrait-janelle { background: linear-gradient(135deg, #ff6b9d, #c44dff); }
.portrait-nathaniel { background: linear-gradient(135deg, #7b2ff7, #00d4ff); }
.portrait-joseph { background: linear-gradient(135deg, #00ff88, #00cc6a); }
.portrait-isaac { background: linear-gradient(135deg, #ffaa00, #ff6600); }
.portrait-gideon { background: linear-gradient(135deg, #ff4444, #ff8800); }

.member-card h3 {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.member-card .bullets {
    list-style: none;
    text-align: left;
    padding: 0;
}

.member-card .bullets li {
    color: #888;
    font-size: 0.85rem;
    padding: 0.2rem 0;
    padding-left: 1rem;
    position: relative;
}

.member-card .bullets li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: #00d4ff;
    font-family: 'Courier New', monospace;
}

/* Edit container (replaces link during edit mode) */
.edit-container {
    text-align: center;
}

.edit-container h3 {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

/* Edit button */
.edit-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: 1px solid #333;
    color: #666;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.edit-btn:hover {
    color: #00d4ff;
    border-color: #00d4ff;
}

/* Edit mode */
.bullet-edit {
    background: #1a1a24;
    border: 1px solid #333;
    color: #e0e0e0;
    width: 100%;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
    margin: 0.2rem 0;
}

.bullet-edit:focus {
    outline: none;
    border-color: #00d4ff;
}

.save-btn {
    background: #00d4ff;
    color: #0a0a0f;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 0.5rem;
    font-weight: 600;
}

.save-btn:hover {
    background: #00b8d9;
}

/* Auth page */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.auth-card {
    background: #13131a;
    border: 1px solid #1e1e2a;
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
}

.auth-card h1 {
    color: #00d4ff;
    text-align: center;
    margin-bottom: 1.5rem;
    font-family: 'Courier New', monospace;
}

.auth-card label {
    display: block;
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    margin-top: 1rem;
}

.auth-card input,
.auth-card select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: #1a1a24;
    border: 1px solid #333;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.95rem;
    font-family: inherit;
}

.auth-card input:focus,
.auth-card select:focus {
    outline: none;
    border-color: #00d4ff;
}

.email-input-group {
    display: flex;
    align-items: center;
    gap: 0;
}

.email-input-group input {
    border-radius: 6px 0 0 6px;
    border-right: none;
}

.email-domain {
    background: #1a1a24;
    border: 1px solid #333;
    border-left: none;
    border-radius: 0 6px 6px 0;
    padding: 0.6rem 0.8rem;
    color: #666;
    font-size: 0.85rem;
    white-space: nowrap;
}

.auth-card button[type="submit"] {
    width: 100%;
    padding: 0.7rem;
    background: #00d4ff;
    color: #0a0a0f;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: background 0.2s;
}

.auth-card button[type="submit"]:hover {
    background: #00b8d9;
}

.auth-error {
    color: #ff4444;
    text-align: center;
    font-size: 0.85rem;
    min-height: 1.2rem;
}

.auth-toggle {
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
    font-size: 0.9rem;
}

.auth-toggle a {
    color: #00d4ff;
    text-decoration: none;
}

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

/* Photo upload button in edit mode */
.photo-upload-label {
    display: inline-block;
    background: none;
    border: 1px solid #333;
    color: #888;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-bottom: 0.5rem;
    transition: color 0.2s, border-color 0.2s;
}

.photo-upload-label:hover {
    color: #00d4ff;
    border-color: #00d4ff;
}

.photo-upload-input {
    display: none;
}

/* Cropper modal */
.crop-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.crop-modal {
    background: #13131a;
    border: 1px solid #1e1e2a;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.crop-title {
    color: #00d4ff;
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.crop-hint {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.crop-area {
    position: relative;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid #333;
}

.crop-canvas {
    display: block;
    cursor: grab;
}

.crop-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.crop-grid-line {
    pointer-events: none;
}

/* Circular mask — darkens corners to preview round crop */
.crop-mask {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(circle at center, transparent 69.5%, rgba(255,255,255,0.4) 70%, rgba(255,255,255,0.4) 71%, rgba(0, 0, 0, 0.5) 72%);
}

.crop-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.crop-cancel-btn {
    background: none;
    border: 1px solid #333;
    color: #888;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s, border-color 0.2s;
}

.crop-cancel-btn:hover {
    color: #ff4444;
    border-color: #ff4444;
}

.crop-upload-btn {
    background: #00d4ff;
    color: #0a0a0f;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}

.crop-upload-btn:hover {
    background: #00b8d9;
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem;
    color: #444;
    font-size: 0.85rem;
    margin-top: 3rem;
}
