/* Invite Page Specific Styles */

.invite-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.invite-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 60px;
}

.invite-container {
    width: 100%;
    max-width: 480px;
}

/* Wide layout for found state */
.invite-container:has(.invite-card-wide[style*="block"]) {
    max-width: 900px;
}

.invite-card-wide {
    padding: 32px;
}

.invite-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.server-info-section {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.join-section {
    flex: 1;
    min-width: 280px;
    max-width: 340px;
    text-align: center;
    padding-left: 40px;
    border-left: 1px solid var(--border);
}

.invite-card {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 40px;
    text-align: center;
}

/* Loading State */
.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Server Info */
.server-icon {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    font-weight: 800;
    color: white;
}

.server-icon.has-image {
    background: none;
}

.server-icon img {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    object-fit: cover;
}

/* Server Banner */
.server-banner {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px;
    border-radius: 12px;
    overflow: hidden;
}

.server-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.invite-card h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.server-description {
    color: var(--text-muted);
    margin-bottom: 24px;
    text-align: left;
}

.server-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.invite-code-display {
    background: var(--background);
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 32px;
    display: inline-block;
}

.invite-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--primary-light);
}

.invite-card h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-muted);
}

/* Join Options */
.join-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.join-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s ease;
    text-align: left;
    position: relative;
}

.join-option:hover:not(.disabled) {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.join-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.option-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.option-icon svg {
    width: 24px;
    height: 24px;
    color: var(--text);
}

.option-content {
    flex: 1;
}

.option-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.option-content p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.option-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.option-badge.recommended {
    background: var(--success);
    color: white;
}

.option-badge.coming-soon {
    background: var(--surface-light);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.invite-footer {
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.invite-footer p {
    font-size: 14px;
    color: var(--text-muted);
}

.invite-footer a {
    color: var(--primary);
    font-weight: 500;
}

.invite-footer a:hover {
    text-decoration: underline;
}

/* Error States */
.error-card {
    border-color: var(--error);
}

.error-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.error-icon svg {
    width: 40px;
    height: 40px;
    color: var(--error);
}

.error-card h1 {
    color: var(--error);
}

.error-card p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.error-code {
    font-family: 'JetBrains Mono', monospace;
    background: var(--background);
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 24px;
}

.error-code span {
    color: var(--primary-light);
}

.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer override for invite page */
.invite-footer-bar {
    padding: 20px 0;
    text-align: center;
}

.invite-footer-bar .container {
    padding: 0;
}

.invite-footer-bar p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* Responsive - Two column to single column */
@media (max-width: 768px) {
    .invite-container:has(.invite-card-wide[style*="block"]) {
        max-width: 480px;
    }

    .invite-layout {
        flex-direction: column;
        gap: 32px;
    }

    .join-section {
        max-width: none;
        padding-left: 0;
        padding-top: 32px;
        border-left: none;
        border-top: 1px solid var(--border);
    }
}

/* Responsive - Small screens */
@media (max-width: 480px) {
    .invite-card {
        padding: 24px;
    }

    .invite-card-wide {
        padding: 24px;
    }

    .server-icon {
        width: 72px;
        height: 72px;
        font-size: 28px;
    }

    .server-stats {
        gap: 24px;
    }

    .join-option {
        padding: 12px 16px;
    }

    .option-icon {
        width: 40px;
        height: 40px;
    }

    .error-actions {
        flex-direction: column;
    }

    .error-actions .btn {
        width: 100%;
    }
}
