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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #ffffff;
}

/* Landing Page Styles */
.landing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    text-align: center;
}

.logo-section {
    margin-bottom: 40px;
}

.logo {
    height: 72px;
    width: auto;
    object-fit: contain;
}

.tagline {
    font-size: 18px;
    color: #a0a0a0;
    margin-top: 10px;
}

.qr-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    background: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    overflow: hidden;
}

.qr-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-fallback {
    color: #333;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
}

.scan-text {
    margin-top: 20px;
    font-size: 16px;
    color: #cccccc;
}

.footer-text {
    margin-top: 40px;
    font-size: 14px;
    color: #666666;
}

/* Main Page Styles */
.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header .logo {
    height: 48px;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 480px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.step {
    display: none;
}

.step.active {
    display: block;
}

.step-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.step-description {
    font-size: 14px;
    color: #a0a0a0;
    margin-bottom: 30px;
}

/* Discord Button */
.discord-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: #5865F2;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.discord-btn:hover {
    background: #4752c4;
    transform: translateY(-2px);
}

.discord-btn:disabled {
    background: #4a4a6a;
    cursor: not-allowed;
    transform: none;
}

.discord-icon {
    width: 24px;
    height: 24px;
}

/* Entry Options (Landing page two-option layout) */
.entry-option {
    margin-bottom: 8px;
}

.entry-label {
    font-size: 13px;
    font-weight: 600;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.entry-hint {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

.entry-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #666;
    font-size: 13px;
}

.entry-divider::before,
.entry-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.entry-divider span {
    padding: 0 12px;
    color: #888;
}

/* Host Entry Button */
.host-entry-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(90deg, #e94560, #ff6b6b);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.host-entry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #a0a0a0;
    margin-bottom: 8px;
}

.required {
    color: #e94560;
    font-weight: 600;
}

.field-hint {
    font-size: 12px;
    color: #777777;
    margin: -4px 0 10px;
    line-height: 1.4;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #e94560;
}

.form-group input::placeholder {
    color: #666666;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a0a0a0' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-group select option,
.form-group select optgroup {
    background: #1a1a2e;
    color: #ffffff;
}

.phone-input-group {
    display: flex;
    gap: 10px;
}

.country-prefix {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-size: 16px;
    cursor: default;
    user-select: none;
    white-space: nowrap;
}

.country-flag {
    font-size: 18px;
}

.country-code {
    font-weight: 500;
}

.country-arrow {
    font-size: 12px;
    color: #a0a0a0;
}

.phone-input-group input {
    flex: 1;
}

.send-code-btn {
    padding: 14px 20px;
    background: #e94560;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.send-code-btn:hover {
    background: #d63850;
}

.send-code-btn:disabled {
    background: #666666;
    cursor: not-allowed;
}

.verify-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(90deg, #e94560, #ff6b6b);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.verify-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
}

.verify-btn:disabled {
    background: #4a4a6a;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* User Info Display */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(88, 101, 242, 0.2);
    border-radius: 12px;
    margin-bottom: 25px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #5865F2;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 16px;
}

.user-discord-tag {
    font-size: 14px;
    color: #a0a0a0;
}

/* Messages */
.message {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.message.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.message.success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s linear infinite;
}

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

/* Quiz Styles */
.quiz-question {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.quiz-question:last-of-type {
    border-bottom: none;
    margin-bottom: 28px;
}

.quiz-q-text {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 12px;
    line-height: 1.5;
}

.quiz-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    line-height: 1.4;
    color: #d0d0d0;
}

.quiz-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(233, 69, 96, 0.3);
}

.quiz-option input[type="radio"] {
    margin-top: 2px;
    accent-color: #e94560;
    flex-shrink: 0;
}

.quiz-option:has(input:checked) {
    background: rgba(233, 69, 96, 0.15);
    border-color: rgba(233, 69, 96, 0.5);
    color: #ffffff;
}

/* Archetype Result */
.archetype-result {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(90deg, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

/* Success Page */
.success-container {
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
}

/* Mutually exclusive activity sections */
.disabled-section {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Activity Category */
.activity-category {
    margin-bottom: 20px;
}

.category-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #e0e0e0;
}

/* Tag Grid */
.tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

/* Tag Option (checkbox hidden, styled as chip) */
.tag-option {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    color: #d0d0d0;
    transition: all 0.2s ease;
}

.tag-option input[type="checkbox"] {
    display: none;
}

.tag-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(233, 69, 96, 0.3);
}

.tag-option:has(input:checked) {
    background: rgba(233, 69, 96, 0.2);
    border-color: rgba(233, 69, 96, 0.6);
    color: #ffffff;
}

/* Custom Tag Input */
.custom-input-section {
    margin-top: 16px;
}

.custom-input-section > label {
    display: block;
    font-size: 14px;
    color: #a0a0a0;
    margin-bottom: 4px;
}

.custom-tag-input {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.custom-tag-input input {
    flex: 1;
}

.add-tag-btn {
    padding: 10px 16px;
    background: #e94560;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.add-tag-btn:hover {
    background: #d63850;
}

.custom-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.custom-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(233, 69, 96, 0.2);
    border: 1px solid rgba(233, 69, 96, 0.5);
    border-radius: 20px;
    font-size: 13px;
    color: #ffffff;
}

.custom-tag .remove-tag {
    cursor: pointer;
    opacity: 0.7;
    font-size: 16px;
    line-height: 1;
}

.custom-tag .remove-tag:hover {
    opacity: 1;
}

/* Custom Request Section (Activities page) */
.custom-request-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-request-label {
    font-size: 14px;
    color: #a0a0a0;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Collapsible Section */
.collapsible-section {
    margin-bottom: 20px;
}

.collapsible-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #d0d0d0;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collapsible-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.toggle-arrow {
    transition: transform 0.3s;
}

.toggle-arrow.open {
    transform: rotate(180deg);
}

.collapsible-content {
    margin-top: 16px;
}

/* Optional Page Buttons */
.optional-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.skip-btn {
    flex: 1;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #a0a0a0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.skip-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.optional-buttons .verify-btn {
    flex: 1;
}

/* Textarea */
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: #e94560;
}

.form-group textarea::placeholder {
    color: #666666;
}

/* Community Invite Card */
.community-invite-section {
    margin-bottom: 24px;
}

.invite-card {
    text-align: center;
    padding: 28px 24px;
    background: rgba(88, 101, 242, 0.15);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 16px;
    margin-bottom: 20px;
}

.invite-card-icon {
    margin-bottom: 8px;
}

.discord-icon-large {
    width: 48px;
    height: 48px;
    color: #5865F2;
}

.invite-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #e0e0e0;
}

.invite-btn {
    display: inline-flex;
    width: auto;
    padding: 12px 32px;
    text-decoration: none;
}

/* Suggestion Chips (Ori Request) */
.suggestion-section {
    margin-bottom: 24px;
}

.suggestion-label {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.suggestion-chips {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.suggestion-chip {
    text-align: left;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #a0a0a0;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-style: italic;
    font-family: inherit;
}

.suggestion-chip:hover {
    background: rgba(233, 69, 96, 0.1);
    border-color: rgba(233, 69, 96, 0.3);
    color: #ffffff;
}

/* Ori Preview */
.ori-preview {
    padding: 16px;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 12px;
    margin-bottom: 20px;
}

.ori-preview h4 {
    font-size: 14px;
    color: #86efac;
    margin-bottom: 10px;
}

.ori-preview-text {
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    color: #e0e0e0;
}

/* Responsive */
@media (max-width: 480px) {
    .logo {
        height: 48px;
    }

    .card {
        padding: 30px 20px;
    }

    .phone-input-group {
        flex-wrap: wrap;
    }

    .country-prefix {
        flex-shrink: 0;
    }

    .phone-input-group input {
        min-width: 0;
    }

    .send-code-btn {
        width: 100%;
    }
}
