/* 邀请码入口页样式 */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* 防止滚动 */
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed; /* 固定背景，防止滚动时移动 */
    min-height: 100vh;
    min-height: -webkit-fill-available; /* iOS Safari 全屏支持 */
    height: 100vh;
    height: -webkit-fill-available;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    margin: 0;
    box-sizing: border-box;
}

.invite-container {
    width: 100%;
    max-width: 420px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.invite-box {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 50px 35px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25), 0 10px 30px rgba(0, 0, 0, 0.15);
    text-align: center;
    width: 100%;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.invite-title {
    font-size: 34px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 auto 12px;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.invite-subtitle {
    font-size: 16px;
    color: #718096;
    margin: 0 auto 35px;
    line-height: 1.6;
    font-weight: 400;
}

.invite-form {
    margin: 0;
    width: 100%;
}

.form-group {
    margin: 0 0 18px 0;
    width: 100%;
}

.invite-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    background: #fff;
    color: #2d3748;
    text-align: center;
    box-sizing: border-box;
}

.invite-input::placeholder {
    color: #a0aec0;
    text-align: center;
}

.invite-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
    outline: none;
    background: #f7fafc;
}

.invite-btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    transition: all 0.3s ease;
    min-height: 52px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    letter-spacing: 0.3px;
}

.invite-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.invite-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.error-msg {
    margin: 18px auto 0;
    padding: 14px 16px;
    background: linear-gradient(135deg, #fed7d7 0%, #fc8181 100%);
    color: #c53030;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    text-align: center;
    box-shadow: 0 2px 8px rgba(197, 48, 48, 0.2);
    max-width: 100%;
}

/* 移动端适配 */
@media (max-width: 768px) {
    html, body {
        height: 100%;
        overflow: hidden;
    }
    
    body {
        padding: 15px;
        height: 100vh;
        height: -webkit-fill-available;
    }
    
    .invite-container {
        max-width: 100%;
    }
    
    .invite-box {
        padding: 40px 28px;
        border-radius: 20px;
    }
    
    .invite-title {
        font-size: 30px;
        margin-bottom: 10px;
    }
    
    .invite-subtitle {
        font-size: 15px;
        margin-bottom: 32px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .invite-input {
        padding: 15px 18px;
        font-size: 16px; /* 保持16px防止iOS自动缩放 */
        border-radius: 11px;
    }
    
    .invite-btn {
        padding: 15px 20px;
        font-size: 16px;
        min-height: 50px;
        border-radius: 11px;
    }
    
    .error-msg {
        margin-top: 16px;
        padding: 12px 14px;
        font-size: 13px;
    }
}

/* 小屏幕优化 */
@media (max-width: 480px) {
    html, body {
        height: 100%;
        overflow: hidden;
    }
    
    body {
        padding: 12px;
        height: 100vh;
        height: -webkit-fill-available;
    }
    
    .invite-box {
        padding: 35px 22px;
        border-radius: 18px;
    }
    
    .invite-title {
        font-size: 28px;
        margin-bottom: 8px;
    }
    
    .invite-subtitle {
        font-size: 14px;
        margin-bottom: 28px;
    }
    
    .form-group {
        margin-bottom: 14px;
    }
    
    .invite-input {
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 10px;
    }
    
    .invite-btn {
        padding: 14px 18px;
        font-size: 16px;
        min-height: 48px;
        border-radius: 10px;
    }
    
    .error-msg {
        margin-top: 14px;
        padding: 12px;
        font-size: 13px;
        border-radius: 8px;
    }
}

/* 横屏优化 */
@media (max-width: 768px) and (orientation: landscape) {
    html, body {
        height: 100%;
        overflow: hidden;
    }
    
    body {
        padding: 10px;
        height: 100vh;
        height: -webkit-fill-available;
    }
    
    .invite-container {
        max-width: 500px;
    }
    
    .invite-box {
        padding: 30px 28px;
        border-radius: 18px;
    }
    
    .invite-title {
        font-size: 28px;
        margin-bottom: 6px;
    }
    
    .invite-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }
    
    .form-group {
        margin-bottom: 14px;
    }
    
    .invite-input {
        padding: 13px 18px;
    }
    
    .invite-btn {
        padding: 13px 20px;
        min-height: 46px;
    }
}

