/* ---
Design Rationale:
- Font: 'Inter' is a clean, modern sans-serif font, similar to the one used by Anthropic.
- Colors: A soft, warm palette inspired by Claude's branding. 
  --bg-color (creamy white) for ample whitespace.
  --text-color (dark brown) for high readability.
  --accent-color (soft orange) for interactive elements, providing a friendly feel.
- Layout: Centered, single-column layout focuses user attention.
- Spacing: Generous padding and margins create a breathable, uncluttered interface.
- Interactivity: Subtle transitions on focus and hover provide feedback without being distracting.
--- */

/* --- Root Variables & Theme --- */
:root {
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    --font-size: 16px;
    --border-radius: 12px;

    /* Claude-Inspired Palette */
    --bg-color: #FBFBFA; /* Creamy white */
    --surface-color: #FFFFFF;
    --text-color: #4B413A; /* Dark warm gray/brown */
    --text-light-color: #8D817A; /* Lighter brown for descriptions */
    --border-color: #EAE5E1;
    --accent-color: #D97706; /* A soft, warm orange */
    --accent-hover-color: #C06400;
    --success-color: #28a745;
    --danger-color: #d9534f;
}

/* --- Reset & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size);
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

/* --- Layout & Card --- */
.container {
    width: 100%;
    max-width: 420px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.card {
    background-color: var(--surface-color);
    width: 100%;
    padding: 3rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.main-footer {
    font-size: 0.875rem;
    color: var(--text-light-color);
}

.main-footer a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-footer a:hover {
    color: var(--accent-color);
}

/* --- Typography --- */
.card-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.card-description {
    color: var(--text-light-color);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* --- Form Elements --- */
#invite-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    text-align: left;
}

.input-group label {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--text-light-color);
}

.input-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group input::placeholder {
    color: #BDB3AD;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.input-group input.invalid {
    border-color: var(--danger-color);
}

/* --- Button & Spinner --- */
#submit-button {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
    padding: 0 1.5rem;
    margin-top: 1rem;
    border: none;
    border-radius: 10px;
    background-color: var(--accent-color);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

#submit-button:hover:not(:disabled) {
    background-color: var(--accent-hover-color);
}

#submit-button:active:not(:disabled) {
    transform: scale(0.98);
}

#submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Status Area --- */
.status-area {
    margin-top: 1.5rem;
    min-height: 24px;
    font-weight: 500;
    font-size: 0.9rem;
}

.status-message {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    animation: fadeIn 0.5s forwards;
    text-align: center;
}

.status-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #208C3A;
}

.status-error {
    background-color: rgba(217, 83, 79, 0.1);
    color: #A94442;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive Design --- */
@media (max-width: 480px) {
    body {
        padding: 1rem;
    }
    .card {
        padding: 2rem 1.5rem;
    }
    .card-title {
        font-size: 1.75rem;
    }
}
